[gnome-menus] Spaces/tabs fixes



commit d5da147d09ca09e593e4a88c11b782ee7479268f
Author: Vincent Untz <vuntz gnome org>
Date:   Sun Jun 12 09:58:20 2011 +0200

    Spaces/tabs fixes

 libmenu/desktop-entries.c |  149 +++++++++++++++++++++++----------------------
 libmenu/desktop-entries.h |    6 +-
 libmenu/gmenu-tree.c      |  127 +++++++++++++++++++-------------------
 libmenu/gmenu-tree.h      |   26 ++++----
 libmenu/menu-layout.c     |   12 ++--
 5 files changed, 160 insertions(+), 160 deletions(-)
---
diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
index a32caab..2d2ec2c 100644
--- a/libmenu/desktop-entries.c
+++ b/libmenu/desktop-entries.c
@@ -31,21 +31,21 @@
 
 struct DesktopEntry
 {
-  guint refcount;
+  guint       refcount;
 
-  char *path;
+  char       *path;
   const char *basename;
 
-  guint    type              : 2;
-  guint    reserved          : 30;
+  guint       type      : 2;
+  guint       reserved  : 30;
 };
 
-typedef struct 
+typedef struct
 {
-  DesktopEntry base;
+  DesktopEntry     base;
 
   GDesktopAppInfo *appinfo;
-  GQuark   *categories;
+  GQuark          *categories;
 } DesktopEntryDesktop;
 
 typedef struct
@@ -56,8 +56,8 @@ typedef struct
   char     *comment;
   char     *icon;
 
-  guint    nodisplay         : 1;
-  guint    hidden            : 1;
+  guint     nodisplay   : 1;
+  guint     hidden      : 1;
 } DesktopEntryDirectory;
 
 struct DesktopEntrySet
@@ -73,8 +73,8 @@ struct DesktopEntrySet
 /**
  * unix_basename_from_path:
  * @path: Path string
- * 
- * Returns: A constant pointer into the basename of @path 
+ *
+ * Returns: A constant pointer into the basename of @path
  */
 static const char *
 unix_basename_from_path (const char *path)
@@ -87,8 +87,8 @@ unix_basename_from_path (const char *path)
 }
 
 static gboolean
-key_file_get_show_in_gnome (GKeyFile  *key_file,
-			    const char  *desktop_entry_group)
+key_file_get_show_in_gnome (GKeyFile   *key_file,
+                            const char *desktop_entry_group)
 {
   gchar **strv;
   gboolean show_in_gnome = TRUE;
@@ -131,15 +131,15 @@ key_file_get_show_in_gnome (GKeyFile  *key_file,
         }
     }
   g_strfreev (strv);
-  
+
   return show_in_gnome;
 }
 
 static gboolean
-desktop_entry_load_directory (DesktopEntry *entry,
-			      GKeyFile     *key_file,
-			      const char   *desktop_entry_group,
-			      GError      **error)
+desktop_entry_load_directory (DesktopEntry  *entry,
+                              GKeyFile      *key_file,
+                              const char    *desktop_entry_group,
+                              GError       **error)
 {
   DesktopEntryDirectory *entry_directory = (DesktopEntryDirectory*)entry;
   char *type_str;
@@ -151,9 +151,9 @@ desktop_entry_load_directory (DesktopEntry *entry,
   if (strcmp (type_str, "Directory") != 0)
     {
       g_set_error (error,
-		   G_KEY_FILE_ERROR,
-		   G_KEY_FILE_ERROR_INVALID_VALUE,
-		   "\"%s\" does not contain the correct \"Type\" value\n", entry->path);
+                   G_KEY_FILE_ERROR,
+                   G_KEY_FILE_ERROR_INVALID_VALUE,
+                   "\"%s\" does not contain the correct \"Type\" value\n", entry->path);
       g_free (type_str);
       return FALSE;
     }
@@ -171,13 +171,13 @@ desktop_entry_load_directory (DesktopEntry *entry,
   entry_directory->comment      = g_key_file_get_locale_string (key_file, desktop_entry_group, "Comment", NULL, NULL);
   entry_directory->icon         = g_key_file_get_locale_string (key_file, desktop_entry_group, "Icon", NULL, NULL);
   entry_directory->nodisplay    = g_key_file_get_boolean (key_file,
-							  desktop_entry_group,
-							  "NoDisplay",
-							  NULL);
+                                                          desktop_entry_group,
+                                                          "NoDisplay",
+                                                          NULL);
   entry_directory->hidden       = g_key_file_get_boolean (key_file,
-							  desktop_entry_group,
-							  "Hidden",
-							  NULL);
+                                                          desktop_entry_group,
+                                                          "Hidden",
+                                                          NULL);
   return TRUE;
 }
 
