summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-21 19:20:57 +0300
committerPaul Buetow <paul@buetow.org>2026-07-21 19:20:57 +0300
commitd39915e214b66423e5edff788d81199c9db0b045 (patch)
treecf44e382af510035277c5d788734eac25384ed38 /tests
parent11f8bc04255c9889ac7380dd3675ba6c10c5f2e3 (diff)
enhance: replace the popup with a toggleable side panel + per-preset hotkeys
Instead of a transient 'a' popup, add a persistent enhance side panel (GtkRevealer overlaid on the left of the main content) toggled by 'a'. It lists every preset as a button showing its hotkey (1..8) plus a '0 Original' row, and stays open while you compare presets. Each optimization now has a dedicated global hotkey: 1-8 apply preset 1-8 directly (win.enhance-1 .. win.enhance-8), whether the panel is visible or not. 'a' toggles the panel; 's' still saves the enhanced copy; the panel's '0 Original' row (and navigating away) reverts. Adds win.enhance-1..8 actions (one _action_enhance_n handler parses the index from the action name) and the 1-8 keybindings; the ? overlay Enhance group documents the panel + 1-8 + s. test_shortcut full-table updated (33 rows, 29 actions).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_shortcut.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_shortcut.c b/tests/test_shortcut.c
index c9a66a9..96a5b74 100644
--- a/tests/test_shortcut.c
+++ b/tests/test_shortcut.c
@@ -328,12 +328,14 @@ test_shortcut_keypath_toggle_and_back(void) {
static void
test_shortcut_full_table_registered(void) {
static const char *ACTIONS[] = {
- "win.prev", "win.next", "win.first", "win.last",
- "win.open", "win.quit", "win.trash", "win.delete",
- "win.undo", "win.toggle-view", "win.mark", "win.mark-all",
- "win.shortcuts", "win.zoom-in", "win.zoom-out", "win.fullscreen",
- "win.slideshow", "win.info", "win.back", "win.enhance",
- "win.enhance-save",
+ "win.prev", "win.next", "win.first", "win.last",
+ "win.open", "win.quit", "win.trash", "win.delete",
+ "win.undo", "win.toggle-view", "win.mark", "win.mark-all",
+ "win.shortcuts", "win.zoom-in", "win.zoom-out", "win.fullscreen",
+ "win.slideshow", "win.info", "win.back", "win.enhance",
+ "win.enhance-save", "win.enhance-1", "win.enhance-2", "win.enhance-3",
+ "win.enhance-4", "win.enhance-5", "win.enhance-6", "win.enhance-7",
+ "win.enhance-8",
};
GgazeWindow *p_win = new_window();
GtkShortcutController *p_sc = find_shortcut_controller(GTK_WIDGET(p_win));
@@ -345,7 +347,7 @@ test_shortcut_full_table_registered(void) {
}
/* The SHORTCUTS[] table has 25 rows now (some actions appear twice, e.g.
* win.prev for h and Left; win.zoom-in for plus and equal). */
- g_assert_cmpint(g_list_model_get_n_items(G_LIST_MODEL(p_sc)), ==, 25);
+ g_assert_cmpint(g_list_model_get_n_items(G_LIST_MODEL(p_sc)), ==, 33);
g_object_unref(p_sc);
g_object_unref(p_win);
drain_main(200);