[Xfce4-commits] <xfce4-panel:devel> Small code cleanup in the window menu.

Nick Schermer nick at xfce.org
Tue Aug 11 20:30:41 CEST 2009


Updating branch refs/heads/devel
         to c5556b13ae9bc716dd2ae3f0e780b86caebad6b4 (commit)
       from ca1061f6b2bb6cbaf7951dd05692bc55bf822864 (commit)

commit c5556b13ae9bc716dd2ae3f0e780b86caebad6b4
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Mar 20 20:48:53 2009 +0100

    Small code cleanup in the window menu.

 plugins/windowmenu/windowmenu.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
index 05156be..b286855 100644
--- a/plugins/windowmenu/windowmenu.c
+++ b/plugins/windowmenu/windowmenu.c
@@ -698,17 +698,17 @@ window_menu_plugin_windows_connect (WindowMenuPlugin *plugin,
   g_signal_connect (G_OBJECT (plugin->screen), "window-closed",
       G_CALLBACK (window_menu_plugin_window_closed), plugin);
 
-  if (traverse_windows)
+  if (!traverse_windows)
+    return;
+
+  /* connect the state changed signal to all windows */
+  windows = wnck_screen_get_windows (plugin->screen);
+  for (li = windows; li != NULL; li = li->next)
     {
-      /* connect the state changed signal to all windows */
-      windows = wnck_screen_get_windows (plugin->screen);
-      for (li = windows; li != NULL; li = li->next)
-        {
-          panel_return_if_fail (WNCK_IS_WINDOW (li->data));
-          window_menu_plugin_window_opened (plugin->screen,
-                                            WNCK_WINDOW (li->data),
-                                            plugin);
-        }
+      panel_return_if_fail (WNCK_IS_WINDOW (li->data));
+      window_menu_plugin_window_opened (plugin->screen,
+                                        WNCK_WINDOW (li->data),
+                                        plugin);
     }
 }
 



More information about the Xfce4-commits mailing list