Skip to content

Commit e322373

Browse files
authored
Merge branch 'dev' into issue_1366
2 parents 5ad7486 + 16b81c8 commit e322373

File tree

8 files changed

+38
-11
lines changed

8 files changed

+38
-11
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<system:String x:Key="currentPriority">Current Priority</system:String>
7272
<system:String x:Key="newPriority">New Priority</system:String>
7373
<system:String x:Key="priority">Priority</system:String>
74+
<system:String x:Key="priorityToolTip">Change Plugin Results Priority</system:String>
7475
<system:String x:Key="pluginDirectory">Plugin Directory</system:String>
7576
<system:String x:Key="author">by</system:String>
7677
<system:String x:Key="plugin_init_time">Init time:</system:String>

Flow.Launcher/Languages/es-419.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">Prioridad Actual</system:String>
7070
<system:String x:Key="newPriority">Nueva Prioridad</system:String>
7171
<system:String x:Key="priority">Prioridad</system:String>
72+
<system:String x:Key="priorityToolTip">Cambiar la prioridad del resultado del plugin</system:String>
7273
<system:String x:Key="pluginDirectory">Directorio de Plugins</system:String>
7374
<system:String x:Key="author">por</system:String>
7475
<system:String x:Key="plugin_init_time">Tiempo de inicio:</system:String>

Flow.Launcher/Languages/es.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">Prioridad actual</system:String>
7070
<system:String x:Key="newPriority">Nueva prioridad</system:String>
7171
<system:String x:Key="priority">Prioridad</system:String>
72+
<system:String x:Key="priorityToolTip">Cambiar la prioridad del resultado del complemento</system:String>
7273
<system:String x:Key="pluginDirectory">Carpeta de complementos</system:String>
7374
<system:String x:Key="author">por</system:String>
7475
<system:String x:Key="plugin_init_time">Tiempo de inicio:</system:String>

Flow.Launcher/Languages/ko.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">현재 중요도:</system:String>
7070
<system:String x:Key="newPriority">새 중요도:</system:String>
7171
<system:String x:Key="priority">중요도</system:String>
72+
<system:String x:Key="priorityToolTip">플러그인 결과 우선 순위 변경</system:String>
7273
<system:String x:Key="pluginDirectory">플러그인 폴더</system:String>
7374
<system:String x:Key="author">제작자</system:String>
7475
<system:String x:Key="plugin_init_time">초기화 시간:</system:String>

Flow.Launcher/Languages/zh-cn.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">当前优先级</system:String>
7070
<system:String x:Key="newPriority">新优先级</system:String>
7171
<system:String x:Key="priority">优先级</system:String>
72+
<system:String x:Key="priorityToolTip">更改插件结果优先级</system:String>
7273
<system:String x:Key="pluginDirectory">插件目录</system:String>
7374
<system:String x:Key="author">出自</system:String>
7475
<system:String x:Key="plugin_init_time">加载耗时:</system:String>

Flow.Launcher/Languages/zh-tw.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">目前優先</system:String>
7070
<system:String x:Key="newPriority">新增優先</system:String>
7171
<system:String x:Key="priority">優先</system:String>
72+
<system:String x:Key="priorityToolTip">更改插件結果優先順序</system:String>
7273
<system:String x:Key="pluginDirectory">外掛資料夾</system:String>
7374
<system:String x:Key="author">作者</system:String>
7475
<system:String x:Key="plugin_init_time">載入耗時:</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@
995995
Click="OnPluginPriorityClick"
996996
Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}"
997997
Cursor="Hand"
998-
ToolTip="Change Plugin Results Priority">
998+
ToolTip="{DynamicResource priorityToolTip}">
999999
<!--#region Priority Button Style-->
10001000
<Button.Resources>
10011001
<Style TargetType="Border">

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,25 +125,44 @@ public void Save()
125125
#region general
126126

127127
// todo a better name?
128-
public class LastQueryMode
128+
public class LastQueryMode : BaseModel
129129
{
130130
public string Display { get; set; }
131131
public Infrastructure.UserSettings.LastQueryMode Value { get; set; }
132132
}
133+
134+
private List<LastQueryMode> _lastQueryModes = new List<LastQueryMode>();
133135
public List<LastQueryMode> LastQueryModes
134136
{
135137
get
136138
{
137-
List<LastQueryMode> modes = new List<LastQueryMode>();
138-
var enums = (Infrastructure.UserSettings.LastQueryMode[])Enum.GetValues(typeof(Infrastructure.UserSettings.LastQueryMode));
139-
foreach (var e in enums)
139+
if (_lastQueryModes.Count == 0)
140140
{
141-
var key = $"LastQuery{e}";
142-
var display = _translater.GetTranslation(key);
143-
var m = new LastQueryMode { Display = display, Value = e, };
144-
modes.Add(m);
141+
_lastQueryModes = InitLastQueryModes();
145142
}
146-
return modes;
143+
return _lastQueryModes;
144+
}
145+
}
146+
147+
private List<LastQueryMode> InitLastQueryModes()
148+
{
149+
var modes = new List<LastQueryMode>();
150+
var enums = (Infrastructure.UserSettings.LastQueryMode[])Enum.GetValues(typeof(Infrastructure.UserSettings.LastQueryMode));
151+
foreach (var e in enums)
152+
{
153+
var key = $"LastQuery{e}";
154+
var display = _translater.GetTranslation(key);
155+
var m = new LastQueryMode { Display = display, Value = e, };
156+
modes.Add(m);
157+
}
158+
return modes;
159+
}
160+
161+
private void UpdateLastQueryModeDisplay()
162+
{
163+
foreach (var item in LastQueryModes)
164+
{
165+
item.Display = _translater.GetTranslation($"LastQuery{item.Value}");
147166
}
148167
}
149168

@@ -159,6 +178,8 @@ public string Language
159178

160179
if (InternationalizationManager.Instance.PromptShouldUsePinyin(value))
161180
ShouldUsePinyin = true;
181+
182+
UpdateLastQueryModeDisplay();
162183
}
163184
}
164185

@@ -305,7 +326,7 @@ public string SelectedTheme
305326
{
306327
Settings.Theme = value;
307328
ThemeManager.Instance.ChangeTheme(value);
308-
329+
309330
if (ThemeManager.Instance.BlurEnabled && Settings.UseDropShadowEffect)
310331
DropShadowEffect = false;
311332
}

0 commit comments

Comments
 (0)