@@ -196,53 +196,53 @@ desktop_entry_load (DesktopEntry *entry)
 
       entry_desktop->appinfo = g_desktop_app_info_new_from_filename (entry->path);
       if (!entry_desktop->appinfo)
-	{
-	  menu_verbose ("Failed to load \"%s\"\n", entry->path);
-	  return FALSE;
-	}
+        {
+          menu_verbose ("Failed to load \"%s\"\n", entry->path);
+          return FALSE;
+        }
 
       categories_str = g_desktop_app_info_get_categories (entry_desktop->appinfo);
       if (categories_str)
-	{
-	  char **categories;
-	  int i;
-
-	  categories = g_strsplit (categories_str, ";", -1);
-	  entry_desktop->categories = g_new0 (GQuark, g_strv_length (categories) + 1);
-      
-	  for (i = 0; categories[i]; i++)
-	    entry_desktop->categories[i] = g_quark_from_string (categories[i]);
-	  
-	  g_strfreev (categories);
-	}
+        {
+          char **categories;
+          int i;
+
+          categories = g_strsplit (categories_str, ";", -1);
+          entry_desktop->categories = g_new0 (GQuark, g_strv_length (categories) + 1);
+
+          for (i = 0; categories[i]; i++)
+            entry_desktop->categories[i] = g_quark_from_string (categories[i]);
+
+          g_strfreev (categories);
+        }
 
       return TRUE;
     }
   else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
     {
       key_file = g_key_file_new ();
-      
+
       if (!g_key_file_load_from_file (key_file, entry->path, 0, &error))
-	goto out;
-      
+        goto out;
+
       if (g_key_file_has_group (key_file, DESKTOP_ENTRY_GROUP))
-	desktop_entry_group = DESKTOP_ENTRY_GROUP;
+        desktop_entry_group = DESKTOP_ENTRY_GROUP;
       else
-	{
-	  if (g_key_file_has_group (key_file, KDE_DESKTOP_ENTRY_GROUP))
-	    desktop_entry_group = KDE_DESKTOP_ENTRY_GROUP;
-	  else
-	    {
-	      g_set_error (&error,
-			   G_KEY_FILE_ERROR,
-			   G_KEY_FILE_ERROR_INVALID_VALUE,
-			   "Desktop file does not have Desktop group");
-	      goto out;
-	    }
-	}
+        {
+          if (g_key_file_has_group (key_file, KDE_DESKTOP_ENTRY_GROUP))
+            desktop_entry_group = KDE_DESKTOP_ENTRY_GROUP;
+          else
+            {
+              g_set_error (&error,
+                           G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_INVALID_VALUE,
+                           "Desktop file does not have Desktop group");
+              goto out;
+            }
+        }
 
       if (!desktop_entry_load_directory (entry, key_file, desktop_entry_group, &error))
-	goto out;
+        goto out;
 
       g_key_file_free (key_file);
     }
@@ -315,10 +315,10 @@ desktop_entry_reload (DesktopEntry *entry)
 
       g_free (entry_directory->name);
       entry_directory->name = NULL;
-      
+
       g_free (entry_directory->comment);
       entry_directory->comment = NULL;
-      
+
       g_free (entry_directory->icon);
       entry_directory->icon = NULL;
     }
@@ -330,6 +330,7 @@ desktop_entry_reload (DesktopEntry *entry)
       desktop_entry_unref (entry);
       return NULL;
     }
+
   return entry;
 }
 
@@ -372,18 +373,18 @@ desktop_entry_copy (DesktopEntry *entry)
 
       i = 0;
       if (desktop_entry->categories != NULL)
-	{
-	  for (; desktop_entry->categories[i]; i++);
-	}
+        {
+          for (; desktop_entry->categories[i]; i++);
+        }
 
       retval_desktop_entry->categories = g_new0 (GQuark, i + 1);
-      
+
       i = 0;
       if (desktop_entry->categories != NULL)
-	{
-	  for (; desktop_entry->categories[i]; i++)
-	    retval_desktop_entry->categories[i] = desktop_entry->categories[i];
-	}
+        {
+          for (; desktop_entry->categories[i]; i++)
+            retval_desktop_entry->categories[i] = desktop_entry->categories[i];
+        }
     }
   else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
     {
@@ -393,8 +394,8 @@ desktop_entry_copy (DesktopEntry *entry)
       retval_directory->name         = g_strdup (entry_directory->name);
       retval_directory->comment      = g_strdup (entry_directory->comment);
       retval_directory->icon         = g_strdup (entry_directory->icon);
-      retval_directory->nodisplay         = entry_directory->nodisplay;
-      retval_directory->hidden            = entry_directory->hidden;
+      retval_directory->nodisplay    = entry_directory->nodisplay;
+      retval_directory->hidden       = entry_directory->hidden;
     }
 
   return retval;
@@ -418,7 +419,7 @@ desktop_entry_unref (DesktopEntry *entry)
       DesktopEntryDesktop *desktop_entry = (DesktopEntryDesktop*) entry;
       g_free (desktop_entry->categories);
       if (desktop_entry->appinfo)
-	g_object_unref (desktop_entry->appinfo);
+        g_object_unref (desktop_entry->appinfo);
     }
   else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
     {
@@ -426,7 +427,7 @@ desktop_entry_unref (DesktopEntry *entry)
 
       g_free (entry_directory->name);
       entry_directory->name = NULL;
-      
+
       g_free (entry_directory->comment);
       entry_directory->comment = NULL;
 
diff --git a/libmenu/desktop-entries.h b/libmenu/desktop-entries.h
index f05369c..ae0dfd5 100644
--- a/libmenu/desktop-entries.h
+++ b/libmenu/desktop-entries.h
@@ -43,13 +43,13 @@ void          desktop_entry_unref  (DesktopEntry *entry);
 DesktopEntryType  desktop_entry_get_type     (DesktopEntry *entry);
 const char       *desktop_entry_get_path     (DesktopEntry *entry);
 const char       *desktop_entry_get_basename (DesktopEntry *entry);
-const char       *desktop_entry_get_name  (DesktopEntry *entry);
+const char       *desktop_entry_get_name     (DesktopEntry *entry);
 const char       *desktop_entry_get_comment  (DesktopEntry *entry);
+gboolean          desktop_entry_get_hidden   (DesktopEntry *entry);
 gboolean          desktop_entry_get_no_display (DesktopEntry *entry);
-gboolean          desktop_entry_get_hidden (DesktopEntry *entry);
 
 /* Only valid for DESKTOP_ENTRY_DIRECTORY */
-const char * desktop_entry_desktop_get_icon (DesktopEntry *entry);
+const char       *desktop_entry_desktop_get_icon (DesktopEntry *entry);
 
 /* Only valid for DESKTOP_ENTRY_DESKTOP */
 GDesktopAppInfo  *desktop_entry_get_app_info (DesktopEntry *entry);
diff --git a/libmenu/gmenu-tree.c b/libmenu/gmenu-tree.c
index 7f65e47..b3c325f 100644
--- a/libmenu/gmenu-tree.c
+++ b/libmenu/gmenu-tree.c
@@ -78,22 +78,20 @@ G_DEFINE_TYPE (GMenuTree, gmenu_tree, G_TYPE_OBJECT)
 
 struct GMenuTreeItem
 {
+  gint refcount;
+
   GMenuTreeItemType type;
 
   GMenuTreeDirectory *parent;
-  
-  gint refcount;
 };
 
 struct GMenuTreeIter
 {
   gint refcount;
 
-  gint tree_serial;
-
   GMenuTreeItem *item;
-  GSList *contents;
-  GSList *contents_iter;
+  GSList        *contents;
+  GSList        *contents_iter;
 };
 
 struct GMenuTreeDirectory
@@ -160,10 +158,10 @@ struct GMenuTreeAlias
 };
 
 static gboolean  gmenu_tree_load_layout          (GMenuTree       *tree,
-						  GError         **error);
+                                                  GError         **error);
 static void      gmenu_tree_force_reload         (GMenuTree       *tree);
 static gboolean  gmenu_tree_build_from_layout    (GMenuTree       *tree,
-						  GError         **error);
+                                                  GError         **error);
 static void      gmenu_tree_force_rebuild        (GMenuTree       *tree);
 static void      gmenu_tree_resolve_files        (GMenuTree       *tree,
 						  GHashTable      *loaded_menu_files,
@@ -392,7 +390,7 @@ canonicalize_basename (GMenuTree  *tree,
 
 static gboolean
 gmenu_tree_canonicalize_path (GMenuTree *tree,
-			      GError   **error)
+                              GError   **error)
 {
   if (tree->canonical)
     return TRUE;
@@ -400,34 +398,34 @@ gmenu_tree_canonicalize_path (GMenuTree *tree,
   g_assert (tree->canonical_path == NULL);
 
   gmenu_tree_remove_menu_file_monitors (tree);
-  
+
   if (strcmp (tree->basename, "applications.menu") == 0 &&
       g_getenv ("XDG_MENU_PREFIX"))
     {
       char *prefixed_basename;
       prefixed_basename = g_strdup_printf ("%s%s",
-					   g_getenv ("XDG_MENU_PREFIX"),
-					   tree->basename);
+                                           g_getenv ("XDG_MENU_PREFIX"),
+                                           tree->basename);
       canonicalize_basename (tree, prefixed_basename);
       g_free (prefixed_basename);
     }
-  
+
   if (!tree->canonical)
     canonicalize_basename (tree, tree->basename);
-  
+
   if (tree->canonical)
     {
       menu_verbose ("Successfully looked up menu_file for \"%s\": %s\n",
-		    tree->basename, tree->canonical_path);
+                    tree->basename, tree->canonical_path);
       return TRUE;
     }
   else
     {
       g_set_error (error,
-		   G_IO_ERROR,
-		   G_IO_ERROR_FAILED,
-		   "Failed to look up menu_file for \"%s\"\n",
-		   tree->basename);
+                   G_IO_ERROR,
+                   G_IO_ERROR_FAILED,
+                   "Failed to look up menu_file for \"%s\"\n",
+                   tree->basename);
       return FALSE;
     }
 }
