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 ;
@@ -189,44 +187,11 @@ private void OnPluginPriorityClick(object sender, RoutedEventArgs e)
189
187
{
190
188
if ( sender is Control { DataContext : PluginViewModel pluginViewModel } )
191
189
{
192
- PriorityChangeWindow priorityChangeWindow = new PriorityChangeWindow ( pluginViewModel . PluginPair . Metadata . ID , settings , pluginViewModel ) ;
190
+ PriorityChangeWindow priorityChangeWindow = new PriorityChangeWindow ( pluginViewModel . PluginPair . Metadata . ID , pluginViewModel ) ;
193
191
priorityChangeWindow . ShowDialog ( ) ;
194
192
}
195
193
}
196
194
197
- private void OnPluginActionKeywordsClick ( object sender , RoutedEventArgs e )
198
- {
199
- var id = viewModel . SelectedPlugin . PluginPair . Metadata . ID ;
200
- ActionKeywords changeKeywordsWindow = new ActionKeywords ( id , settings , viewModel . SelectedPlugin ) ;
201
- changeKeywordsWindow . ShowDialog ( ) ;
202
- }
203
-
204
- private void OnPluginNameClick ( object sender , MouseButtonEventArgs e )
205
- {
206
- if ( e . ChangedButton == MouseButton . Left )
207
- {
208
- var website = viewModel . SelectedPlugin . PluginPair . Metadata . Website ;
209
- if ( ! string . IsNullOrEmpty ( website ) )
210
- {
211
- var uri = new Uri ( website ) ;
212
- if ( Uri . CheckSchemeName ( uri . Scheme ) )
213
- {
214
- website . OpenInBrowserTab ( ) ;
215
- }
216
- }
217
- }
218
- }
219
-
220
- private void OnPluginDirecotyClick ( object sender , MouseButtonEventArgs e )
221
- {
222
- if ( e . ChangedButton == MouseButton . Left )
223
- {
224
- var directory = viewModel . SelectedPlugin . PluginPair . Metadata . PluginDirectory ;
225
- if ( ! string . IsNullOrEmpty ( directory ) )
226
- PluginManager . API . OpenDirectory ( directory ) ;
227
- }
228
- }
229
-
230
195
#endregion
231
196
232
197
#region Proxy
@@ -297,22 +262,6 @@ private void ClearLogFolder(object sender, RoutedEventArgs e)
297
262
}
298
263
}
299
264
300
- private static T FindParent < T > ( DependencyObject child ) where T : DependencyObject
301
- {
302
- //get parent item
303
- DependencyObject parentObject = VisualTreeHelper . GetParent ( child ) ;
304
-
305
- //we've reached the end of the tree
306
- if ( parentObject == null ) return null ;
307
-
308
- //check if the parent matches the type we're looking for
309
- T parent = parentObject as T ;
310
- if ( parent != null )
311
- return parent ;
312
- else
313
- return FindParent < T > ( parentObject ) ;
314
- }
315
-
316
265
private void OnExternalPluginInstallClick ( object sender , RoutedEventArgs e )
317
266
{
318
267
if ( sender is not Button { DataContext : PluginStoreItemViewModel plugin } button )
@@ -335,8 +284,6 @@ private void OnExternalPluginUninstallClick(object sender, MouseButtonEventArgs
335
284
var name = viewModel . SelectedPlugin . PluginPair . Metadata . Name ;
336
285
viewModel . DisplayPluginQuery ( $ "uninstall { name } ", PluginManager . GetPluginForId ( "9f8f9b14-2518-4907-b211-35ab6290dee7" ) ) ;
337
286
}
338
-
339
-
340
287
}
341
288
342
289
private void OnExternalPluginUninstallClick ( object sender , RoutedEventArgs e )
0 commit comments