Hello community,

here is the log from the commit of package cinnamon-menus for openSUSE:Factory 
checked in at 2016-06-02 09:39:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon-menus (Old)
 and      /work/SRC/openSUSE:Factory/.cinnamon-menus.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cinnamon-menus"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cinnamon-menus/cinnamon-menus.changes    
2016-05-29 03:12:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cinnamon-menus.new/cinnamon-menus.changes       
2016-06-02 09:39:51.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Jun  1 12:43:15 UTC 2016 - sor.ale...@meowr.ru
+
+- Update to version 3.0.2:
+  * Go back to loading .desktop files as GDesktopAppInfo – this
+    is the only way g_desktop_app_info_get_filename() will work
+    properly.
+
+-------------------------------------------------------------------

Old:
----
  cinnamon-menus-3.0.1.tar.gz

New:
----
  cinnamon-menus-3.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cinnamon-menus.spec ++++++
--- /var/tmp/diff_new_pack.V46DtU/_old  2016-06-02 09:39:52.000000000 +0200
+++ /var/tmp/diff_new_pack.V46DtU/_new  2016-06-02 09:39:52.000000000 +0200
@@ -20,7 +20,7 @@
 %define soname  libcinnamon-menu-3
 %define sover   0
 Name:           cinnamon-menus
-Version:        3.0.1
+Version:        3.0.2
 Release:        0
 Summary:        A menu system for the Cinnamon Desktop
 License:        LGPL-2.1+

++++++ cinnamon-menus-3.0.1.tar.gz -> cinnamon-menus-3.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-menus-3.0.1/configure.ac 
new/cinnamon-menus-3.0.2/configure.ac
--- old/cinnamon-menus-3.0.1/configure.ac       2016-05-23 13:55:09.000000000 
+0200
+++ new/cinnamon-menus-3.0.2/configure.ac       2016-05-30 16:47:10.000000000 
+0200
@@ -1,6 +1,6 @@
 AC_PREREQ(2.62)
 
-AC_INIT([cinnamon-menus], [3.0.1])
+AC_INIT([cinnamon-menus], [3.0.2])
 AC_CONFIG_SRCDIR(libmenu/gmenu-tree.h)
 
 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-menus-3.0.1/debian/changelog 
new/cinnamon-menus-3.0.2/debian/changelog
--- old/cinnamon-menus-3.0.1/debian/changelog   2016-05-23 13:55:09.000000000 
+0200
+++ new/cinnamon-menus-3.0.2/debian/changelog   2016-05-30 16:47:10.000000000 
+0200
@@ -1,3 +1,11 @@
+cinnamon-menus (3.0.2) sarah; urgency=medium
+
+  [ Michael Webster ]
+  * Fix a couple issues with incorrect result evaluations when loading desktop 
files caused by 44ee2de737e53b0
+  * Revert 44ee2de737e53b and go back to loading .desktop files *as* 
GDesktopAppInfo - this is the only way g_desktop_app_info_get_filename() will 
work properly.
+
+ -- Clement Lefebvre <r...@linuxmint.com>  Mon, 30 May 2016 15:45:57 +0100
+
 cinnamon-menus (3.0.1) sarah; urgency=medium
 
   [ Michael Webster ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-menus-3.0.1/libmenu/desktop-entries.c 
new/cinnamon-menus-3.0.2/libmenu/desktop-entries.c
--- old/cinnamon-menus-3.0.1/libmenu/desktop-entries.c  2016-05-23 
13:55:09.000000000 +0200
+++ new/cinnamon-menus-3.0.2/libmenu/desktop-entries.c  2016-05-30 
16:47:10.000000000 +0200
@@ -266,65 +266,54 @@
 static DesktopEntryResultCode
 desktop_entry_load (DesktopEntry *entry)
 {
-  DesktopEntryResultCode rescode = DESKTOP_ENTRY_LOAD_FAIL_OTHER;
-
   if (strstr (entry->path, "/menu-xdg/"))
-    return rescode;
-
+    return DESKTOP_ENTRY_LOAD_FAIL_OTHER;
   if (entry->type == DESKTOP_ENTRY_DESKTOP)
     {
       GKeyFile *key_file = NULL;
       DesktopEntryDesktop *entry_desktop = (DesktopEntryDesktop*)entry;
+      const char *categories_str;
 
-      key_file = g_key_file_new ();
-
-      if (g_key_file_load_from_file (key_file, entry->path, 0, NULL))
+      entry_desktop->appinfo = g_desktop_app_info_new_from_filename 
(entry->path);
+      if (!entry_desktop->appinfo ||
+          !g_app_info_get_name (G_APP_INFO (entry_desktop->appinfo)) ||
+          !g_app_info_get_executable (G_APP_INFO (entry_desktop->appinfo)))
         {
-          entry_desktop->appinfo = g_desktop_app_info_new_from_keyfile 
(key_file);
-
-          if (!entry_desktop->appinfo ||
-              !g_app_info_get_name (G_APP_INFO (entry_desktop->appinfo)) ||
-              !g_app_info_get_executable (G_APP_INFO (entry_desktop->appinfo)))
-            {
-              menu_verbose ("Failed to load appinfo for \"%s\"\n", 
entry->path);
-              rescode = DESKTOP_ENTRY_LOAD_FAIL_APPINFO;
-            }
-          else
-            {
-              const char *categories_str;
-              categories_str = g_desktop_app_info_get_categories 
(entry_desktop->appinfo);
+          menu_verbose ("Failed to load \"%s\"\n", entry->path);
+          return DESKTOP_ENTRY_LOAD_FAIL_APPINFO;
+        }
 
-              if (categories_str)
-                {
-                  char **categories;
-                  int i;
+      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);
+          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]);
+          for (i = 0; categories[i]; i++)
+            entry_desktop->categories[i] = g_quark_from_string (categories[i]);
 
-                  g_strfreev (categories);
-                }
+          g_strfreev (categories);
+        }
 