@@ -457,7 +455,7 @@ gmenu_tree_force_recanonicalize (GMenuTree *tree)
  */
 GMenuTree *
 gmenu_tree_new (const char     *name,
-		GMenuTreeFlags  flags)
+                GMenuTreeFlags  flags)
 {
   g_return_val_if_fail (name != NULL, NULL);
 
@@ -465,10 +463,10 @@ gmenu_tree_new (const char     *name,
 }
 
 static void
-gmenu_tree_set_property(GObject         *object,
-			guint            prop_id,
-			const GValue    *value,
-			GParamSpec      *pspec)
+gmenu_tree_set_property (GObject         *object,
+                         guint            prop_id,
+                         const GValue    *value,
+                         GParamSpec      *pspec)
 {
   GMenuTree *self = GMENU_TREE (object);
 
@@ -489,10 +487,10 @@ gmenu_tree_set_property(GObject         *object,
 }
 
 static void
-gmenu_tree_get_property(GObject         *object,
-			guint            prop_id,
-			GValue          *value,
-			GParamSpec      *pspec)
+gmenu_tree_get_property (GObject         *object,
+                         guint            prop_id,
+                         GValue          *value,
+                         GParamSpec      *pspec)
 {
   GMenuTree *self = GMENU_TREE (object);
 
@@ -550,7 +548,7 @@ gmenu_tree_class_init (GMenuTreeClass *klass)
   g_object_class_install_property (gobject_class,
                                    PROP_NAME,
                                    g_param_spec_string ("name", "", "",
-							NULL,
+                                                        NULL,
                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
   /**
    * GMenuTree:flags
@@ -560,9 +558,9 @@ gmenu_tree_class_init (GMenuTreeClass *klass)
   g_object_class_install_property (gobject_class,
                                    PROP_FLAGS,
                                    g_param_spec_flags ("flags", "", "",
-						       GMENU_TYPE_TREE_FLAGS,
-						       GMENU_TREE_FLAGS_NONE,
-						       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+                                                       GMENU_TYPE_TREE_FLAGS,
+                                                       GMENU_TREE_FLAGS_NONE,
+                                                       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
   /**
    * GMenuTree:changed
@@ -581,14 +579,13 @@ gmenu_tree_class_init (GMenuTreeClass *klass)
                     G_TYPE_NONE, 0);
 }
 
-
 /**
  * gmenu_tree_get_menu_path:
  * @tree: a #GMenuTree
  *
  * This function is only available if the tree has been loaded via
  * gmenu_tree_load_sync() or a variant thereof.
- * 
+ *
  * Returns: The absolute path to the loaded menu file
  */
 const char *
@@ -608,12 +605,12 @@ gmenu_tree_get_menu_path (GMenuTree *tree)
  * Synchronously load the menu contents.  This function
  * performs a significant amount of blocking I/O if the
  * tree has not been loaded yet.
- * 
+ *
  * Returns: %TRUE on success, %FALSE on error
  */
 gboolean
-gmenu_tree_load_sync (GMenuTree   *tree,
-		      GError     **error)
+gmenu_tree_load_sync (GMenuTree  *tree,
+                      GError    **error)
 {
   if (!tree->loaded)
     {
@@ -636,7 +633,7 @@ gmenu_tree_load_sync (GMenuTree   *tree,
  *
  * Get the root directory; you must have loaded the tree first (at
  * least once) via gmenu_tree_load_sync() or a variant thereof.
- * 
+ *
  * Returns: (transfer full): Root of the tree
  */
 GMenuTreeDirectory *
@@ -779,7 +776,7 @@ gmenu_tree_item_set_parent (GMenuTreeItem      *item,
  * Increment the reference count of @iter
  */
 GMenuTreeIter *
-gmenu_tree_iter_ref     (GMenuTreeIter *iter)
+gmenu_tree_iter_ref (GMenuTreeIter *iter)
 {
   g_atomic_int_inc (&iter->refcount);
   return iter;
@@ -792,7 +789,7 @@ gmenu_tree_iter_ref     (GMenuTreeIter *iter)
  * Decrement the reference count of @iter
  */
 void
-gmenu_tree_iter_unref   (GMenuTreeIter *iter)
+gmenu_tree_iter_unref (GMenuTreeIter *iter)
 {
   if (!g_atomic_int_dec_and_test (&iter->refcount))
     return;
@@ -836,7 +833,7 @@ gmenu_tree_directory_iter (GMenuTreeDirectory *directory)
  * Returns: The type of the next item that can be retrived from the iterator
  */
 GMenuTreeItemType
-gmenu_tree_iter_next (GMenuTreeIter   *iter)
+gmenu_tree_iter_next (GMenuTreeIter *iter)
 {
   g_return_val_if_fail (iter != NULL, GMENU_TREE_ITEM_INVALID);
 
@@ -860,12 +857,12 @@ gmenu_tree_iter_next (GMenuTreeIter   *iter)
  * Returns: (transfer full): A directory
  */
 GMenuTreeDirectory *
-gmenu_tree_iter_get_directory (GMenuTreeIter   *iter)
+gmenu_tree_iter_get_directory (GMenuTreeIter *iter)
 {
   g_return_val_if_fail (iter != NULL, NULL);
   g_return_val_if_fail (iter->item != NULL, NULL);
   g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_DIRECTORY, NULL);
- 
+
   return (GMenuTreeDirectory*)gmenu_tree_item_ref (iter->item);
 }
 
@@ -879,12 +876,12 @@ gmenu_tree_iter_get_directory (GMenuTreeIter   *iter)
  * Returns: (transfer full): An entry
  */
 GMenuTreeEntry *
-gmenu_tree_iter_get_entry (GMenuTreeIter   *iter)
+gmenu_tree_iter_get_entry (GMenuTreeIter *iter)
 {
   g_return_val_if_fail (iter != NULL, NULL);
   g_return_val_if_fail (iter->item != NULL, NULL);
   g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_ENTRY, NULL);
- 
+
   return (GMenuTreeEntry*)gmenu_tree_item_ref (iter->item);
 }
 
@@ -898,12 +895,12 @@ gmenu_tree_iter_get_entry (GMenuTreeIter   *iter)
  * Returns: (transfer full): A header
  */
 GMenuTreeHeader *
-gmenu_tree_iter_get_header (GMenuTreeIter   *iter)
+gmenu_tree_iter_get_header (GMenuTreeIter *iter)
 {
   g_return_val_if_fail (iter != NULL, NULL);
   g_return_val_if_fail (iter->item != NULL, NULL);
   g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_HEADER, NULL);
- 
+
   return (GMenuTreeHeader*)gmenu_tree_item_ref (iter->item);
 }
 
@@ -917,12 +914,12 @@ gmenu_tree_iter_get_header (GMenuTreeIter   *iter)
  * Returns: (transfer full): An alias
  */
 GMenuTreeAlias *
-gmenu_tree_iter_get_alias (GMenuTreeIter   *iter)
+gmenu_tree_iter_get_alias (GMenuTreeIter *iter)
 {
   g_return_val_if_fail (iter != NULL, NULL);
   g_return_val_if_fail (iter->item != NULL, NULL);
   g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_ALIAS, NULL);
- 
+
   return (GMenuTreeAlias*)gmenu_tree_item_ref (iter->item);
 }
 
@@ -1077,7 +1074,6 @@ gmenu_tree_alias_get_item_type (GMenuTreeAlias *alias)
   return alias->aliased_item->type;
 }
 
-
 GMenuTreeDirectory *
 gmenu_tree_alias_get_directory (GMenuTreeAlias *alias)
 {
@@ -1098,10 +1094,10 @@ gmenu_tree_alias_get_aliased_directory (GMenuTreeAlias *alias)
   g_return_val_if_fail (alias != NULL, NULL);
   g_return_val_if_fail (((GMenuTreeItem*)alias->aliased_item)->type == GMENU_TREE_ITEM_DIRECTORY, NULL);
 
-  return (GMenuTreeDirectory*)gmenu_tree_item_ref (alias->aliased_item);
+  return (GMenuTreeDirectory *) gmenu_tree_item_ref (alias->aliased_item);
 }
-/**
 
+/**
  * gmenu_tree_alias_get_aliased_entry:
  * @alias: alias
  *
@@ -1113,7 +1109,7 @@ gmenu_tree_alias_get_aliased_entry (GMenuTreeAlias *alias)
   g_return_val_if_fail (alias != NULL, NULL);
   g_return_val_if_fail (((GMenuTreeItem*)alias->aliased_item)->type == GMENU_TREE_ITEM_ENTRY, NULL);
 
-  return (GMenuTreeEntry*)gmenu_tree_item_ref (alias->aliased_item);
+  return (GMenuTreeEntry *) gmenu_tree_item_ref (alias->aliased_item);
 }
 
 static GMenuTreeDirectory *
@@ -1263,6 +1259,7 @@ gmenu_tree_header_finalize (GMenuTreeHeader *header)
   if (header->directory != NULL)
     gmenu_tree_item_unref (header->directory);
   header->directory = NULL;
+
   g_slice_free (GMenuTreeHeader, header);
 }
 
@@ -1306,6 +1303,7 @@ gmenu_tree_alias_finalize (GMenuTreeAlias *alias)
   if (alias->aliased_item != NULL)
     gmenu_tree_item_unref (alias->aliased_item);
   alias->aliased_item = NULL;
+
   g_slice_free (GMenuTreeAlias, alias);
 }
 
@@ -1343,6 +1341,7 @@ gmenu_tree_entry_finalize (GMenuTreeEntry *entry)
   if (entry->desktop_entry)
     desktop_entry_unref (entry->desktop_entry);
   entry->desktop_entry = NULL;
+
   g_slice_free (GMenuTreeEntry, entry);
 }
 
@@ -1454,9 +1453,9 @@ gmenu_tree_item_compare_get_name_helper (GMenuTreeItem    *item,
 
     case GMENU_TREE_ITEM_ENTRY:
       if (flags & GMENU_TREE_FLAGS_SORT_DISPLAY_NAME)
-	name = g_app_info_get_display_name (G_APP_INFO (gmenu_tree_entry_get_app_info (GMENU_TREE_ENTRY (item))));
+        name = g_app_info_get_display_name (G_APP_INFO (gmenu_tree_entry_get_app_info (GMENU_TREE_ENTRY (item))));
       else
-	name = desktop_entry_get_name (GMENU_TREE_ENTRY (item)->desktop_entry);
+        name = desktop_entry_get_name (GMENU_TREE_ENTRY (item)->desktop_entry);
       break;
 
     case GMENU_TREE_ITEM_ALIAS:
@@ -2747,8 +2746,8 @@ gmenu_tree_execute_moves (GMenuTree      *tree,
 }
 
 static gboolean
-gmenu_tree_load_layout (GMenuTree *tree,
-			GError   **error)
+gmenu_tree_load_layout (GMenuTree  *tree,
+                        GError    **error)
 {
   GHashTable *loaded_menu_files;
 
@@ -2763,7 +2762,7 @@ gmenu_tree_load_layout (GMenuTree *tree,
 
   error = NULL;
   tree->layout = menu_layout_load (tree->canonical_path,
-				   tree->basename,
+                                   tree->basename,
                                    error);
   if (!tree->layout)
     return FALSE;
@@ -3964,7 +3963,7 @@ merge_subdirs (GMenuTree          *tree,
 
   subdirs = g_slist_sort_with_data (subdirs,
 				    (GCompareDataFunc) gmenu_tree_item_compare,
-				    0);
+                                    0);
 
   tmp = subdirs;
   while (tmp != NULL)
@@ -4009,7 +4008,7 @@ merge_entries (GMenuTree          *tree,
 
   entries = g_slist_sort_with_data (entries,
 				    (GCompareDataFunc) gmenu_tree_item_compare,
-				    GINT_TO_POINTER (tree->flags));
+                                    GINT_TO_POINTER (tree->flags));
 
   tmp = entries;
   while (tmp != NULL)
@@ -4058,7 +4057,7 @@ merge_subdirs_and_entries (GMenuTree          *tree,
 
   items = g_slist_sort_with_data (items,
 				  (GCompareDataFunc) gmenu_tree_item_compare,
-				  GINT_TO_POINTER (tree->flags));
+                                  GINT_TO_POINTER (tree->flags));
 
   tmp = items;
   while (tmp != NULL)
@@ -4313,8 +4312,8 @@ handle_entries_changed (MenuLayoutNode *layout,
 }
 
 static gboolean
-gmenu_tree_build_from_layout (GMenuTree *tree,
-			      GError   **error)
+gmenu_tree_build_from_layout (GMenuTree  *tree,
+                              GError    **error)
 {
   DesktopEntrySet *allocated;
 
@@ -4350,7 +4349,7 @@ gmenu_tree_build_from_layout (GMenuTree *tree,
     }
 
   desktop_entry_set_unref (allocated);
-  
+
   return TRUE;
 }
 
diff --git a/libmenu/gmenu-tree.h b/libmenu/gmenu-tree.h
index 14716b8..7ab8d43 100644
--- a/libmenu/gmenu-tree.h
+++ b/libmenu/gmenu-tree.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004,2011 Red Hat, Inc.
+ * Copyright (C) 2004, 2011 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -43,7 +43,7 @@ struct _GMenuTreeClass
   GObjectClass parent_class;
 };
 
-GType            gmenu_tree_get_type          (void) G_GNUC_CONST;
+GType gmenu_tree_get_type (void) G_GNUC_CONST;
 
 typedef struct GMenuTreeIter      GMenuTreeIter;
 typedef struct GMenuTreeDirectory GMenuTreeDirectory;
@@ -84,10 +84,10 @@ GType gmenu_tree_flags_get_type (void);
 #define GMENU_TYPE_TREE_FLAGS (gmenu_tree_flags_get_type ())
 
 GMenuTree *gmenu_tree_new (const char     *menu_file,
-			   GMenuTreeFlags  flags);
+                           GMenuTreeFlags  flags);
 
-gboolean   gmenu_tree_load_sync (GMenuTree   *tree,
-				 GError     **error);
+gboolean   gmenu_tree_load_sync (GMenuTree  *tree,
+                                 GError    **error);
 
 const char         *gmenu_tree_get_menu_path           (GMenuTree  *tree);
 GMenuTreeDirectory *gmenu_tree_get_root_directory      (GMenuTree  *tree);
@@ -106,16 +106,16 @@ const char *gmenu_tree_directory_get_menu_id           (GMenuTreeDirectory *dire
 
 gboolean gmenu_tree_directory_get_is_nodisplay (GMenuTreeDirectory *directory);
 
-GMenuTreeIter *gmenu_tree_directory_iter               (GMenuTreeDirectory *directory);
+GMenuTreeIter      *gmenu_tree_directory_iter            (GMenuTreeDirectory *directory);
 
-GMenuTreeIter *gmenu_tree_iter_ref     (GMenuTreeIter *iter);
-void           gmenu_tree_iter_unref   (GMenuTreeIter *iter);
+GMenuTreeIter      *gmenu_tree_iter_ref                  (GMenuTreeIter *iter);
+void                gmenu_tree_iter_unref                (GMenuTreeIter *iter);
 
-GMenuTreeItemType   gmenu_tree_iter_next                 (GMenuTreeIter   *iter); 
-GMenuTreeDirectory *gmenu_tree_iter_get_directory        (GMenuTreeIter   *iter); 
-GMenuTreeEntry     *gmenu_tree_iter_get_entry            (GMenuTreeIter   *iter); 
-GMenuTreeHeader    *gmenu_tree_iter_get_header           (GMenuTreeIter   *iter); 
-GMenuTreeAlias     *gmenu_tree_iter_get_alias            (GMenuTreeIter   *iter); 
+GMenuTreeItemType   gmenu_tree_iter_next                 (GMenuTreeIter *iter);
+GMenuTreeDirectory *gmenu_tree_iter_get_directory        (GMenuTreeIter *iter);
+GMenuTreeEntry     *gmenu_tree_iter_get_entry            (GMenuTreeIter *iter);
+GMenuTreeHeader    *gmenu_tree_iter_get_header           (GMenuTreeIter *iter);
+GMenuTreeAlias     *gmenu_tree_iter_get_alias            (GMenuTreeIter *iter);
 
 char *gmenu_tree_directory_make_path (GMenuTreeDirectory *directory,
 				      GMenuTreeEntry     *entry);
diff --git a/libmenu/menu-layout.c b/libmenu/menu-layout.c
index 57c5660..2c88518 100644
--- a/libmenu/menu-layout.c
+++ b/libmenu/menu-layout.c
@@ -173,7 +173,7 @@ handle_entry_directory_changed (EntryDirectory *dir,
     {
       nr->monitors_idle_handler = g_idle_source_new ();
       g_source_set_callback (nr->monitors_idle_handler,
-			     (GSourceFunc) menu_layout_invoke_monitors, nr, NULL);
+                             (GSourceFunc) menu_layout_invoke_monitors, nr, NULL);
       g_source_attach (nr->monitors_idle_handler, nr->main_context);
       g_source_unref (nr->monitors_idle_handler);
     }
@@ -247,13 +247,13 @@ menu_layout_node_unref (MenuLayoutNode *node)
           g_slist_foreach (nr->monitors, (GFunc) g_free, NULL);
           g_slist_free (nr->monitors);
 
-	  if (nr->main_context != NULL)
-	    g_main_context_unref (nr->main_context);
-	  nr->main_context = NULL;
+          if (nr->main_context != NULL)
+            g_main_context_unref (nr->main_context);
+          nr->main_context = NULL;
 
           if (nr->monitors_idle_handler != NULL)
-	    g_source_destroy (nr->monitors_idle_handler);
-	  nr->monitors_idle_handler = NULL;
+            g_source_destroy (nr->monitors_idle_handler);
+          nr->monitors_idle_handler = NULL;
 
           g_free (nr->basedir);
           g_free (nr->name);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]