Skip to content

Commit 8892ad2

Browse files
committed
Merge branch 'dev' into Fix-misaligned-suggestion-text
2 parents 8b33ca9 + 06a76f5 commit 8892ad2

27 files changed

+1550
-36
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public string Language
3939
public string ResultFontWeight { get; set; }
4040
public string ResultFontStretch { get; set; }
4141
public bool UseGlyphIcons { get; set; } = true;
42+
public bool FirstLaunch { get; set; } = true;
4243

4344
public int CustomExplorerIndex { get; set; } = 0;
4445

@@ -134,7 +135,7 @@ public string QuerySearchPrecisionString
134135
public bool EnableUpdateLog { get; set; }
135136

136137
public bool StartFlowLauncherOnSystemStartup { get; set; } = false;
137-
public bool HideOnStartup { get; set; }
138+
public bool HideOnStartup { get; set; } = true;
138139
bool _hideNotifyIcon { get; set; }
139140
public bool HideNotifyIcon
140141
{

Flow.Launcher.Plugin/Result.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ public class Result
2929
/// </summary>
3030
public string ActionKeywordAssigned { get; set; }
3131

32+
/// <summary>
33+
/// This holds the text which can be provided by plugin to help Flow autocomplete text
34+
/// for user on the plugin result. If autocomplete action for example is tab, pressing tab will have
35+
/// the default constructed autocomplete text (result's Title), or the text provided here if not empty.
36+
/// </summary>
37+
public string AutoCompleteText { get; set; }
38+
3239
public string IcoPath
3340
{
3441
get { return _icoPath; }

Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
4444
if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase) || QueryTextBox.HorizontalOffset != 0)
4545
return string.Empty;
4646

47+
// For AutocompleteQueryCommand.
4748
// When user typed lower case and result title is uppercase, we still want to display suggestion
48-
return queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
49+
selectedItem.QuerySuggestionText = queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
50+
51+
return selectedItem.QuerySuggestionText;
4952
}
5053
catch (Exception e)
5154
{

Flow.Launcher/HotkeyControl.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
VerticalContentAlignment="Center"
5151
input:InputMethod.IsInputMethodEnabled="False"
5252
PreviewKeyDown="TbHotkey_OnPreviewKeyDown"
53-
TabIndex="100" />
53+
TabIndex="100"
54+
LostFocus="tbHotkey_LostFocus"/>
5455
</Grid>
5556
</UserControl>

Flow.Launcher/HotkeyControl.xaml.cs

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
using Flow.Launcher.Helper;
99
using Flow.Launcher.Infrastructure.Hotkey;
1010
using Flow.Launcher.Plugin;
11+
using System.Threading;
1112

1213
namespace Flow.Launcher
1314
{
1415
public partial class HotkeyControl : UserControl
1516
{
17+
private Brush tbMsgForegroundColorOriginal;
18+
19+
private string tbMsgTextOriginal;
20+
1621
public HotkeyModel CurrentHotkey { get; private set; }
1722
public bool CurrentHotkeyAvailable { get; private set; }
1823

@@ -23,15 +28,22 @@ public partial class HotkeyControl : UserControl
2328
public HotkeyControl()
2429
{
2530
InitializeComponent();
31+
tbMsgTextOriginal = tbMsg.Text;
32+
tbMsgForegroundColorOriginal = tbMsg.Foreground;
2633
}
2734

28-
void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
35+
private CancellationTokenSource hotkeyUpdateSource;
36+
37+
private void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
2938
{
39+
hotkeyUpdateSource?.Cancel();
40+
hotkeyUpdateSource?.Dispose();
41+
hotkeyUpdateSource = new();
42+
var token = hotkeyUpdateSource.Token;
3043
e.Handled = true;
31-
tbMsg.Visibility = Visibility.Hidden;
3244

3345
//when alt is pressed, the real key should be e.SystemKey
34-
Key key = (e.Key == Key.System ? e.SystemKey : e.Key);
46+
Key key = e.Key == Key.System ? e.SystemKey : e.Key;
3547

3648
SpecialKeyState specialKeyState = GlobalHotkey.Instance.CheckModifiers();
3749

@@ -49,14 +61,15 @@ void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
4961
return;
5062
}
5163

52-
Dispatcher.InvokeAsync(async () =>
64+
_ = Dispatcher.InvokeAsync(async () =>
5365
{
54-
await Task.Delay(500);
55-
SetHotkey(hotkeyModel);
66+
await Task.Delay(500, token);
67+
if (!token.IsCancellationRequested)
68+
await SetHotkey(hotkeyModel);
5669
});
5770
}
5871

59-
public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
72+
public async Task SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
6073
{
6174
CurrentHotkey = keyModel;
6275

@@ -78,6 +91,13 @@ public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
7891
}
7992
tbMsg.Visibility = Visibility.Visible;
8093
OnHotkeyChanged();
94+
95+
var token = hotkeyUpdateSource.Token;
96+
await Task.Delay(500, token);
97+
if (token.IsCancellationRequested)
98+
return;
99+
FocusManager.SetFocusedElement(FocusManager.GetFocusScope(this), null);
100+
Keyboard.ClearFocus();
81101
}
82102
}
83103

@@ -88,9 +108,12 @@ public void SetHotkey(string keyStr, bool triggerValidate = true)
88108

89109
private bool CheckHotkeyAvailability() => HotKeyMapper.CheckAvailability(CurrentHotkey);
90110

91-
public new bool IsFocused
111+
public new bool IsFocused => tbHotkey.IsFocused;
112+
113+
private void tbHotkey_LostFocus(object sender, RoutedEventArgs e)
92114
{
93-
get { return tbHotkey.IsFocused; }
115+
tbMsg.Text = tbMsgTextOriginal;
116+
tbMsg.Foreground = tbMsgForegroundColorOriginal;
94117
}
95118
}
96-
}
119+
}

