Updating branch refs/heads/master
         to e404773f86ae5b0458be2a2746fc505d2e27d034 (commit)
       from c63c7b91f1b9cca982a9441de5397d4019fa6fb0 (commit)

commit e404773f86ae5b0458be2a2746fc505d2e27d034
Author: Nick Schermer <[email protected]>
Date:   Sun Aug 16 13:30:22 2009 +0200

    Revert "Use the return value of g_key_file_load_from_file, not the error."
    
    This reverts commit 3e471653350e674c1910bd2826a0dd1c331a8894.

 garcon/garcon-menu-item.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
index 816daef..844904d 100644
--- a/garcon/garcon-menu-item.c
+++ b/garcon/garcon-menu-item.c
@@ -531,6 +531,7 @@ garcon_menu_item_new (const gchar *uri)
 {
   GarconMenuItem *item = NULL;
   GKeyFile       *rc = NULL;
+  GError         *error = NULL;
   GFile          *file;
   GList          *categories = NULL;
   gboolean        terminal;
@@ -559,8 +560,12 @@ garcon_menu_item_new (const gchar *uri)
 
   /* Try to open the .desktop file */
   rc = g_key_file_new ();
-  if (!g_key_file_load_from_file (rc, filename, G_KEY_FILE_NONE, NULL))
-    goto error;
+  g_key_file_load_from_file (rc, filename, G_KEY_FILE_NONE, &error);
+  if (G_UNLIKELY (error != NULL))
+    {
+      g_error_free (error);
+      goto error;
+    }
 
   /* Abort if the file has been marked as "deleted"/hidden */
   if (G_UNLIKELY (g_key_file_get_boolean (rc, "Desktop Entry", "Hidden", 
NULL)))
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to