-
-
Notifications
You must be signed in to change notification settings - Fork 456
Custom Query Shortcut + built-in variables #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 13 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
efd34c9
Draft Query Shortcut
taooceros 4340c08
Draft Query Shortcut
taooceros 2fa0b52
Merge remote-tracking branch 'origin/Shortcut' into Shortcut
taooceros 0a8405f
Resolve issue and add partial replacement trick
taooceros 0d355bd
Draft Query Shortcut
taooceros 2bb8812
Resolve issue and add partial replacement trick
taooceros 9ccebd9
Merge remote-tracking branch 'origin/Shortcut' into Shortcut
taooceros b837d45
Merge remote-tracking branch 'origin/dev' into Shortcut
taooceros 4d42e52
- Move the 'Shorcut' to Hotkey tab from General
onesounds c0a61c0
slightly code adjustment
taooceros d60ba01
Implement {clipboard} feature and the setting panel
taooceros 8ebdff0
Merge branch 'dev' into Shortcut
taooceros 0c75dfe
Update delete message
taooceros 806720d
Remove ignore executable check
taooceros 609e8e8
Remove testing code
taooceros 3d20a60
Rename ShortcutModel to CustomShortcutModel
VictoriousRaptor 099b1d6
Rename Settings.ShortCuts to CustomShortcuts
VictoriousRaptor 99d1807
Move CustomShortcutModel definition to a new file
VictoriousRaptor a0c70a3
Inherit
VictoriousRaptor c2b1481
Warn if trying to add existing shortcut
VictoriousRaptor e789948
Text update
VictoriousRaptor f3c4120
Shortcut settings dialog preview & text & bugfix
VictoriousRaptor 5879c84
Show builtin vars in shortcut list
VictoriousRaptor 334d58d
Fix json load
VictoriousRaptor d394d86
Bugfix
VictoriousRaptor cde272a
Fix hard-coded text
VictoriousRaptor 23ecd39
Separate custom & built-in shortcuts
VictoriousRaptor ce60f41
bugfix
VictoriousRaptor 951ba4c
Add Listview for builtin shortcuts
VictoriousRaptor 2489bfa
Merge pull request #1474 from VictoriousRaptor/Shortcut
taooceros 3372a40
Fix mixed usage of \t and space
VictoriousRaptor 40dda13
Merge branch 'Flow-Launcher:Shortcut' into Shortcut
VictoriousRaptor fe5859a
Merge pull request #1478 from VictoriousRaptor/Shortcut
jjw24 cbbb3b8
Merge branch 'dev' into Shortcut
VictoriousRaptor 532f7ce
Fix merging
VictoriousRaptor 3d36513
Add MinHeight for ListViews
VictoriousRaptor 12721bc
Revert accidental change in Log.cs
VictoriousRaptor 0eedb7b
renaming
VictoriousRaptor 1296b0e
minor changes
VictoriousRaptor fc7ed31
Use reference when editing
VictoriousRaptor 473626f
Fix duplicates when editing
VictoriousRaptor 7fe81b4
Add text
VictoriousRaptor 977ec33
Move logic to viewmodel
VictoriousRaptor 5d3e6e0
Move dialog logic to vm
VictoriousRaptor 019019e
Fix
VictoriousRaptor 224b1df
Translate BuiltinShortcut desc
VictoriousRaptor 9ccdf59
change text textbox when expanding builtin shortcuts
VictoriousRaptor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| <Window | ||
| x:Class="Flow.Launcher.CustomShortcutSetting" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:flowlauncher="clr-namespace:Flow.Launcher" | ||
| Title="{DynamicResource customeQueryHotkeyTitle}" | ||
| Width="530" | ||
| Background="{DynamicResource PopuBGColor}" | ||
| Foreground="{DynamicResource PopupTextColor}" | ||
| Icon="Images\app.png" | ||
| ResizeMode="NoResize" | ||
| SizeToContent="Height" | ||
| WindowStartupLocation="CenterScreen" | ||
| DataContext="{Binding RelativeSource={RelativeSource Self}}"> | ||
| <WindowChrome.WindowChrome> | ||
| <WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" /> | ||
| </WindowChrome.WindowChrome> | ||
| <Window.InputBindings> | ||
| <KeyBinding Key="Escape" Command="Close" /> | ||
| </Window.InputBindings> | ||
| <Window.CommandBindings> | ||
| <CommandBinding Command="Close" Executed="cmdEsc_OnPress" /> | ||
| </Window.CommandBindings> | ||
| <Grid> | ||
| <Grid.RowDefinitions> | ||
| <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="BtnCancel_OnClick" | ||
| 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 Grid.Row="0" Margin="0,0,0,12"> | ||
| <TextBlock | ||
| Grid.Column="0" | ||
| Margin="0,0,0,0" | ||
| FontFamily="Segoe UI" | ||
| FontSize="20" | ||
| FontWeight="SemiBold" | ||
| Text="{DynamicResource customeQueryHotkeyTitle}" | ||
| TextAlignment="Left" /> | ||
| </StackPanel> | ||
| <StackPanel> | ||
| <TextBlock | ||
| FontSize="14" | ||
| Text="{DynamicResource customeQueryHotkeyTips}" | ||
| TextAlignment="Left" | ||
| TextWrapping="WrapWithOverflow" /> | ||
| </StackPanel> | ||
|
|
||
| <StackPanel Margin="0,20,0,0" Orientation="Horizontal"> | ||
| <Grid Width="470"> | ||
| <Grid.RowDefinitions> | ||
| <RowDefinition /> | ||
| <RowDefinition /> | ||
| </Grid.RowDefinitions> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="Auto" /> | ||
| <ColumnDefinition Width="*" /> | ||
| </Grid.ColumnDefinitions> | ||
| <TextBlock | ||
| Grid.Row="0" | ||
| Grid.Column="0" | ||
| Margin="10" | ||
| HorizontalAlignment="Left" | ||
| VerticalAlignment="Center" | ||
| FontSize="14" | ||
| Text="{DynamicResource customShortcut}" /> | ||
| <TextBox | ||
| Grid.Row="0" | ||
| Grid.Column="1" | ||
| Margin="10" | ||
| Text="{Binding Key}" | ||
| /> | ||
| <TextBlock | ||
| Grid.Row="1" | ||
| Grid.Column="0" | ||
| Margin="10" | ||
| HorizontalAlignment="Left" | ||
| VerticalAlignment="Center" | ||
| FontSize="14" | ||
| Text="{DynamicResource customShortcutExpansion}" /> | ||
| <TextBox | ||
| Grid.Row="1" | ||
| Grid.Column="1" | ||
| Margin="10" | ||
| HorizontalAlignment="Stretch" | ||
| VerticalAlignment="Center" | ||
| Text="{Binding Value}"/> | ||
| </Grid> | ||
| </StackPanel> | ||
| </StackPanel> | ||
| </StackPanel> | ||
| <Border | ||
| Grid.Row="1" | ||
| Margin="0,14,0,0" | ||
| Background="{DynamicResource PopupButtonAreaBGColor}" | ||
| BorderBrush="{DynamicResource PopupButtonAreaBorderColor}" | ||
| BorderThickness="0,1,0,0"> | ||
| <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"> | ||
| <Button | ||
| x:Name="btnCancel" | ||
| MinWidth="140" | ||
| Margin="10,0,5,0" | ||
| Click="BtnCancel_OnClick" | ||
| Content="{DynamicResource cancel}" /> | ||
| <Button | ||
| x:Name="btnAdd" | ||
| MinWidth="140" | ||
| Margin="5,0,10,0" | ||
| Click="btnAdd_OnClick" | ||
| Style="{StaticResource AccentButtonStyle}"> | ||
| <TextBlock x:Name="lblAdd" Text="{DynamicResource done}" /> | ||
| </Button> | ||
| </StackPanel> | ||
| </Border> | ||
| </Grid> | ||
| </Window> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| using Flow.Launcher.Core.Resource; | ||
| using Flow.Launcher.Helper; | ||
| using Flow.Launcher.Infrastructure.UserSettings; | ||
| using System.Collections.ObjectModel; | ||
| using System.Linq; | ||
| using System.Windows; | ||
| using System.Windows.Input; | ||
| using System.Windows.Controls; | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace Flow.Launcher | ||
| { | ||
| public partial class CustomShortcutSetting : Window | ||
jjw24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| private SettingWindow _settingWidow; | ||
| private bool update; | ||
| private CustomPluginHotkey updateCustomHotkey; | ||
| private Settings _settings; | ||
|
|
||
| public string Key { get; set; } | ||
| public string Value { get; set; } | ||
| public ShortCutModel ShortCut => (Key, Value); | ||
| public CustomShortcutSetting() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| public CustomShortcutSetting((string, string) shortcut) | ||
| { | ||
| (Key, Value) = shortcut; | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| private void BtnCancel_OnClick(object sender, RoutedEventArgs e) | ||
| { | ||
| DialogResult = false; | ||
| Close(); | ||
| } | ||
|
|
||
| private void btnAdd_OnClick(object sender, RoutedEventArgs e) | ||
| { | ||
| DialogResult = true; | ||
| Close(); | ||
| } | ||
|
|
||
| private void cmdEsc_OnPress(object sender, ExecutedRoutedEventArgs e) | ||
| { | ||
| DialogResult = false; | ||
| Close(); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.