]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/cyclewindows.c
combine the old focus cycle popup code with mika's new list-mode popup, and make...
[chaz/openbox] / openbox / actions / cyclewindows.c
index 36dd66ee4c6c635111fdcea9d4e5b0cfc585c614..b013b66be126a36ace5d4aef4b1dd957ef867ada 100644 (file)
@@ -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;
 
This page took 0.021268 seconds and 4 git commands to generate.