mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #779 from onesounds/AdjustWebsearchPlugin
Adjust websearch plugin & Small Fix for pluginstore PR & Setting Popup Redesign
This commit is contained in:
commit
ddda425e7f
16 changed files with 300 additions and 182 deletions
|
|
@ -1,13 +1,54 @@
|
||||||
<Window x:Class="Flow.Launcher.ActionKeywords"
|
<Window x:Class="Flow.Launcher.ActionKeywords"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="ActionKeywords"
|
Title="{DynamicResource actionKeywordsTitle}"
|
||||||
Icon="Images\app.png"
|
Icon="Images\app.png"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
Loaded="ActionKeyword_OnLoaded"
|
Loaded="ActionKeyword_OnLoaded"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Height="250" Width="500">
|
Height="365" Width="450" Background="#F3F3F3" BorderBrush="#cecece">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition Height="80"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
|
||||||
|
<Grid>
|
||||||
|
<StackPanel>
|
||||||
|
<StackPanel Grid.Row="0" Margin="0 0 0 12">
|
||||||
|
<TextBlock Grid.Column="0" Text="{DynamicResource actionKeywordsTitle}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
|
||||||
|
Margin="0 0 0 0" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock
|
||||||
|
Text="{DynamicResource actionkeyword_tips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="0 18 0 0">
|
||||||
|
<TextBlock FontSize="14" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left" Text="{DynamicResource currentActionKeywords}" />
|
||||||
|
<TextBlock x:Name="tbOldActionKeyword" Grid.Row="0" Grid.Column="1" Margin="14 10 10 10" FontSize="14"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="SemiBold"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock FontSize="14" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left" Text="{DynamicResource newActionKeyword}" />
|
||||||
|
|
||||||
|
<TextBox x:Name="tbAction" Margin="10 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
||||||
|
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="10 0 5 0" Width="100" Height="30"
|
||||||
|
Content="{DynamicResource cancel}" />
|
||||||
|
<Button x:Name="btnDone" Margin="5 0 10 0" Width="100" Height="30" Click="btnDone_OnClick">
|
||||||
|
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
<!--
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition Height="60"/>
|
<RowDefinition Height="60"/>
|
||||||
|
|
@ -40,4 +81,5 @@
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
-->
|
||||||
</Window>
|
</Window>
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
Icon="Images\app.png"
|
Icon="Images\app.png"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="{DynamicResource customeQueryHotkeyTitle}" Height="200" Width="674.766">
|
MouseDown="window_MouseDown"
|
||||||
|
Title="{DynamicResource customeQueryHotkeyTitle}" Height="345" Width="500" Background="#F3F3F3" BorderBrush="#cecece">
|
||||||
<Window.InputBindings>
|
<Window.InputBindings>
|
||||||
<KeyBinding Key="Escape" Command="Close"/>
|
<KeyBinding Key="Escape" Command="Close"/>
|
||||||
</Window.InputBindings>
|
</Window.InputBindings>
|
||||||
|
|
@ -15,29 +16,42 @@
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition Height="80"/>
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
|
||||||
<ColumnDefinition Width="150" />
|
<Grid>
|
||||||
<ColumnDefinition />
|
<StackPanel>
|
||||||
</Grid.ColumnDefinitions>
|
<StackPanel Grid.Row="0" Margin="0 0 0 12">
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
|
<TextBlock Grid.Column="0" Text="{DynamicResource customeQueryHotkeyTitle}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource hotkey}" />
|
Margin="0 0 0 0" />
|
||||||
<flowlauncher:HotkeyControl x:Name="ctlHotkey" Margin="10,0,10,0" Grid.Column="1" VerticalAlignment="Center" Height="32" />
|
</StackPanel>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock
|
||||||
|
Text="{DynamicResource customeQueryHotkeyTips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
|
<StackPanel Orientation="Horizontal" Margin="0 20 0 0">
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource actionKeyword}" />
|
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
|
||||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Grid.Column="1">
|
HorizontalAlignment="Left" Text="{DynamicResource hotkey}" Width="60"/>
|
||||||
<TextBox x:Name="tbAction" Margin="10" Width="400" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<flowlauncher:HotkeyControl x:Name="ctlHotkey" Margin="10,0,10,0" Grid.Column="1" VerticalAlignment="Center" Height="32" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="200"/>
|
||||||
<Button x:Name="btnTestActionKeyword" Padding="10 5 10 5" Height="30" Click="BtnTestActionKeyword_OnClick"
|
<TextBlock Margin="10" FontSize="14" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left" Text="{DynamicResource actionKeyword}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="0 0 0 0">
|
||||||
|
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Width="60"
|
||||||
|
HorizontalAlignment="Left" Text="{DynamicResource customQuery}" />
|
||||||
|
<TextBox x:Name="tbAction" Margin="10" Width="250" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
|
<Button x:Name="btnTestActionKeyword" Padding="10 5 10 5" Height="30" Click="BtnTestActionKeyword_OnClick"
|
||||||
Content="{DynamicResource preview}" />
|
Content="{DynamicResource preview}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="1">
|
</Grid>
|
||||||
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="10 0 10 0" Width="80" Height="32"
|
</Border>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
||||||
|
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="10 0 5 0" Width="100" Height="32"
|
||||||
Content="{DynamicResource cancel}" />
|
Content="{DynamicResource cancel}" />
|
||||||
<Button x:Name="btnAdd" Margin="10 0 10 0" Width="80" Height="32" Click="btnAdd_OnClick">
|
<Button x:Name="btnAdd" Margin="5 0 10 0" Width="100" Height="32" Click="btnAdd_OnClick">
|
||||||
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace Flow.Launcher
|
namespace Flow.Launcher
|
||||||
{
|
{
|
||||||
|
|
@ -99,5 +100,15 @@ namespace Flow.Launcher
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
|
||||||
|
{
|
||||||
|
TextBox textBox = Keyboard.FocusedElement as TextBox;
|
||||||
|
if (textBox != null)
|
||||||
|
{
|
||||||
|
TraversalRequest tRequest = new TraversalRequest(FocusNavigationDirection.Next);
|
||||||
|
textBox.MoveFocus(tRequest);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,18 @@
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="300" d:DesignWidth="300">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="125" />
|
<ColumnDefinition Width="200"/>
|
||||||
<ColumnDefinition Width="160" />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock x:Name="tbMsg" Visibility="Hidden" Margin="8 0 0 0" VerticalAlignment="Center" Grid.Column="0" HorizontalAlignment="Right"/>
|
<Popup x:Name="popup" AllowDrop="True" PopupAnimation="Fade" PlacementTarget="{Binding ElementName=tbHotkey}" IsOpen="{Binding IsKeyboardFocused, ElementName=tbHotkey, Mode=OneWay}" StaysOpen="True" AllowsTransparency="True" Placement="Top" VerticalOffset="-5">
|
||||||
<TextBox x:Name="tbHotkey" TabIndex="100" VerticalContentAlignment="Center" Grid.Column="1"
|
<Border Background="#f6f6f6" BorderBrush="#cecece" BorderThickness="1" CornerRadius="6" Width="120" Height="30">
|
||||||
PreviewKeyDown="TbHotkey_OnPreviewKeyDown" input:InputMethod.IsInputMethodEnabled="False" Margin="5 0 18 0"/>
|
<TextBlock x:Name="tbMsg" FontSize="13" FontWeight="SemiBold" Visibility="Visible" Margin="0 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||||
|
press key
|
||||||
|
</TextBlock>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
|
||||||
|
<TextBox x:Name="tbHotkey" TabIndex="100" VerticalContentAlignment="Center"
|
||||||
|
PreviewKeyDown="TbHotkey_OnPreviewKeyDown" input:InputMethod.IsInputMethodEnabled="False" Margin="0 0 18 0">
|
||||||
|
</TextBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
|
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
|
||||||
<system:String x:Key="enable">On</system:String>
|
<system:String x:Key="enable">On</system:String>
|
||||||
<system:String x:Key="disable">Off</system:String>
|
<system:String x:Key="disable">Off</system:String>
|
||||||
|
<system:String x:Key="actionKeywordsTitle">Action keyword Setting</system:String>
|
||||||
<system:String x:Key="actionKeywords">Action keyword</system:String>
|
<system:String x:Key="actionKeywords">Action keyword</system:String>
|
||||||
<system:String x:Key="currentActionKeywords">Current action keyword:</system:String>
|
<system:String x:Key="currentActionKeywords">Current action keyword:</system:String>
|
||||||
<system:String x:Key="newActionKeyword">New action keyword:</system:String>
|
<system:String x:Key="newActionKeyword">New action keyword:</system:String>
|
||||||
|
|
@ -68,7 +69,8 @@
|
||||||
|
|
||||||
<!--Setting Theme-->
|
<!--Setting Theme-->
|
||||||
<system:String x:Key="theme">Theme</system:String>
|
<system:String x:Key="theme">Theme</system:String>
|
||||||
<system:String x:Key="browserMoreThemes">Browse for more themes</system:String>
|
<system:String x:Key="browserMoreThemes">Theme Gallery</system:String>
|
||||||
|
<system:String x:Key="howToCreateTheme">How to create a theme</system:String>
|
||||||
<system:String x:Key="hiThere">Hi There</system:String>
|
<system:String x:Key="hiThere">Hi There</system:String>
|
||||||
<system:String x:Key="queryBoxFont">Query Box Font</system:String>
|
<system:String x:Key="queryBoxFont">Query Box Font</system:String>
|
||||||
<system:String x:Key="resultItemFont">Result Item Font</system:String>
|
<system:String x:Key="resultItemFont">Result Item Font</system:String>
|
||||||
|
|
@ -145,10 +147,11 @@
|
||||||
<system:String x:Key="newActionKeywordsHasBeenAssigned">This new Action Keyword is already assigned to another plugin, please choose a different one</system:String>
|
<system:String x:Key="newActionKeywordsHasBeenAssigned">This new Action Keyword is already assigned to another plugin, please choose a different one</system:String>
|
||||||
<system:String x:Key="success">Success</system:String>
|
<system:String x:Key="success">Success</system:String>
|
||||||
<system:String x:Key="completedSuccessfully">Completed successfully</system:String>
|
<system:String x:Key="completedSuccessfully">Completed successfully</system:String>
|
||||||
<system:String x:Key="actionkeyword_tips">Use * if you don't want to specify an action keyword</system:String>
|
<system:String x:Key="actionkeyword_tips">Enter the action keyword you need to start the plug-in. Use * if you don't want to specify an action keyword. In the case, The plug-in works without keywords. </system:String>
|
||||||
|
|
||||||
<!--Custom Query Hotkey Dialog-->
|
<!--Custom Query Hotkey Dialog-->
|
||||||
<system:String x:Key="customeQueryHotkeyTitle">Custom Plugin Hotkey</system:String>
|
<system:String x:Key="customeQueryHotkeyTitle">Custom Query Hotkey</system:String>
|
||||||
|
<system:String x:Key="customeQueryHotkeyTips">Press the custom hotkey to automatically insert the specified query.</system:String>
|
||||||
<system:String x:Key="preview">Preview</system:String>
|
<system:String x:Key="preview">Preview</system:String>
|
||||||
<system:String x:Key="hotkeyIsNotUnavailable">Hotkey is unavailable, please select a new hotkey</system:String>
|
<system:String x:Key="hotkeyIsNotUnavailable">Hotkey is unavailable, please select a new hotkey</system:String>
|
||||||
<system:String x:Key="invalidPluginHotkey">Invalid plugin hotkey</system:String>
|
<system:String x:Key="invalidPluginHotkey">Invalid plugin hotkey</system:String>
|
||||||
|
|
|
||||||
|
|
@ -6,52 +6,45 @@
|
||||||
xmlns:local="clr-namespace:Flow.Launcher"
|
xmlns:local="clr-namespace:Flow.Launcher"
|
||||||
Loaded="PriorityChangeWindow_Loaded"
|
Loaded="PriorityChangeWindow_Loaded"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
ResizeMode="NoResize"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="{DynamicResource changePriorityWindow}" Height="400" Width="350" ResizeMode="NoResize" Background="#f3f3f3">
|
Title="{DynamicResource changePriorityWindow}" Height="365" Width="350" Background="#F3F3F3" BorderBrush="#cecece">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition Height="80"/>
|
<RowDefinition Height="80"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
|
||||||
<ColumnDefinition />
|
<Grid>
|
||||||
</Grid.ColumnDefinitions>
|
<StackPanel>
|
||||||
<StackPanel Grid.Row="0" VerticalAlignment="Center">
|
<StackPanel Grid.Row="0" Margin="0 0 0 12">
|
||||||
<TextBlock Grid.Column="0" FontFamily="/Resources/#Segoe Fluent Icons" FontSize="40" TextAlignment="Center"
|
<TextBlock Grid.Column="0" Text="{DynamicResource changePriorityWindow}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
|
||||||
Margin="0 0 0 0">
|
Margin="0 0 0 0" />
|
||||||

|
</StackPanel>
|
||||||
</TextBlock>
|
<StackPanel>
|
||||||
</StackPanel>
|
<TextBlock
|
||||||
|
Text="{DynamicResource priority_tips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
|
||||||
<Border Background="#ffffff" Grid.Row="1" BorderBrush="#cecece" BorderThickness="1" Margin="14 0 14 0" Padding="0 14 0 0" CornerRadius="5">
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" >
|
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="0 28 0 0">
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
|
||||||
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left" Text="{DynamicResource currentPriority}" />
|
HorizontalAlignment="Left" Text="{DynamicResource currentPriority}" />
|
||||||
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="14 0 10 0" FontSize="14"
|
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="10 0 10 0" FontSize="14"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" />
|
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
|
<StackPanel Orientation="Horizontal" Margin="0 10 0 0">
|
||||||
<TextBlock FontSize="14" VerticalAlignment="Center"
|
<TextBlock FontSize="14" VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource newPriority}" />
|
HorizontalAlignment="Right" Text="{DynamicResource newPriority}" />
|
||||||
<TextBox x:Name="tbAction" Margin="14 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
<TextBox x:Name="tbAction" Margin="10 0 15 0" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<StackPanel Grid.Row="2" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
||||||
<TextBlock Foreground="Gray"
|
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 5 0" Width="100" Height="30"
|
||||||
Text="{DynamicResource priority_tips}" TextWrapping="WrapWithOverflow" TextAlignment="Center"
|
|
||||||
Margin="20,0,20,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="3" Grid.Column="1">
|
|
||||||
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 10 0" Width="80" Height="30"
|
|
||||||
Content="{DynamicResource cancel}" />
|
Content="{DynamicResource cancel}" />
|
||||||
<Button x:Name="btnDone" Margin="10 0 0 0" Width="80" Height="30" Click="btnDone_OnClick">
|
<Button x:Name="btnDone" Margin="5 0 0 0" Width="100" Height="30" Click="btnDone_OnClick">
|
||||||
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
Height="700" Width="1000"
|
Height="700" Width="1000"
|
||||||
MinWidth="900"
|
MinWidth="900"
|
||||||
MinHeight="600"
|
MinHeight="600"
|
||||||
|
MouseDown="window_MouseDown"
|
||||||
Loaded="OnLoaded"
|
Loaded="OnLoaded"
|
||||||
Closed="OnClosed"
|
Closed="OnClosed"
|
||||||
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}">
|
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}">
|
||||||
|
|
@ -645,6 +646,7 @@
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Column="0" Grid.Row="1" Background="#f3f3f3" Padding="0 0 0 0">
|
<Border Grid.Column="0" Grid.Row="1" Background="#f3f3f3" Padding="0 0 0 0">
|
||||||
<ListBox SelectedItem="{Binding SelectedPlugin}"
|
<ListBox SelectedItem="{Binding SelectedPlugin}"
|
||||||
|
ScrollViewer.CanContentScroll="False"
|
||||||
ItemsSource="{Binding PluginViewModels}"
|
ItemsSource="{Binding PluginViewModels}"
|
||||||
Margin="5, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
Margin="5, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
ItemContainerStyle="{StaticResource PluginList}"
|
ItemContainerStyle="{StaticResource PluginList}"
|
||||||
|
|
@ -1176,7 +1178,7 @@
|
||||||
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Right">
|
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Right">
|
||||||
<Hyperlink NavigateUri="{Binding Theme, Mode=OneWay}"
|
<Hyperlink NavigateUri="{Binding Theme, Mode=OneWay}"
|
||||||
RequestNavigate="OnRequestNavigate">
|
RequestNavigate="OnRequestNavigate">
|
||||||
<Run Text="{DynamicResource browserMoreThemes}" />
|
<Run Text="{DynamicResource howToCreateTheme}" />
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
@ -1582,4 +1584,4 @@
|
||||||
</Border>
|
</Border>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
|
||||||
|
|
@ -281,5 +281,15 @@ namespace Flow.Launcher
|
||||||
API.ShowMainWindow();
|
API.ShowMainWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
|
||||||
|
{
|
||||||
|
TextBox textBox = Keyboard.FocusedElement as TextBox;
|
||||||
|
if (textBox != null)
|
||||||
|
{
|
||||||
|
TraversalRequest tRequest = new TraversalRequest(FocusNavigationDirection.Next);
|
||||||
|
textBox.MoveFocus(tRequest);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -272,7 +272,7 @@ namespace Flow.Launcher.ViewModel
|
||||||
|
|
||||||
#region theme
|
#region theme
|
||||||
|
|
||||||
public static string Theme => @"http://www.wox.one/theme/builder";
|
public static string Theme => @"https://flow-launcher.github.io/docs/#/how-to-create-a-theme";
|
||||||
|
|
||||||
public string SelectedTheme
|
public string SelectedTheme
|
||||||
{
|
{
|
||||||
|
|
|
||||||
BIN
Plugins/Flow.Launcher.Plugin.WebSearch/Images/netflix.png
Normal file
BIN
Plugins/Flow.Launcher.Plugin.WebSearch/Images/netflix.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Plugins/Flow.Launcher.Plugin.WebSearch/Images/youtubemusic.png
Normal file
BIN
Plugins/Flow.Launcher.Plugin.WebSearch/Images/youtubemusic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
|
|
@ -2,6 +2,7 @@
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||||
|
|
||||||
|
<system:String x:Key="flowlauncher_plugin_websearch_window_title">Search Source Setting</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_open_search_in">Open search in:</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_open_search_in">Open search in:</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_new_window">New Window</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_new_window">New Window</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_new_tab">New Tab</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_new_tab">New Tab</system:String>
|
||||||
|
|
@ -14,9 +15,14 @@
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_action_keyword">Action Keyword</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_action_keyword">Action Keyword</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_url">URL</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_url">URL</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_search">Search</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_search">Search</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_enable_suggestion">Search suggestions</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_enable_suggestion">Use Search Query Autocomplete: </system:String>
|
||||||
|
<system:String x:Key="flowlauncher_plugin_websearch_enable_suggestion_provider">Autocomplete Data from: </system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_pls_select_web_search">Please select a web search</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_pls_select_web_search">Please select a web search</system:String>
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_delete_warning">Are you sure you want to delete {0}?</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_delete_warning">Are you sure you want to delete {0}?</system:String>
|
||||||
|
<system:String x:Key="flowlauncher_plugin_websearch_guide_1">If you have a web search service you want to use, you can add it to Flow. For example, you can follow the url format in the address bar if you want to search 'casino' on Netflix: "https://www.netflix.com/search?q=Casino". To do this, change the search term 'Casino' as follows.</system:String>
|
||||||
|
<system:String x:Key="flowlauncher_plugin_websearch_guide_2">https://www.netflix.com/search?q={q}</system:String>
|
||||||
|
<system:String x:Key="flowlauncher_plugin_websearch_guide_3">Add it to the URL section below. You can now search Netflix with Flow using any search terms.</system:String>
|
||||||
|
|
||||||
|
|
||||||
<!--web search edit-->
|
<!--web search edit-->
|
||||||
<system:String x:Key="flowlauncher_plugin_websearch_title">Title</system:String>
|
<system:String x:Key="flowlauncher_plugin_websearch_title">Title</system:String>
|
||||||
|
|
|
||||||
|
|
@ -4,59 +4,71 @@
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:vm="clr-namespace:Flow.Launcher.Plugin.WebSearch"
|
xmlns:vm="clr-namespace:Flow.Launcher.Plugin.WebSearch"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" ResizeMode="NoResize"
|
||||||
ResizeMode="NoResize"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="Search Source Setting" Height="400" Width="500"
|
Title="{DynamicResource flowlauncher_plugin_websearch_window_title}" Height="590" Width="550"
|
||||||
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}">
|
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}" Background="#F3F3F3" BorderBrush="#cecece">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition Height="80"/>
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition Height="60" />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
|
||||||
<ColumnDefinition Width="120" />
|
<Grid>
|
||||||
<ColumnDefinition />
|
<StackPanel>
|
||||||
</Grid.ColumnDefinitions>
|
<StackPanel Grid.Row="0" Margin="0 0 0 12">
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
|
<TextBlock Grid.Column="0" Text="{DynamicResource flowlauncher_plugin_websearch_window_title}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource flowlauncher_plugin_websearch_title}" />
|
Margin="0 0 0 0" />
|
||||||
<TextBox Text="{Binding SearchSource.Title}" Margin="10" Grid.Row="0" Width="300" Grid.Column="1"
|
</StackPanel>
|
||||||
VerticalAlignment="Center"
|
<StackPanel Orientation="Vertical">
|
||||||
HorizontalAlignment="Left" />
|
<TextBlock
|
||||||
|
Text="{DynamicResource flowlauncher_plugin_websearch_guide_1}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
|
<TextBlock
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource flowlauncher_plugin_websearch_url}" />
|
Text="{DynamicResource flowlauncher_plugin_websearch_guide_2}" FontWeight="SemiBold" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Center" Margin="0 12 0 12"/>
|
||||||
<TextBox Text="{Binding SearchSource.Url}" Margin="10" Grid.Row="1" Width="300" Grid.Column="1"
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
Text="{DynamicResource flowlauncher_plugin_websearch_guide_3}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left" Margin="0 0 0 14"/>
|
||||||
HorizontalAlignment="Left" />
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center"
|
<TextBlock Margin="10" FontSize="14" VerticalAlignment="Center" Width="100"
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
|
HorizontalAlignment="Stretch" Text="{DynamicResource flowlauncher_plugin_websearch_title}" />
|
||||||
<TextBox Text="{Binding SearchSource.ActionKeyword}" Margin="10" Grid.Row="2" Width="300" Grid.Column="1"
|
<TextBox Text="{Binding SearchSource.Title}" Margin="10" Width="330"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left" />
|
VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"
|
</StackPanel>
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource flowlauncher_plugin_websearch_enable}" />
|
<StackPanel Orientation="Horizontal">
|
||||||
<CheckBox IsChecked="{Binding SearchSource.Enabled}" Margin="10" Grid.Row="3" Grid.Column="1"
|
<TextBlock Margin="10" FontSize="14" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_icon}" Width="100" />
|
||||||
|
<Button Click="OnSelectIconClick" Height="35" VerticalAlignment="Center" Margin="10 0 0 0"
|
||||||
<TextBlock Margin="10" FontSize="14" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"
|
Content="{DynamicResource flowlauncher_plugin_websearch_select_icon}" />
|
||||||
HorizontalAlignment="Right" Text="{DynamicResource flowlauncher_plugin_websearch_icon}" />
|
<Image Name="imgPreviewIcon" Width="24" Height="24" Margin="14 0 0 0" VerticalAlignment="Center"/>
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1" Margin="10">
|
</StackPanel>
|
||||||
<Image Name="imgPreviewIcon" Width="24" Height="24" Margin="0 0 20 0" />
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button Click="OnSelectIconClick" Height="35"
|
<TextBlock Margin="10" FontSize="14" VerticalAlignment="Center" Width="100"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_select_icon}" />
|
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_url}" />
|
||||||
</StackPanel>
|
<TextBox Text="{Binding SearchSource.Url}" Margin="10" Grid.Row="1" Width="330" Grid.Column="1"
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="5" Grid.Column="1">
|
VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Margin="10" FontSize="14" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Width="100"
|
||||||
|
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
|
||||||
|
<TextBox Text="{Binding SearchSource.ActionKeyword}" Margin="10 0 10 0" Grid.Row="2" Width="330" Grid.Column="1"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Margin="10" FontSize="14" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Width="100"
|
||||||
|
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_enable}" />
|
||||||
|
<CheckBox IsChecked="{Binding SearchSource.Enabled}" Margin="10" Grid.Row="3" Grid.Column="1"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
||||||
<Button Click="OnCancelButtonClick"
|
<Button Click="OnCancelButtonClick"
|
||||||
Margin="10 0 10 0" Width="80" Height="35"
|
Margin="10 0 5 0" Width="100" Height="35"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_cancel}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_cancel}" />
|
||||||
<Button Click="OnConfirmButtonClick"
|
<Button Click="OnConfirmButtonClick"
|
||||||
Margin="10 0 10 0" Width="80" Height="35"
|
Margin="5 0 10 0" Width="100" Height="35"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_confirm}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_confirm}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
|
|
@ -32,42 +32,31 @@
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid Margin="14">
|
<Grid Margin="14 14 14 0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="30" />
|
|
||||||
<RowDefinition Height="48" />
|
<RowDefinition Height="48" />
|
||||||
<RowDefinition Height="45" />
|
<RowDefinition Height="40" />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
|
<RowDefinition Height="56"/>
|
||||||
<RowDefinition Height="50" />
|
<RowDefinition Height="50" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
<StackPanel Grid.Row="0" HorizontalAlignment="Left" Orientation="Horizontal" Margin="14 0 0 0">
|
||||||
<CheckBox IsChecked="{Binding Settings.EnableSuggestion}"
|
|
||||||
Margin="0 0 20 0"
|
|
||||||
Name="EnableSuggestion"
|
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}" />
|
|
||||||
<ComboBox ItemsSource="{Binding Settings.Suggestions}"
|
|
||||||
SelectedItem="{Binding Settings.SelectedSuggestion}"
|
|
||||||
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}" />
|
|
||||||
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal">
|
|
||||||
<Label Content="{DynamicResource flowlauncher_plugin_websearch_open_search_in}" Margin="0 15 20 0"/>
|
<Label Content="{DynamicResource flowlauncher_plugin_websearch_open_search_in}" Margin="0 15 20 0"/>
|
||||||
<RadioButton Name="NewWindowBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_window}" Click="OnNewBrowserWindowClick"
|
<RadioButton Name="NewWindowBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_window}" Click="OnNewBrowserWindowClick"
|
||||||
Margin="0 0 20 0"/>
|
Margin="0 0 20 0"/>
|
||||||
<RadioButton Name="NewTabInBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_tab}" Click="OnNewTabClick" />
|
<RadioButton Name="NewTabInBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_tab}" Click="OnNewTabClick" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Grid.Row="2" HorizontalAlignment="Left" Margin="0 3 0 0">
|
<StackPanel Grid.Row="1" HorizontalAlignment="Left" Margin="14 3 0 0" Orientation="Horizontal">
|
||||||
<Label Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" Margin="0 0 350 0" HorizontalAlignment="Left" Width="140"/>
|
<Label Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" Margin="0 0 10 0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||||
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Margin="160,-22,0,0" TextChanged="OnBrowserPathTextChanged"
|
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Margin="0,0,0,0" TextChanged="OnBrowserPathTextChanged"
|
||||||
Width="214" Style="{StaticResource BrowserPathBoxStyle}"/>
|
Width="250" Style="{StaticResource BrowserPathBoxStyle}"/>
|
||||||
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="400,-30,0,0"
|
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="10,0,0,0"
|
||||||
Click="OnChooseClick" FontSize="13" Content="{DynamicResource flowlauncher_plugin_websearch_choose}" Width="80"/>
|
Click="OnChooseClick" FontSize="13" Content="{DynamicResource flowlauncher_plugin_websearch_choose}" Width="80"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ListView ItemsSource="{Binding Settings.SearchSources}"
|
<ListView Margin="0 18 0 0" ItemsSource="{Binding Settings.SearchSources}"
|
||||||
SelectedItem="{Binding Settings.SelectedSearchSource}"
|
SelectedItem="{Binding Settings.SelectedSearchSource}"
|
||||||
x:Name="SearchSourcesListView"
|
x:Name="SearchSourcesListView"
|
||||||
|
Grid.Row="2"
|
||||||
Grid.Row="3"
|
|
||||||
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"
|
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"
|
||||||
BorderBrush="DarkGray"
|
BorderBrush="DarkGray"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
|
|
@ -75,43 +64,65 @@
|
||||||
MouseDoubleClick="MouseDoubleClickItem">
|
MouseDoubleClick="MouseDoubleClickItem">
|
||||||
<ListView.View>
|
<ListView.View>
|
||||||
<GridView>
|
<GridView>
|
||||||
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_title}"
|
<GridViewColumn Width="50">
|
||||||
DisplayMemberBinding="{Binding Title}"
|
|
||||||
Width="130">
|
|
||||||
<GridViewColumn.CellTemplate>
|
<GridViewColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Title}"/>
|
<Image Source="{Binding Path=IconPath}" Width="20" Height="20" Margin="6 0 0 0"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.CellTemplate>
|
||||||
</GridViewColumn>
|
</GridViewColumn>
|
||||||
|
|
||||||
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}"
|
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}"
|
||||||
DisplayMemberBinding="{Binding ActionKeyword}"
|
DisplayMemberBinding="{Binding ActionKeyword}"
|
||||||
Width="137">
|
Width="130">
|
||||||
<GridViewColumn.CellTemplate>
|
<GridViewColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding ActionKeyword}"/>
|
<TextBlock Text="{Binding ActionKeyword}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.CellTemplate>
|
||||||
</GridViewColumn>
|
</GridViewColumn>
|
||||||
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_url}"
|
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_title}"
|
||||||
DisplayMemberBinding="{Binding Url}"
|
DisplayMemberBinding="{Binding Title}" Width="350">
|
||||||
Width="auto">
|
|
||||||
<GridViewColumn.CellTemplate>
|
<GridViewColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Url}"/>
|
<TextBlock Text="{Binding Title}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_enable}"
|
||||||
|
DisplayMemberBinding="{Binding Enabled}"
|
||||||
|
Width="80">
|
||||||
|
<GridViewColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Enabled}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.CellTemplate>
|
||||||
</GridViewColumn>
|
</GridViewColumn>
|
||||||
</GridView>
|
</GridView>
|
||||||
</ListView.View>
|
</ListView.View>
|
||||||
</ListView>
|
</ListView>
|
||||||
<StackPanel Grid.Row="4" HorizontalAlignment="Right" Orientation="Horizontal">
|
<StackPanel Grid.Row="3" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
<Button Click="OnDeleteSearchSearchClick" Width="100" Margin="10"
|
<Button Click="OnDeleteSearchSearchClick" Width="100" Margin="10"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_delete}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_delete}" />
|
||||||
<Button Click="OnEditSearchSourceClick" Width="100" Margin="10"
|
<Button Click="OnEditSearchSourceClick" Width="100" Margin="10"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_edit}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_edit}" />
|
||||||
<Button Click="OnAddSearchSearchClick" Width="100" Margin="10 10 10 10"
|
<Button Click="OnAddSearchSearchClick" Width="100" Margin="10 10 0 10"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<Border BorderThickness="0 1 0 0" Grid.Row="4" Margin="0 0 0 0" BorderBrush="#cecece" HorizontalAlignment="Stretch">
|
||||||
|
<DockPanel HorizontalAlignment="Right" Margin="0 14 0 0">
|
||||||
|
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
|
||||||
|
<Label Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion_provider}" Margin="14 0 10 0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding Settings.Suggestions}" VerticalAlignment="Center"
|
||||||
|
SelectedItem="{Binding Settings.SelectedSuggestion}"
|
||||||
|
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}" Margin="0 0 20 0" FontSize="11" Height="30"/>
|
||||||
|
<Label Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}" Margin="0 0 10 0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox IsChecked="{Binding Settings.EnableSuggestion}"
|
||||||
|
Margin="0 0 0 0"
|
||||||
|
Name="EnableSuggestion"/>
|
||||||
|
</StackPanel>
|
||||||
|
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"Name": "Web Searches",
|
"Name": "Web Searches",
|
||||||
"Description": "Provide the web search ability",
|
"Description": "Provide the web search ability",
|
||||||
"Author": "qianlifeng",
|
"Author": "qianlifeng",
|
||||||
"Version": "1.4.0",
|
"Version": "1.4.1",
|
||||||
"Language": "csharp",
|
"Language": "csharp",
|
||||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||||
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
|
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,48 @@
|
||||||
"Url": "https://www.google.com/search?q={q}",
|
"Url": "https://www.google.com/search?q={q}",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Title": "Youtube",
|
||||||
|
"ActionKeyword": "youtube",
|
||||||
|
"IconPath": "Images\\youtube.png",
|
||||||
|
"Url": "http://www.youtube.com/results?search_query={q}",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Title": "Netflix",
|
||||||
|
"ActionKeyword": "netflix",
|
||||||
|
"IconPath": "Images\\netflix.png",
|
||||||
|
"Url": "https://www.netflix.com/search?q={q}",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Title": "Google Translate",
|
||||||
|
"ActionKeyword": "translate",
|
||||||
|
"IconPath": "Images\\google_translate.png",
|
||||||
|
"Url": "http://translate.google.com/#auto|en|{q}",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Title": "Gmail",
|
||||||
|
"ActionKeyword": "gmail",
|
||||||
|
"IconPath": "Images\\gmail.png",
|
||||||
|
"Url": "https://mail.google.com/mail/ca/u/0/#apps/{q}",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Title": "Google Drive",
|
||||||
|
"ActionKeyword": "drive",
|
||||||
|
"IconPath": "Images\\google_drive.png",
|
||||||
|
"Url": "http://drive.google.com/?hl=en&tab=bo#search/{q}",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Title": "Youtube Music",
|
||||||
|
"ActionKeyword": "ytmusic",
|
||||||
|
"IconPath": "Images\\youtubemusic.png",
|
||||||
|
"Url": "https://music.youtube.com/search?q={q}",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Title": "Wikipedia",
|
"Title": "Wikipedia",
|
||||||
"ActionKeyword": "wiki",
|
"ActionKeyword": "wiki",
|
||||||
|
|
@ -14,13 +56,6 @@
|
||||||
"Url": "http://en.wikipedia.org/wiki/{q}",
|
"Url": "http://en.wikipedia.org/wiki/{q}",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Title": "FindIcon",
|
|
||||||
"ActionKeyword": "findicon",
|
|
||||||
"IconPath": "Images\\pictures.png",
|
|
||||||
"Url": "http://findicons.com/search/{q}",
|
|
||||||
"Enabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Title": "Facebook",
|
"Title": "Facebook",
|
||||||
"ActionKeyword": "facebook",
|
"ActionKeyword": "facebook",
|
||||||
|
|
@ -42,13 +77,6 @@
|
||||||
"Url": "http://maps.google.com/maps?q={q}",
|
"Url": "http://maps.google.com/maps?q={q}",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Title": "Google Translate",
|
|
||||||
"ActionKeyword": "translate",
|
|
||||||
"IconPath": "Images\\google_translate.png",
|
|
||||||
"Url": "http://translate.google.com/#auto|en|{q}",
|
|
||||||
"Enabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Title": "Duckduckgo",
|
"Title": "Duckduckgo",
|
||||||
"ActionKeyword": "duckduckgo",
|
"ActionKeyword": "duckduckgo",
|
||||||
|
|
@ -70,20 +98,6 @@
|
||||||
"Url": "https://gist.github.com/search?q={q}",
|
"Url": "https://gist.github.com/search?q={q}",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Title": "Gmail",
|
|
||||||
"ActionKeyword": "gmail",
|
|
||||||
"IconPath": "Images\\gmail.png",
|
|
||||||
"Url": "https://mail.google.com/mail/ca/u/0/#apps/{q}",
|
|
||||||
"Enabled": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Title": "Google Drive",
|
|
||||||
"ActionKeyword": "drive",
|
|
||||||
"IconPath": "Images\\google_drive.png",
|
|
||||||
"Url": "http://drive.google.com/?hl=en&tab=bo#search/{q}",
|
|
||||||
"Enabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Title": "Wolframalpha",
|
"Title": "Wolframalpha",
|
||||||
"ActionKeyword": "wolframalpha",
|
"ActionKeyword": "wolframalpha",
|
||||||
|
|
@ -112,13 +126,6 @@
|
||||||
"Url": "https://www.google.com/search?q={q}&tbm=isch",
|
"Url": "https://www.google.com/search?q={q}&tbm=isch",
|
||||||
"Enabled": true
|
"Enabled": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Title": "Youtube",
|
|
||||||
"ActionKeyword": "youtube",
|
|
||||||
"IconPath": "Images\\youtube.png",
|
|
||||||
"Url": "http://www.youtube.com/results?search_query={q}",
|
|
||||||
"Enabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Title": "Bing",
|
"Title": "Bing",
|
||||||
"ActionKeyword": "bing",
|
"ActionKeyword": "bing",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue