Skip to content

Commit 9edfa37

Browse files
committed
Remove unused method (and really use EditPluginPriorityCommand)
1 parent 72159d4 commit 9edfa37

File tree

2 files changed

+1
-45
lines changed

2 files changed

+1
-45
lines changed

Flow.Launcher/SettingWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@
11271127
x:Name="PriorityButton"
11281128
Margin="0,0,22,0"
11291129
VerticalAlignment="Center"
1130-
Click="OnPluginPriorityClick"
1130+
Command="{Binding EditPluginPriorityCommand}"
11311131
Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}"
11321132
Cursor="Hand"
11331133
ToolTip="{DynamicResource priorityToolTip}">

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Flow.Launcher.Infrastructure.Hotkey;
66
using Flow.Launcher.Infrastructure.UserSettings;
77
using Flow.Launcher.Plugin;
8-
using Flow.Launcher.Plugin.SharedCommands;
98
using Flow.Launcher.ViewModel;
109
using ModernWpf;
1110
using ModernWpf.Controls;
@@ -18,7 +17,6 @@
1817
using System.Windows.Forms;
1918
using System.Windows.Input;
2019
using System.Windows.Interop;
21-
using System.Windows.Media;
2220
using System.Windows.Navigation;
2321
using Button = System.Windows.Controls.Button;
2422
using Control = System.Windows.Controls.Control;
@@ -194,32 +192,6 @@ private void OnPluginPriorityClick(object sender, RoutedEventArgs e)
194192
}
195193
}
196194

197-
private void OnPluginNameClick(object sender, MouseButtonEventArgs e)
198-
{
199-
if (e.ChangedButton == MouseButton.Left)
200-
{
201-
var website = viewModel.SelectedPlugin.PluginPair.Metadata.Website;
202-
if (!string.IsNullOrEmpty(website))
203-
{
204-
var uri = new Uri(website);
205-
if (Uri.CheckSchemeName(uri.Scheme))
206-
{
207-
website.OpenInBrowserTab();
208-
}
209-
}
210-
}
211-
}
212-
213-
private void OnPluginDirecotyClick(object sender, MouseButtonEventArgs e)
214-
{
215-
if (e.ChangedButton == MouseButton.Left)
216-
{
217-
var directory = viewModel.SelectedPlugin.PluginPair.Metadata.PluginDirectory;
218-
if (!string.IsNullOrEmpty(directory))
219-
PluginManager.API.OpenDirectory(directory);
220-
}
221-
}
222-
223195
#endregion
224196

225197
#region Proxy
@@ -290,22 +262,6 @@ private void ClearLogFolder(object sender, RoutedEventArgs e)
290262
}
291263
}
292264

293-
private static T FindParent<T>(DependencyObject child) where T : DependencyObject
294-
{
295-
//get parent item
296-
DependencyObject parentObject = VisualTreeHelper.GetParent(child);
297-
298-
//we've reached the end of the tree
299-
if (parentObject == null) return null;
300-
301-
//check if the parent matches the type we're looking for
302-
T parent = parentObject as T;
303-
if (parent != null)
304-
return parent;
305-
else
306-
return FindParent<T>(parentObject);
307-
}
308-
309265
private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e)
310266
{
311267
if (sender is not Button { DataContext: PluginStoreItemViewModel plugin } button)

0 commit comments

Comments
 (0)