Skip to content
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

Allow nonsequential char matching in cmd palettes #1692

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions OneMore/Commands/Settings/GeneralSheet.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions OneMore/Commands/Settings/GeneralSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public GeneralSheet(SettingsProvider provider) : base(provider)
"themeLabel",
"themeBox",
"langLabel=word_Language",
"sequentialBox",
"checkUpdatesBox",
"advancedGroup=phrase_AdvancedOptions",
"verboseBox",
Expand All @@ -54,6 +55,7 @@ public GeneralSheet(SettingsProvider provider) : base(provider)
}
}

sequentialBox.Checked = settings.Get("nonseqMatching", false);
checkUpdatesBox.Checked = settings.Get("checkUpdates", false);
experimentalBox.Checked = settings.Get("experimental", false);

Expand Down Expand Up @@ -131,6 +133,11 @@ public override bool CollectSettings()
var lang = ((CultureInfo)(langBox.SelectedItem)).Name;
var updated = settings.Add("language", lang);

// does not require a restart
save = sequentialBox.Checked
? settings.Add("nonseqMatching", "true") || save
: settings.Remove("nonseqMatching") || save;

// does not require a restart
save = checkUpdatesBox.Checked
? settings.Add("checkUpdates", true) || save
Expand Down
9 changes: 6 additions & 3 deletions OneMore/Commands/Tagging/HashtagDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,19 @@ public HashtagDialog()

searchButton.NotifyDefault(true);

experimental = new SettingsProvider()
.GetCollection("GeneralSheet").Get<bool>("experimental");
var setprovider = new SettingsProvider();
var general = setprovider.GetCollection(nameof(GeneralSheet));

palette.NonsequentialMatching = general.Get<bool>("nonseqMatching");
experimental = general.Get<bool>("experimental");

scanLink.Left = lastScanLabel.Left;
scanLink.Visible = false;

ShowScanTimes();
CheckForNewNotebooks();

ShowOfflineNotebooks = new SettingsProvider()
ShowOfflineNotebooks = setprovider
.GetCollection(SettingsKey)
.Get("showOffline", true);

Expand Down
6 changes: 6 additions & 0 deletions OneMore/Commands/Tools/CommandPaletteDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace River.OneMoreAddIn.Commands
{
using River.OneMoreAddIn.Settings;
using River.OneMoreAddIn.UI;
using System;
using System.Text.RegularExpressions;
Expand All @@ -29,8 +30,13 @@ public CommandPaletteDialog(string title, string intro, bool showClearOption)
{
InitializeComponent();

var settings = new SettingsProvider().GetCollection(nameof(GeneralSheet));
var nonseq = settings.Get("nonseqMatching", false);

palette = new MoreAutoCompleteList
{
// allow nonsequential character matching
NonsequentialMatching = nonseq,
// keeping this as false will eliminate flicker on startup
ShowPopupOnStartup = false
};
Expand Down
9 changes: 9 additions & 0 deletions OneMore/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.ar-SA.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,10 @@
<value>تخصيص السلوك العام لـ OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>السماح بمطابقة الأسماء غير المتسلسلة في لوحات الأوامر</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>نظام
ضوء
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,10 @@ Verwandte Bereiche: A1: Zelle (0, -1)</value>
<value>Passe das Gesamtverhalten von OneMore an</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Erlauben Sie den nichtsequentiellen Namensabgleich in Befehlspaletten</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>System
Licht
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.es-ES.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,10 @@ Rangos relativos: A1: Cell (0, -1)</value>
<value>Personalice el comportamiento general de OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Permitir coincidencias de nombres no secuenciales en las paletas de comandos</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>Sistema
Luz
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,10 @@ Plages relatives: a1: cellule (0, -1)</value>
<value>Personnalisez le comportement général de OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Autoriser la correspondance de noms non séquentielle dans les palettes de commandes</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>Système
Lumière
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.he-IL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,10 @@ Total Row Font
<value>התאם אישית את ההתנהגות הכוללת של OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>אפשר התאמת שמות לא רציפים בפלטות פקודות</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>מערכת
אוֹר
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.ja-JP.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,10 @@ OneNoteファイル (*.one)</value>
<value>OneMoreの全体的な動作をカスタマイズ</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>コマンド パレットで連続しない名前の一致を許可する</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>システム
ライト
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.nl-NL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,10 @@ Relatieve bereiken: A1: Cell (0, -1)</value>
<value>Pas het algemene gedrag van OneMore aan</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Sta niet-opeenvolgende namen toe in opdrachtpaletten</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>Systeem
Licht
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.pl-PL.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,10 @@ Zakresy względne: A1: komórka (0, -1)</value>
<value>Dostosuj ogólne zachowanie OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Zezwalaj na niesekwencyjne dopasowywanie nazw w paletach poleceń</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>System
Światło
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,10 @@ Intervalos relativos: a1: célula (0, -1)</value>
<value>Personalize o comportamento geral do OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Permitir correspondência de nomes não sequenciais em paletas de comandos</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>Sistema
Luz
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,10 @@ Relative ranges: A1:cell(0,-1)</value>
<value>Customize the overall behavior of OneMore</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>Allow nonsequential name matching in Command Palettes</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>System
Light
Expand Down
4 changes: 4 additions & 0 deletions OneMore/Properties/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,10 @@ OneNote 文件 (*.one)</value>
<value>自定义OneMore的整体行为</value>
<comment>textbox</comment>
</data>
<data name="GeneralSheet_sequentialBox.Text" xml:space="preserve">
<value>允许命令面板中的非连续名称匹配</value>
<comment>checkbox</comment>
</data>
<data name="GeneralSheet_themeBox.Text" xml:space="preserve">
<value>系统
Expand Down
Loading