Flow.Launcher/Images/page_img01.png

32.5 KB
Loading

Flow.Launcher/Images/wizard.png

7.87 KB
Loading

Flow.Launcher/Languages/en.xaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
<system:String x:Key="devtool">DevTools</system:String>
153153
<system:String x:Key="settingfolder">Setting Folder</system:String>
154154
<system:String x:Key="logfolder">Log Folder</system:String>
155+
<system:String x:Key="welcomewindow">Wizard</system:String>
155156

156157
<!-- FileManager Setting Dialog -->
157158
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
@@ -231,4 +232,40 @@
231232
<system:String x:Key="update_flowlauncher_update_files">Update files</system:String>
232233
<system:String x:Key="update_flowlauncher_update_upadte_description">Update description</system:String>
233234

235+
<!-- Welcome Window -->
236+
<system:String x:Key="Skip">Skip</system:String>
237+
<system:String x:Key="Welcome_Page1_Title">Welcome to Flow Launcher</system:String>
238+
<system:String x:Key="Welcome_Page1_Text01">Hello, this is the first time you are running Flow Launcher!</system:String>
239+
<system:String x:Key="Welcome_Page1_Text02">Before starting, this wizard will assist in setting up Flow Launcher. You can skip this if you wish. Please choose a language</system:String>
240+
<system:String x:Key="Welcome_Page2_Title">Search and run all files and applications on your PC</system:String>
241+
<system:String x:Key="Welcome_Page2_Text01">Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse.</system:String>
242+
<system:String x:Key="Welcome_Page2_Text02">Flow Launcher starts with the hotkey below, go ahead and try it out now. To change it, click on the input and press the desired hotkey on the keyboard.</system:String>
243+
<system:String x:Key="Welcome_Page3_Title">Hotkeys</system:String>
244+
<system:String x:Key="Welcome_Page4_Title">Action Keyword and Commands</system:String>
245+
<system:String x:Key="Welcome_Page4_Text01">Search the web, launch applications or run various functions through Flow Launcher plugins. Certain functions start with an action keyword, and if necessary, they can be used without action keywords. Try the queries below in Flow Launcher.</system:String>
246+
<system:String x:Key="Welcome_Page5_Title">Let's Start Flow Launcher</system:String>
247+
<system:String x:Key="Welcome_Page5_Text01">Finished. Enjoy Flow Launcher. Don't forget the hotkey to start :)</system:String>
248+
249+
<!-- General Guide & Hotkey -->
250+
251+
<system:String x:Key="HotkeyUpDownDesc">Back / Context Menu</system:String>
252+
<system:String x:Key="HotkeyLeftRightDesc">Item Navigation</system:String>
253+
<system:String x:Key="HotkeyShiftEnterDesc">Open Context Menu</system:String>
254+
<system:String x:Key="HotkeyCtrlEnterDesc">Open Contaning Folder</system:String>
255+
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Run as Admin</system:String>
256+
<system:String x:Key="HotkeyCtrlHDesc">Query History</system:String>
257+
<system:String x:Key="HotkeyESCDesc">Back to Result in Context Menu</system:String>
258+
<system:String x:Key="HotkeyRunDesc">Open / Run Selected Item</system:String>
259+
<system:String x:Key="HotkeyCtrlIDesc">Open Setting Window</system:String>
260+
<system:String x:Key="HotkeyF5Desc">Reload Plugin Data</system:String>
261+
262+
<system:String x:Key="RecommendWeather">Weather</system:String>
263+
<system:String x:Key="RecommendWeatherDesc">Weather in Google Result</system:String>
264+
<system:String x:Key="RecommendShell">&gt; ping 8.8.8.8</system:String>
265+
<system:String x:Key="RecommendShellDesc">Shell Command</system:String>
266+
<system:String x:Key="RecommendBluetooth">Bluetooth</system:String>
267+
<system:String x:Key="RecommendBluetoothDesc">Bluetooth in Windows Setting</system:String>
268+
<system:String x:Key="RecommendAcronyms">sn</system:String>
269+
<system:String x:Key="RecommendAcronymsDesc">Sticky Notes</system:String>
270+
234271
</ResourceDictionary>

