[Xfce4-commits] <garcon:master> Fix coding style a bit.

Jannis Pohlmann noreply at xfce.org
Sun Jun 26 14:10:01 CEST 2011


Updating branch refs/heads/master
         to 3634884a49a513e27a32b6a91e9558052a1a735d (commit)
       from 8e056c7e9b900d9adfb3181cdee4f40dc1e104da (commit)

commit 3634884a49a513e27a32b6a91e9558052a1a735d
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sun Jun 26 14:08:12 2011 +0200

    Fix coding style a bit.
    
    There are quite a number of places where the "< 90 chars per row" rule
    is not honored. I guess at som point it would be good to copy the coding
    style file over from tumbler and extend it by a few manual wrapping
    rules.

 garcon/garcon-menu-merger.c |    4 +++-
 garcon/garcon-menu-node.c   |   20 ++++++++++++++------
 garcon/garcon-menu.c        |   17 ++++++++++++-----
 3 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/garcon/garcon-menu-merger.c b/garcon/garcon-menu-merger.c
index da6ea93..179191c 100644
--- a/garcon/garcon-menu-merger.c
+++ b/garcon/garcon-menu-merger.c
@@ -686,7 +686,9 @@ garcon_menu_merger_remove_duplicate_paths (GNode             *node,
           remaining_nodes = g_slist_prepend (remaining_nodes, child);
         }
       else
-        destroy_nodes = g_slist_prepend (destroy_nodes, child);
+        {
+          destroy_nodes = g_slist_prepend (destroy_nodes, child);
+        }
     }
 
   g_slist_foreach (destroy_nodes, (GFunc) garcon_menu_node_tree_free, NULL);
diff --git a/garcon/garcon-menu-node.c b/garcon/garcon-menu-node.c
index f7e8e0a..f43937e 100644
--- a/garcon/garcon-menu-node.c
+++ b/garcon/garcon-menu-node.c
@@ -449,15 +449,23 @@ garcon_menu_node_tree_get_child_node (GNode             *tree,
 
   if (reverse)
     {
-      for (child = g_node_last_child (tree); child != NULL; child = g_node_prev_sibling (child))
-        if (garcon_menu_node_tree_get_node_type (child) == type)
-          return child;
+      for (child = g_node_last_child (tree); 
+           child != NULL;
+           child = g_node_prev_sibling (child))
+        {
+          if (garcon_menu_node_tree_get_node_type (child) == type)
+            return child;
+        }
     }
   else
     {
-      for (child = g_node_first_child (tree); child != NULL; child = g_node_next_sibling (child))
-        if (garcon_menu_node_tree_get_node_type (child) == type)
-          return child;
+      for (child = g_node_first_child (tree);
+           child != NULL;
+           child = g_node_next_sibling (child))
+        {
+          if (garcon_menu_node_tree_get_node_type (child) == type)
+            return child;
+        }
     }
 
   return NULL;
diff --git a/garcon/garcon-menu.c b/garcon/garcon-menu.c
index 8cbf9de..8022e50 100644
--- a/garcon/garcon-menu.c
+++ b/garcon/garcon-menu.c
@@ -1218,8 +1218,9 @@ garcon_menu_resolve_items (GarconMenu *menu,
 
   g_return_if_fail (menu != NULL && GARCON_IS_MENU (menu));
 
-  menu_only_unallocated = garcon_menu_node_tree_get_boolean_child (menu->priv->tree,
-                                                                   GARCON_MENU_NODE_TYPE_ONLY_UNALLOCATED);
+  menu_only_unallocated = 
+    garcon_menu_node_tree_get_boolean_child (menu->priv->tree,
+                                             GARCON_MENU_NODE_TYPE_ONLY_UNALLOCATED);
 
   /* Resolve items in this menu (if it matches the only_unallocated argument.
    * This means that in the first pass, all items of menus without
@@ -1253,7 +1254,8 @@ garcon_menu_resolve_items (GarconMenu *menu,
   for (submenu = menu->priv->submenus; submenu != NULL; submenu = g_list_next (submenu))
     {
       /* Resolve items of the submenu */
-      garcon_menu_resolve_items (GARCON_MENU (submenu->data), desktop_id_table, only_unallocated);
+      garcon_menu_resolve_items (GARCON_MENU (submenu->data), desktop_id_table,
+                                 only_unallocated);
     }
 }
 
@@ -2074,7 +2076,10 @@ static void
 garcon_menu_file_emit_reload_required (GarconMenu *menu)
 {
   if (menu->priv->idle_reload_required_id == 0)
-    menu->priv->idle_reload_required_id = g_idle_add (garcon_menu_file_emit_reload_required_idle, menu);
+    {
+      menu->priv->idle_reload_required_id = 
+        g_idle_add (garcon_menu_file_emit_reload_required_idle, menu);
+    }
 }
 
 
@@ -2114,7 +2119,9 @@ garcon_menu_file_changed (GarconMenu       *menu,
   paths = garcon_config_build_paths (relative_filename);
 
   /* Check if the event file has higher priority than the file currently being used */
-  for (n = 0; !lower_priority && !higher_priority && paths != NULL && paths[n] != NULL; ++n) 
+  for (n = 0; 
+       !lower_priority && !higher_priority && paths != NULL && paths[n] != NULL;
+       ++n) 
     {
       menu_file = g_file_new_for_path (paths[n]);
 



More information about the Xfce4-commits mailing list