From 3390e3958e10aa7f3a6a59dbea5b1c28a5149cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sun, 15 Nov 2020 11:05:46 +0800 Subject: [PATCH 1/4] Add quicklink to customized theme folder --- Flow.Launcher/SettingWindow.xaml | 8 ++++---- Flow.Launcher/SettingWindow.xaml.cs | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index f8903e891aa..fd657cd22fc 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -172,7 +172,7 @@ - + @@ -211,10 +211,10 @@ + + - diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index eb5fd7de09f..60183f5455f 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -275,5 +275,10 @@ private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e) { Close(); } + + private void Button_Click(object sender, RoutedEventArgs e) + { + System.Diagnostics.Process.Start("explorer",$"{DataLocation.DataDirectory()}\\Themes"); + } } } From 2fb8e4ee09a77d7eaf1dc5b45e93510c7fb853ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sun, 15 Nov 2020 13:51:12 +0800 Subject: [PATCH 2/4] change event name --- Flow.Launcher/SettingWindow.xaml | 2 +- Flow.Launcher/SettingWindow.xaml.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index fd657cd22fc..32f9e9a6e8c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -211,7 +211,7 @@ - + diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 60183f5455f..20692c16e62 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -276,7 +276,7 @@ private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e) Close(); } - private void Button_Click(object sender, RoutedEventArgs e) + private void OpenPluginFolder(object sender, RoutedEventArgs e) { System.Diagnostics.Process.Start("explorer",$"{DataLocation.DataDirectory()}\\Themes"); } From 048981a749532c37f4c78e501944014ff5587bd3 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 16 Nov 2020 06:16:03 +1100 Subject: [PATCH 3/4] update to use FilesFolders class --- Flow.Launcher/SettingWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 20692c16e62..b21bb2904f1 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -278,7 +278,7 @@ private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e) private void OpenPluginFolder(object sender, RoutedEventArgs e) { - System.Diagnostics.Process.Start("explorer",$"{DataLocation.DataDirectory()}\\Themes"); + FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), "Themes")); } } } From 83ccfac04fa6ed6c16f4c6579dd32439488bd0b7 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 16 Nov 2020 06:29:24 +1100 Subject: [PATCH 4/4] move Themes string to Constant --- Flow.Launcher.Core/Resource/Theme.cs | 2 +- Flow.Launcher.Infrastructure/Constant.cs | 2 ++ Flow.Launcher/SettingWindow.xaml.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 2075137d0f5..a5f12bbb908 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -21,7 +21,7 @@ public class Theme private ResourceDictionary _oldResource; private string _oldTheme; public Settings Settings { get; set; } - private const string Folder = "Themes"; + private const string Folder = Constant.Themes; private const string Extension = ".xaml"; private string DirectoryPath => Path.Combine(Constant.ProgramDirectory, Folder); private string UserDirectoryPath => Path.Combine(DataLocation.DataDirectory(), Folder); diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index c6a3b48f364..df146404882 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -33,5 +33,7 @@ public static class Constant public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.png"; public const string DefaultTheme = "Darker"; + + public const string Themes = "Themes"; } } diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index b21bb2904f1..c38ed4d2294 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -8,6 +8,7 @@ using NHotkey.Wpf; using Flow.Launcher.Core.Plugin; using Flow.Launcher.Core.Resource; +using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; @@ -278,7 +279,7 @@ private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e) private void OpenPluginFolder(object sender, RoutedEventArgs e) { - FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), "Themes")); + FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); } } }