Flow.Launcher/Languages/ko.xaml

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:system="clr-namespace:System;assembly=mscorlib">
55
<!-- MainWindow -->
6-
<system:String x:Key="registerHotkeyFailed">핫키 등록 실패: {0}</system:String>
6+
<system:String x:Key="registerHotkeyFailed">단축키 등록 실패: {0}</system:String>
77
<system:String x:Key="couldnotStartCmd">{0}을 실행할 수 없습니다.</system:String>
88
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Flow Launcher 플러그인 파일 형식이 유효하지 않습니다.</system:String>
99
<system:String x:Key="setAsTopMostInThisQuery">이 쿼리의 최상위로 설정</system:String>
@@ -16,7 +16,7 @@
1616
<system:String x:Key="iconTrayExit">종료</system:String>
1717
<system:String x:Key="closeWindow">닫기</system:String>
1818
<system:String x:Key="GameMode">게임 모드</system:String>
19-
<system:String x:Key="GameModeToolTip">핫키 사용을 일시중단합니다.</system:String>
19+
<system:String x:Key="GameModeToolTip">단축키 사용을 일시중단합니다.</system:String>
2020

2121
<!-- Setting General -->
2222
<system:String x:Key="flowlauncher_settings">Flow Launcher 설정</system:String>
@@ -34,7 +34,7 @@
3434
<system:String x:Key="LastQuerySelected">직전 쿼리 내용 선택</system:String>
3535
<system:String x:Key="LastQueryEmpty">직전 쿼리 지우기</system:String>
3636
<system:String x:Key="maxShowResults">표시할 결과 수</system:String>
37-
<system:String x:Key="ignoreHotkeysOnFullscreen">전체화면 모드에서는 핫키 무시</system:String>
37+
<system:String x:Key="ignoreHotkeysOnFullscreen">전체화면 모드에서는 단축키 무시</system:String>
3838
<system:String x:Key="ignoreHotkeysOnFullscreenToolTip">게이머라면 켜는 것을 추천합니다.</system:String>
3939
<system:String x:Key="defaultFileManager">기본 파일관리자</system:String>
4040
<system:String x:Key="defaultFileManagerToolTip">폴더를 열 때 사용할 파일관리자를 선택하세요.</system:String>
@@ -97,20 +97,20 @@
9797
<system:String x:Key="AnimationTip">일부 UI에 애니메이션을 사용합니다.</system:String>
9898

