mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
show Explorer action keywords on UI
This commit is contained in:
parent
7ad0071117
commit
bad007c008
3 changed files with 40 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
|
|
@ -13,11 +13,11 @@
|
|||
<system:String x:Key="plugin_explorer_delete">Delete</system:String>
|
||||
<system:String x:Key="plugin_explorer_edit">Edit</system:String>
|
||||
<system:String x:Key="plugin_explorer_add">Add</system:String>
|
||||
<system:String x:Key="plugin_explorer_manageactionkeywords_header">Customise Action Keywords</system:String>
|
||||
<system:String x:Key="plugin_explorer_quickfolderaccess_header">Quick Folder Access Paths</system:String>
|
||||
<system:String x:Key="plugin_explorer_indexsearchexcludedpaths_header">Index Search Excluded Paths</system:String>
|
||||
<system:String x:Key="plugin_explorer_manageindexoptions">Indexing Options</system:String>
|
||||
|
||||
|
||||
<!--Plugin Infos-->
|
||||
<system:String x:Key="plugin_explorer_plugin_name">Explorer</system:String>
|
||||
<system:String x:Key="plugin_explorer_plugin_description">Search and manage files and folders. Explorer utilises Windows Index Search</system:String>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,16 @@
|
|||
Text="{Binding Nickname, Mode=OneTime}"
|
||||
Margin="0,5,0,5" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ListViewActionKeywords">
|
||||
<Grid>
|
||||
<TextBlock
|
||||
Text="{Binding Description, Mode=OneTime}"
|
||||
Margin="0,5,0,0" />
|
||||
<TextBlock
|
||||
Text="{Binding Keyword, Mode=OneTime}"
|
||||
Margin="150,5,0,0" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
|
|
@ -25,8 +35,14 @@
|
|||
</Grid.RowDefinitions>
|
||||
<ScrollViewer Margin="20 35 0 0" HorizontalScrollBarVisibility="Hidden" Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<Expander Name="expActionKeywords" Header="{DynamicResource plugin_explorer_manageactionkeywords_header}"
|
||||
Expanded="expActionKeywords_Click" Collapsed="expActionKeywords_Click">
|
||||
<ListView x:Name="lbxActionKeywords"
|
||||
ItemTemplate="{StaticResource ListViewActionKeywords}"/>
|
||||
</Expander>
|
||||
<Expander Name="expFolderLinks" Header="{DynamicResource plugin_explorer_quickfolderaccess_header}"
|
||||
Expanded="expFolderLinks_Click" Collapsed="expFolderLinks_Click">
|
||||
Expanded="expFolderLinks_Click" Collapsed="expFolderLinks_Click"
|
||||
Margin="0 10 0 0">
|
||||
<ListView
|
||||
x:Name="lbxFolderLinks" AllowDrop="True"
|
||||
Drop="lbxFolders_Drop"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,13 @@ namespace Flow.Launcher.Plugin.Explorer.Views
|
|||
|
||||
lbxExcludedPaths.ItemsSource = this.viewModel.Settings.IndexSearchExcludedSubdirectoryPaths;
|
||||
|
||||
var actionKeywordsListView = new List<ActionKeywordView>();
|
||||
|
||||
actionKeywordsListView.Add(new ActionKeywordView() { Description = "Search Activation:", Keyword = this.viewModel.Settings.SearchActionKeyword });
|
||||
actionKeywordsListView.Add(new ActionKeywordView() { Description = "File Content Search:", Keyword = this.viewModel.Settings.FileContentSearchActionKeyword });
|
||||
|
||||
lbxActionKeywords.ItemsSource = actionKeywordsListView;
|
||||
|
||||
RefreshView();
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +84,13 @@ namespace Flow.Launcher.Plugin.Explorer.Views
|
|||
lbxFolderLinks.Items.Refresh();
|
||||
|
||||
lbxExcludedPaths.Items.Refresh();
|
||||
|
||||
lbxActionKeywords.Items.Refresh();
|
||||
}
|
||||
|
||||
private void expActionKeywords_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void expFolderLinks_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -242,4 +256,11 @@ namespace Flow.Launcher.Plugin.Explorer.Views
|
|||
viewModel.OpenWindowsIndexingOptions();
|
||||
}
|
||||
}
|
||||
|
||||
public class ActionKeywordView
|
||||
{
|
||||
public string Description { get; set; }
|
||||
|
||||
public string Keyword { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue