From 76464a604ee2999b00b806be25722f7fcac1cd9c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 3 Feb 2008 00:07:21 -0500 Subject: combine the old focus cycle popup code with mika's new list-mode popup, and make an action option for it (the old option) --- openbox/actions/cyclewindows.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'openbox/actions') diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 36dd66ee..b013b66b 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -8,13 +8,13 @@ typedef struct { gboolean linear; - gboolean dialog; gboolean dock_windows; gboolean desktop_windows; gboolean all_desktops; gboolean forward; gboolean bar; gboolean raise; + ObFocusCyclePopupMode dialog_mode; GSList *actions; } Options; @@ -47,13 +47,17 @@ static gpointer setup_func(xmlNodePtr node) Options *o; o = g_new0(Options, 1); - o->dialog = TRUE; o->bar = TRUE; + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_ICONS; if ((n = obt_parse_find_node(node, "linear"))) o->linear = obt_parse_node_bool(n); - if ((n = obt_parse_find_node(node, "dialog"))) - o->dialog = obt_parse_node_bool(n); + if ((n = obt_parse_find_node(node, "dialog"))) { + if (obt_parse_node_contains(n, "none")) + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_NONE; + else if (obt_parse_node_contains(n, "list")) + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_LIST; + } if ((n = obt_parse_find_node(node, "bar"))) o->bar = obt_parse_node_bool(n); if ((n = obt_parse_find_node(node, "raise"))) @@ -125,7 +129,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) o->linear, TRUE, o->bar, - o->dialog, + o->dialog_mode, FALSE, FALSE); cycling = TRUE; @@ -185,7 +189,7 @@ static void end_cycle(gboolean cancel, guint state, Options *o) o->linear, TRUE, o->bar, - o->dialog, + o->dialog_mode, TRUE, cancel); cycling = FALSE; -- cgit v1.2.3 From e9eac7ce50a214e3cc14e737d0e109612eb32080 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 6 Feb 2008 09:31:03 -0500 Subject: make the listmode alttab the default --- openbox/actions/cyclewindows.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openbox/actions') diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index b013b66b..44d87cf6 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -48,15 +48,15 @@ static gpointer setup_func(xmlNodePtr node) o = g_new0(Options, 1); o->bar = TRUE; - o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_ICONS; + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_LIST; if ((n = obt_parse_find_node(node, "linear"))) o->linear = obt_parse_node_bool(n); if ((n = obt_parse_find_node(node, "dialog"))) { if (obt_parse_node_contains(n, "none")) o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_NONE; - else if (obt_parse_node_contains(n, "list")) - o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_LIST; + else if (obt_parse_node_contains(n, "icons")) + o->dialog_mode = OB_FOCUS_CYCLE_POPUP_MODE_ICONS; } if ((n = obt_parse_find_node(node, "bar"))) o->bar = obt_parse_node_bool(n); -- cgit v1.2.3