9999
<!-- Setting Hotkey -->
100-
<system:String x:Key="hotkey">핫키</system:String>
101-
<system:String x:Key="flowlauncherHotkey">Flow Launcher 핫키</system:String>
100+
<system:String x:Key="hotkey">단축키</system:String>
101+
<system:String x:Key="flowlauncherHotkey">Flow Launcher 단축키</system:String>
102102
<system:String x:Key="flowlauncherHotkeyToolTip">Flow Launcher를 열 때 사용할 단축키를 입력합니다.</system:String>
103103
<system:String x:Key="openResultModifiers">결과 선택 단축키</system:String>
104104
<system:String x:Key="openResultModifiersToolTip">결과 목록을 선택하는 단축키입니다.</system:String>
105105
<system:String x:Key="showOpenResultHotkey">단축키 표시</system:String>
106106
<system:String x:Key="showOpenResultHotkeyToolTip">결과창에서 결과 선택 단축키를 표시합니다.</system:String>
107-
<system:String x:Key="customQueryHotkey">사용자지정 쿼리 핫키</system:String>
107+
<system:String x:Key="customQueryHotkey">사용자지정 쿼리 단축키</system:String>
108108
<system:String x:Key="customQuery">쿼리</system:String>
109109
<system:String x:Key="delete">삭제</system:String>
110110
<system:String x:Key="edit">편집</system:String>
111111
<system:String x:Key="add">추가</system:String>
112112
<system:String x:Key="pleaseSelectAnItem">항목을 선택하세요.</system:String>
113-
<system:String x:Key="deleteCustomHotkeyWarning">{0} 플러그인 핫키를 삭제하시겠습니까?</system:String>
113+
<system:String x:Key="deleteCustomHotkeyWarning">{0} 플러그인 단축키를 삭제하시겠습니까?</system:String>
114114
<system:String x:Key="queryWindowShadowEffect">그림자 효과</system:String>
115115
<system:String x:Key="shadowEffectCPUUsage">그림자 효과는 GPU를 사용합니다. 컴퓨터 퍼포먼스가 제한적인 경우 사용을 추천하지 않습니다.</system:String>
116116
<system:String x:Key="windowWidthSize">창 넓이</system:String>
@@ -152,6 +152,7 @@
152152
<system:String x:Key="devtool">개발자도구</system:String>
153153
<system:String x:Key="settingfolder">설정 폴더</system:String>
154154
<system:String x:Key="logfolder">로그 폴더</system:String>
155+
<system:String x:Key="welcomewindow">마법사</system:String>
155156

156157
<!-- FileManager Setting Dialog -->
157158
<system:String x:Key="fileManagerWindow">파일관리자 선택</system:String>
@@ -180,15 +181,15 @@
180181
<system:String x:Key="actionkeyword_tips">플러그인을 시작하는데 필요한 액션 키워드를 입력하세요. 액션 키워드를 지정하지 않으려면 *를 사용하세요. 이 경우 키워드를 입력하지 않아도 동작합니다.</system:String>
181182

182183
<!-- Custom Query Hotkey Dialog -->
183-
<system:String x:Key="customeQueryHotkeyTitle">커스텀 플러그인 핫키</system:String>
184+
<system:String x:Key="customeQueryHotkeyTitle">커스텀 플러그인 단축키</system:String>
184185
<system:String x:Key="customeQueryHotkeyTips">단축키를 지정하여 특정 쿼리를 자동으로 입력할 수 있습니다. 사용하고 싶은 단축키를 눌러 지정한 후, 사용할 쿼리를 입력하세요.</system:String>
185186
<system:String x:Key="preview">미리보기</system:String>
186-
<system:String x:Key="hotkeyIsNotUnavailable">핫키를 사용할 수 없습니다. 다른 핫키를 입력하세요.</system:String>
187-
<system:String x:Key="invalidPluginHotkey">플러그인 핫키가 유효하지 않습니다.</system:String>
187+
<system:String x:Key="hotkeyIsNotUnavailable">단축키를 사용할 수 없습니다. 다른 단축키를 입력하세요.</system:String>
188+
<system:String x:Key="invalidPluginHotkey">플러그인 단축키가 유효하지 않습니다.</system:String>
188189
<system:String x:Key="update">업데이트</system:String>
189190

190191
<!-- Hotkey Control -->
191-
<system:String x:Key="hotkeyUnavailable">핫키를 사용할 수 없습니다.</system:String>
192+
<system:String x:Key="hotkeyUnavailable">단축키를 사용할 수 없습니다.</system:String>
192193

193194
<!-- Crash Reporter -->
194195
<system:String x:Key="reportWindow_version">버전</system:String>
@@ -229,4 +230,41 @@
229230
<system:String x:Key="update_flowlauncher_update_files">업데이트 파일</system:String>
230231
<system:String x:Key="update_flowlauncher_update_upadte_description">업데이트 설명</system:String>
231232

233+
234+
<!-- Welcome Window -->
235+
<system:String x:Key="Skip">건너뛰기</system:String>
236+
<system:String x:Key="Welcome_Page1_Title">Flow Launcher에 오신 것을 환영합니다</system:String>
237+
<system:String x:Key="Welcome_Page1_Text01">안녕하세요, Flow Launcher를 처음 실행하시네요!</system:String>
238+
<system:String x:Key="Welcome_Page1_Text02">시작하기전에 이 마법사가 간단한 설정을 도와드릴겁니다. 물론 건너 뛰셔도 됩니다. 사용하시는 언어를 선택해주세요.</system:String>
239+
<system:String x:Key="Welcome_Page2_Title">PC에서 모든 파일과 프로그램을 검색하고 실행합니다</system:String>
240+
<system:String x:Key="Welcome_Page2_Text01">프로그램, 파일, 즐겨찾기, YouTube, Twitter 등 모든 것을 검색하세요. 마우스에 손대지 않고 키보드만으로 모든 것을 얻을 수 있습니다.</system:String>
241+
<system:String x:Key="Welcome_Page2_Text02">Flow는 아래의 단축키로 실행합니다. 변경하려면 입력창을 선택하고 키보드에서 원하는 단축키를 누릅니다.</system:String>
242+
<system:String x:Key="Welcome_Page3_Title">단축키</system:String>
243+
<system:String x:Key="Welcome_Page4_Title">액션 키워드와 명령어</system:String>
244+
<system:String x:Key="Welcome_Page4_Text01">Flow Launcher는 플러그인을 통해 웹 검색, 프로그램 실행, 다양한 기능을 실행합니다. 특정 기능은 액션 키워드로 시작하며, 필요한 경우 액션 키워드 없이 사용할 수 있습니다. Flow Launcher에서 아래 쿼리를 사용해 보세요.</system:String>
245+
<system:String x:Key="Welcome_Page5_Title">Flow Launcher를 시작합시다</system:String>
246+
<system:String x:Key="Welcome_Page5_Text01">끝났습니다. Flow Launcher를 즐겨주세요. 시작하는 단축키를 잊지마세요 :)</system:String>
247+
248+
<!-- General Guide & Hotkey -->
249+
250+
<system:String x:Key="HotkeyUpDownDesc">뒤로/ 콘텍스트 메뉴</system:String>
251+
<system:String x:Key="HotkeyLeftRightDesc">아이템 이동</system:String>
252+
<system:String x:Key="HotkeyShiftEnterDesc">콘텍스트 메뉴 열기</system:String>
253+
<system:String x:Key="HotkeyCtrlEnterDesc">포함된 폴더 열기</system:String>
254+
<system:String x:Key="HotkeyCtrlShiftEnterDesc">관리자 권한으로 실행</system:String>
255+
<system:String x:Key="HotkeyCtrlHDesc">검색 기록</system:String>
256+
<system:String x:Key="HotkeyESCDesc">콘텍스트 메뉴에서 뒤로 가기</system:String>
257+
<system:String x:Key="HotkeyRunDesc">선택한 아이템 열기</system:String>
258+
<system:String x:Key="HotkeyCtrlIDesc">설정창 열기</system:String>
259+
<system:String x:Key="HotkeyF5Desc">플러그인 데이터 새로고침</system:String>
260+
261+
<system:String x:Key="RecommendWeather">날씨</system:String>
262+
<system:String x:Key="RecommendWeatherDesc">구글 날씨 검색</system:String>
263+
<system:String x:Key="RecommendShell">&gt; ping 8.8.8.8</system:String>
264+
<system:String x:Key="RecommendShellDesc">쉘 명령어</system:String>
265+
<system:String x:Key="RecommendBluetooth">블루투스</system:String>
266+
<system:String x:Key="RecommendBluetoothDesc">윈도우 블루투스 설정</system:String>
267+
<system:String x:Key="RecommendAcronyms">스메</system:String>
268+
<system:String x:Key="RecommendAcronymsDesc">스티커 메모</system:String>
269+
232270
</ResourceDictionary>

0 commit comments

Comments
 (0)