|
5 | 5 | using Flow.Launcher.Infrastructure.Hotkey;
|
6 | 6 | using Flow.Launcher.Infrastructure.UserSettings;
|
7 | 7 | using Flow.Launcher.Plugin;
|
8 |
| -using Flow.Launcher.Plugin.SharedCommands; |
9 | 8 | using Flow.Launcher.ViewModel;
|
10 | 9 | using ModernWpf;
|
11 | 10 | using ModernWpf.Controls;
|
|
18 | 17 | using System.Windows.Forms;
|
19 | 18 | using System.Windows.Input;
|
20 | 19 | using System.Windows.Interop;
|
21 |
| -using System.Windows.Media; |
22 | 20 | using System.Windows.Navigation;
|
23 | 21 | using Button = System.Windows.Controls.Button;
|
24 | 22 | using Control = System.Windows.Controls.Control;
|
@@ -194,32 +192,6 @@ private void OnPluginPriorityClick(object sender, RoutedEventArgs e)
|
194 | 192 | }
|
195 | 193 | }
|
196 | 194 |
|
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 |
| - |
223 | 195 | #endregion
|
224 | 196 |
|
225 | 197 | #region Proxy
|
@@ -290,22 +262,6 @@ private void ClearLogFolder(object sender, RoutedEventArgs e)
|
290 | 262 | }
|
291 | 263 | }
|
292 | 264 |
|
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 |
| - |
309 | 265 | private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e)
|
310 | 266 | {
|
311 | 267 | if (sender is not Button { DataContext: PluginStoreItemViewModel plugin } button)
|
|
0 commit comments