-              entry_desktop->showin = key_file_get_show_in (key_file);
+      key_file = g_key_file_new ();
 
-              rescode = DESKTOP_ENTRY_LOAD_SUCCESS;
-            }
-        }
+      if (!g_key_file_load_from_file (key_file, entry->path, 0, NULL))
+        entry_desktop->showin = TRUE;
       else
-        {
-          menu_verbose ("Failed to read contents of \"%s\"\n", entry->path);
-          rescode = DESKTOP_ENTRY_LOAD_FAIL_OTHER;
-        }
+        entry_desktop->showin = key_file_get_show_in (key_file);
+
       g_key_file_free (key_file);
+
+      return DESKTOP_ENTRY_LOAD_SUCCESS;
     }
   else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
     {
       GKeyFile *key_file = NULL;
       GError   *error = NULL;
-      rescode = DESKTOP_ENTRY_LOAD_SUCCESS;
+      DesktopEntryResultCode rescode = DESKTOP_ENTRY_LOAD_SUCCESS;
 
       key_file = g_key_file_new ();
 
@@ -355,18 +344,13 @@
           else
             menu_verbose ("Failed to load \"%s\"\n", entry->path);
         }
+
+      return rescode;
     }
   else
     g_assert_not_reached ();
 
-  return rescode;
-}
-
-static gboolean
-code_failed (DesktopEntryResultCode code)
-{
-    return code == DESKTOP_ENTRY_LOAD_FAIL_OTHER ||
-           code == DESKTOP_ENTRY_LOAD_FAIL_APPINFO;
+  return DESKTOP_ENTRY_LOAD_FAIL_OTHER;
 }
 
 DesktopEntry *
@@ -405,7 +389,7 @@
   code = desktop_entry_load (retval);
   *res_code = code;
 
-  if (code_failed (code))
+  if (code < DESKTOP_ENTRY_LOAD_SUCCESS)
     {
       desktop_entry_unref (retval);
       return NULL;
@@ -447,7 +431,7 @@
   else
     g_assert_not_reached ();
 
-  if (code_failed (desktop_entry_load (entry)))
+  if (desktop_entry_load (entry) < DESKTOP_ENTRY_LOAD_SUCCESS)
     {
       desktop_entry_unref (entry);
       return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-menus-3.0.1/libmenu/desktop-entries.h 
new/cinnamon-menus-3.0.2/libmenu/desktop-entries.h
--- old/cinnamon-menus-3.0.1/libmenu/desktop-entries.h  2016-05-23 
13:55:09.000000000 +0200
+++ new/cinnamon-menus-3.0.2/libmenu/desktop-entries.h  2016-05-30 
16:47:10.000000000 +0200
@@ -33,9 +33,9 @@
 
 typedef enum
 {
-  DESKTOP_ENTRY_LOAD_SUCCESS = 0,
-  DESKTOP_ENTRY_LOAD_FAIL_OTHER,
-  DESKTOP_ENTRY_LOAD_FAIL_APPINFO
+  DESKTOP_ENTRY_LOAD_FAIL_OTHER = 0,
+  DESKTOP_ENTRY_LOAD_FAIL_APPINFO,
+  DESKTOP_ENTRY_LOAD_SUCCESS
 } DesktopEntryResultCode;
 
 typedef struct DesktopEntry DesktopEntry;


Reply via email to