mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove BrowserSetting item in bookmark / Url / Websearch
Remove Releated code (just for build) Adjust Bookmark plugin popup layout and add string
This commit is contained in:
parent
9c86af7c86
commit
ef959d2539
7 changed files with 210 additions and 179 deletions
|
|
@ -1,12 +1,14 @@
|
|||
<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">
|
||||
<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">
|
||||
|
||||
<!--Plugin Info-->
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_name">Browser Bookmarks</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_description">Search your browser bookmarks</system:String>
|
||||
<!-- Plugin Info -->
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_name">Browser Bookmarks</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_plugin_description">Search your browser bookmarks</system:String>
|
||||
|
||||
<!--Settings-->
|
||||
<!-- Settings -->
|
||||
<system:String x:Key="BookmarkDataSetting">Bookmmark Data</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_openBookmarks">Open bookmarks in:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_newWindow">New window</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_settings_newTab">New tab</system:String>
|
||||
|
|
@ -16,7 +18,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_browserbookmark_copyurl_subtitle">Copy the bookmark's url to clipboard</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_loadBrowserFrom">Load Browser From:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserName">Browser Name</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">DataDirectoryPath</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory">Data Directory Path</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_addBrowserBookmark">Add</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_browserbookmark_removeBrowserBookmark">Delete</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -1,38 +1,192 @@
|
|||
<Window x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.CustomBrowserSettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="CustomBrowserSetting" Height="350" Width="600"
|
||||
KeyDown="WindowKeyDown"
|
||||
>
|
||||
<Window
|
||||
x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.CustomBrowserSettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="{DynamicResource BookmarkDataSetting}"
|
||||
Width="500"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
KeyDown="WindowKeyDown"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.DataContext>
|
||||
<local:CustomBrowser/>
|
||||
<local:CustomBrowser />
|
||||
</Window.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="60"/>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Style="{StaticResource TitleBarCloseButtonStyle}">
|
||||
<Path
|
||||
Width="46"
|
||||
Height="32"
|
||||
Data="M 18,11 27,20 M 18,20 27,11"
|
||||
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
||||
StrokeThickness="1">
|
||||
<Path.Style>
|
||||
<Style TargetType="Path">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Path.Style>
|
||||
</Path>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="26,0,26,0">
|
||||
<StackPanel Margin="0,0,0,12">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource BookmarkDataSetting}"
|
||||
TextAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="140"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
|
||||
<TextBox
|
||||
Width="120"
|
||||
Height="30"
|
||||
Margin="50,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,14,0,24" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="140"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
|
||||
<TextBox
|
||||
Width="250"
|
||||
Height="30"
|
||||
Margin="50,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding DataDirectoryPath}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Width="145"
|
||||
Height="30"
|
||||
Margin="0,0,5,0"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Content="{DynamicResource cancel}" />
|
||||
<Button
|
||||
Name="btnConfirm"
|
||||
Width="145"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Style="{StaticResource AccentButtonStyle}">
|
||||
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<!--
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100" />
|
||||
<RowDefinition Height="100" />
|
||||
<RowDefinition Height="60" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="4*" />
|
||||
<ColumnDefinition Width="6*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Browser Name" FontSize="15"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="80 0 0 0"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Data Directory Path" FontSize="15"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="80 0 0 0"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Width="100" Height="30" Margin="50 0 0 0"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DataDirectoryPath}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center" Width="200" Height="30" Margin="50 0 0 0"/>
|
||||
<StackPanel HorizontalAlignment="Center" Grid.Row="2" Orientation="Horizontal" Grid.Column="1" Height="70">
|
||||
<Button Name="btnConfirm" Content="Confirm" Margin="15" Click="ConfirmCancelEditCustomBrowser"/>
|
||||
<Button Content="Cancel" Margin="15" Click="ConfirmCancelEditCustomBrowser"/>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="80,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="15"
|
||||
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="80,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="15"
|
||||
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="50,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Height="30"
|
||||
Margin="50,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding DataDirectoryPath}" />
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Height="70"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Name="btnConfirm"
|
||||
Margin="15"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Content="Confirm" />
|
||||
<Button
|
||||
Margin="15"
|
||||
Click="ConfirmCancelEditCustomBrowser"
|
||||
Content="Cancel" />
|
||||
</StackPanel>
|
||||
-->
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -10,71 +10,12 @@
|
|||
mc:Ignorable="d">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="80" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Grid Grid.Row="0" Margin="30,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="160" />
|
||||
<ColumnDefinition Width="140" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Margin="10,5,0,0"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_openBookmarks}"
|
||||
FontSize="15" />
|
||||
<RadioButton
|
||||
Name="NewWindowBrowser"
|
||||
Grid.Column="1"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newWindow}"
|
||||
IsChecked="{Binding OpenInNewBrowserWindow}" />
|
||||
<RadioButton
|
||||
Name="NewTabInBrowser"
|
||||
Grid.Column="2"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newTab}"
|
||||
IsChecked="{Binding OpenInNewTab, Mode=OneTime}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Height="60"
|
||||
Margin="30,20,0,0"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
Height="28"
|
||||
Margin="10"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_setBrowserFromPath}" />
|
||||
<TextBox
|
||||
x:Name="BrowserPathBox"
|
||||
Width="240"
|
||||
Height="34"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Settings.BrowserPath}"
|
||||
TextWrapping="NoWrap" />
|
||||
<Button
|
||||
x:Name="ViewButton"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
Click="OnChooseClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_choose}"
|
||||
FontSize="14" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Margin="30,20,0,0"
|
||||
Orientation="Vertical">
|
||||
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
|
||||
<TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" />
|
||||
<ListView
|
||||
Name="CustomBrowsers"
|
||||
Grid.Row="2"
|
||||
Height="auto"
|
||||
Margin="10"
|
||||
BorderBrush="DarkGray"
|
||||
|
|
@ -92,12 +33,12 @@
|
|||
</ListView>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="80"
|
||||
Width="110"
|
||||
Margin="10"
|
||||
Click="NewCustomBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
|
||||
<Button
|
||||
Width="80"
|
||||
Width="110"
|
||||
Margin="10"
|
||||
Click="DeleteCustomBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" />
|
||||
|
|
|
|||
|
|
@ -1,29 +1,17 @@
|
|||
<UserControl x:Class="Flow.Launcher.Plugin.Url.SettingsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="500">
|
||||
<UserControl
|
||||
x:Class="Flow.Launcher.Plugin.Url.SettingsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Height="0"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="500"
|
||||
mc:Ignorable="d">
|
||||
<Grid Margin="40,40,10,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
||||
<Label Content="{DynamicResource flowlauncher_plugin_url_open_search_in}" Margin="0 10 15 0" />
|
||||
<RadioButton x:Name="NewWindowBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_new_window}" Click="OnNewBrowserWindowClick" />
|
||||
<RadioButton x:Name="NewTabInBrowser"
|
||||
Content="{DynamicResource flowlauncher_plugin_new_tab}" Click="OnNewTabClick" />
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Top" Grid.Row="1" Height="106" Margin="0 20 0 0">
|
||||
<Label Content="{DynamicResource flowlauncher_plugin_url_plugin_set_tip}" Height="28" Margin="0,0,155,0"
|
||||
HorizontalAlignment="Left" Width="290" />
|
||||
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Height="34" TextWrapping="NoWrap"
|
||||
VerticalAlignment="Top" Width="311" RenderTransformOrigin="0.502,-1.668" TextChanged="OnBrowserPathTextChanged" />
|
||||
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="340,-33,-1,0" Width="100"
|
||||
Height="32" Click="OnChooseClick" FontSize="14"
|
||||
Content="{DynamicResource flowlauncher_plugin_url_plugin_choose}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ namespace Flow.Launcher.Plugin.Url
|
|||
InitializeComponent();
|
||||
_settings = settings;
|
||||
_flowlauncherAPI = flowlauncherAPI;
|
||||
browserPathBox.Text = _settings.BrowserPath;
|
||||
NewWindowBrowser.IsChecked = _settings.OpenInNewBrowserWindow;
|
||||
NewTabInBrowser.IsChecked = !_settings.OpenInNewBrowserWindow;
|
||||
|
||||
}
|
||||
|
||||
private void OnChooseClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -43,7 +41,6 @@ namespace Flow.Launcher.Plugin.Url
|
|||
fileBrowserDialog.CheckPathExists = true;
|
||||
if (fileBrowserDialog.ShowDialog() == true)
|
||||
{
|
||||
browserPathBox.Text = fileBrowserDialog.FileName;
|
||||
_settings.BrowserPath = fileBrowserDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
|
@ -60,7 +57,6 @@ namespace Flow.Launcher.Plugin.Url
|
|||
|
||||
private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
_settings.BrowserPath = browserPathBox.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,59 +37,13 @@
|
|||
</UserControl.Resources>
|
||||
<Grid Margin="14,14,14,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="56" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Margin="14,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal">
|
||||
<Label Margin="0,15,20,0" Content="{DynamicResource flowlauncher_plugin_websearch_open_search_in}" />
|
||||
<RadioButton
|
||||
Name="NewWindowBrowser"
|
||||
Margin="0,0,20,0"
|
||||
Click="OnNewBrowserWindowClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_websearch_new_window}"
|
||||
GroupName="OpenSearchBehaviour" />
|
||||
<RadioButton
|
||||
Name="NewTabInBrowser"
|
||||
Click="OnNewTabClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_websearch_new_tab}"
|
||||
GroupName="OpenSearchBehaviour" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="14,3,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" />
|
||||
<TextBox
|
||||
x:Name="browserPathBox"
|
||||
Width="250"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource BrowserPathBoxStyle}"
|
||||
TextChanged="OnBrowserPathTextChanged" />
|
||||
<Button
|
||||
x:Name="viewButton"
|
||||
Width="80"
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="OnChooseClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_websearch_choose}"
|
||||
FontSize="13" />
|
||||
</StackPanel>
|
||||
<ListView
|
||||
x:Name="SearchSourcesListView"
|
||||
Grid.Row="2"
|
||||
Grid.Row="0"
|
||||
Margin="0,18,0,0"
|
||||
BorderBrush="DarkGray"
|
||||
BorderThickness="1"
|
||||
|
|
@ -146,7 +100,7 @@
|
|||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
|
|
@ -166,7 +120,7 @@
|
|||
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="4"
|
||||
Grid.Row="2"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderBrush="#cecece"
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
_context = context;
|
||||
_settings = viewModel.Settings;
|
||||
DataContext = viewModel;
|
||||
browserPathBox.Text = _settings.BrowserPath;
|
||||
NewWindowBrowser.IsChecked = _settings.OpenInNewBrowser;
|
||||
NewTabInBrowser.IsChecked = !_settings.OpenInNewBrowser;
|
||||
|
||||
}
|
||||
|
||||
private void OnAddSearchSearchClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -81,14 +79,12 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
fileBrowserDialog.CheckPathExists = true;
|
||||
if (fileBrowserDialog.ShowDialog() == true)
|
||||
{
|
||||
browserPathBox.Text = fileBrowserDialog.FileName;
|
||||
_settings.BrowserPath = fileBrowserDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBrowserPathTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
_settings.BrowserPath = browserPathBox.Text;
|
||||
}
|
||||
|
||||
GridViewColumnHeader _lastHeaderClicked = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue