Release v0.6.26: OpenBao settings synchronization with per-setting conflicts

This commit is contained in:
2026-11-02 00:37:57 +02:00
parent 908985d775
commit 22edece7cf
24 changed files with 1442 additions and 29 deletions
+8 -2
View File
@@ -1298,6 +1298,7 @@ void showOcrOptions(HWND parent, SettingsView *v)
EnableWindow(parent, FALSE);
showRequestedWindow(w); SetForegroundWindow(w);
}
#include "ui_sync.inl"
LRESULT CALLBACK settingsProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
{
if (msg == WM_DPICHANGED)
@@ -1334,6 +1335,7 @@ LRESULT CALLBACK settingsProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
return 0;
}
if (id == 257) { showOcrOptions(w, v); return 0; }
if (id == 258) { showSyncOptions(w, *v->app); return 0; }
if (id == 230)
{
collectLayout(w, v);
@@ -1455,7 +1457,10 @@ void collectSnippet(HWND w, SnippetView *v)
{
if (v->selection >= 0 && v->selection < (int)v->snippets.size())
{
v->snippets[v->selection] = {value(w, 302), value(w, 303)};
auto &snippet = v->snippets[v->selection];
if (snippet.id.empty()) snippet.id = snippetId(snippet);
snippet.trigger = value(w, 302);
snippet.text = value(w, 303);
}
}
LRESULT CALLBACK snippetProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
@@ -1492,7 +1497,7 @@ LRESULT CALLBACK snippetProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
if (id == 310)
{
collectSnippet(w, v);
v->snippets.push_back({L";new", L""});
v->snippets.push_back({L";new", L"", newSnippetId()});
v->selection = (int)v->snippets.size() - 1;
fillSnippets(w, v);
SetFocus(GetDlgItem(w, 302));
@@ -1694,6 +1699,7 @@ void showSettings(App &app, bool visible)
button(w, L"Import settings…", 250, 18, 606, 145);
button(w, L"Export settings…", 251, 173, 606, 145);
button(w, L"Snippets…", 252, 328, 606, 110);
button(w, L"Sync...", 258, 448, 606, 90);
button(w, L"Save", IDOK, 548, 606, 100);
button(w, L"Cancel", IDCANCEL, 660, 606, 100);
fillSettings(w, (SettingsView *)GetWindowLongPtrW(w, GWLP_USERDATA));