Fix mismerge of if.c
authorMikael Magnusson <mikachu@gmail.com>
Thu, 24 Apr 2014 22:22:22 +0000 (00:22 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Thu, 24 Apr 2014 22:22:22 +0000 (00:22 +0200)
openbox/actions.c
openbox/actions/if.c

index d2cb565..b13725a 100644 (file)
@@ -37,7 +37,6 @@ static ObActionsAct* actions_build_act_from_string(const gchar *name);
 
 static ObActionsAct *interactive_act = NULL;
 static guint         interactive_initial_state = 0;
 
 static ObActionsAct *interactive_act = NULL;
 static guint         interactive_initial_state = 0;
-static gboolean      stop_running = FALSE;
 
 struct _ObActionsDefinition {
     guint ref;
 
 struct _ObActionsDefinition {
     guint ref;
@@ -328,11 +327,6 @@ static void actions_setup_data(ObActionsData *data,
     data->client = client;
 }
 
     data->client = client;
 }
 
-void actions_stop_running()
-{
-    stop_running = TRUE;
-}
-
 void actions_run_acts(GSList *acts,
                       ObUserAction uact,
                       guint state,
 void actions_run_acts(GSList *acts,
                       ObUserAction uact,
                       guint state,
@@ -345,8 +339,6 @@ void actions_run_acts(GSList *acts,
     GSList *it;
     gboolean update_user_time;
 
     GSList *it;
     gboolean update_user_time;
 
-    stop_running = FALSE;
-
     /* Don't allow saving the initial state when running things from the
        menu */
     if (uact == OB_USER_ACTION_MENU_SELECTION)
     /* Don't allow saving the initial state when running things from the
        menu */
     if (uact == OB_USER_ACTION_MENU_SELECTION)
@@ -384,9 +376,6 @@ void actions_run_acts(GSList *acts,
             if (!act->def->run(&data, act->options)) {
                 if (actions_act_is_interactive(act)) {
                     actions_interactive_end_act();
             if (!act->def->run(&data, act->options)) {
                 if (actions_act_is_interactive(act)) {
                     actions_interactive_end_act();
-                } else if (stop_running) {
-                    stop_running = FALSE;
-                    break;
                 }
                 if (client && client == focus_client &&
                     act->def->modifies_focused_window)
                 }
                 if (client && client == focus_client &&
                     act->def->modifies_focused_window)
index 6ee2bdd..b20b616 100644 (file)
@@ -103,6 +103,8 @@ void action_if_startup(void)
     actions_register("Stop", NULL, NULL, run_func_stop);
     actions_register("Continue", NULL, NULL, run_func_continue);
     actions_register("ForEach", setup_func, free_func, run_func_foreach);
     actions_register("Stop", NULL, NULL, run_func_stop);
     actions_register("Continue", NULL, NULL, run_func_continue);
     actions_register("ForEach", setup_func, free_func, run_func_foreach);
+
+    actions_set_can_stop("Stop", TRUE);
     //actions_register("GroupMembers", setup_func, free_func, run_func_group);
 }
 
     //actions_register("GroupMembers", setup_func, free_func, run_func_group);
 }
 
@@ -205,13 +207,6 @@ static void setup_query(Options* o, xmlNodePtr node, QueryTarget target) {
             g_free(s);
         }
     }
             g_free(s);
         }
     }
-    if ((n = obt_xml_find_node(node, "screendesktop"))) {
-        gchar *s;
-        if ((s = obt_xml_node_string(n))) {
-          q->screendesktop_number = atoi(s);
-          g_free(s);
-        }
-    }
     if ((n = obt_xml_find_node(node, "activedesktop"))) {
         q->screendesktop_number = obt_xml_node_int(n);
     }
     if ((n = obt_xml_find_node(node, "activedesktop"))) {
         q->screendesktop_number = obt_xml_node_int(n);
     }
@@ -466,7 +461,7 @@ static gboolean run_func_foreach(ObActionsData *data, gpointer options)
 
 static gboolean run_func_continue(ObActionsData *data, gpointer options)
 {
 
 static gboolean run_func_continue(ObActionsData *data, gpointer options)
 {
-    actions_stop_running();
+
 }
 
 /*
 }
 
 /*