[Xfce4-commits] r22680 - in libexo/trunk: . exo-desktop-item-edit

Benedikt Meurer benny at xfce.org
Mon Aug 7 15:32:05 UTC 2006


Author: benny
Date: 2006-08-07 15:32:02 +0000 (Mon, 07 Aug 2006)
New Revision: 22680

Modified:
   libexo/trunk/ChangeLog
   libexo/trunk/exo-desktop-item-edit/exo-die-desktop-model.c
Log:
2006-08-07	Benedikt Meurer <benny at xfce.org>

	* exo-desktop-item-edit/exo-die-desktop-model.c
	  (exo_die_desktop_item_new_from_file): Load only .desktop files of
	  type Application.




Modified: libexo/trunk/ChangeLog
===================================================================
--- libexo/trunk/ChangeLog	2006-08-07 10:37:15 UTC (rev 22679)
+++ libexo/trunk/ChangeLog	2006-08-07 15:32:02 UTC (rev 22680)
@@ -1,3 +1,9 @@
+2006-08-07	Benedikt Meurer <benny at xfce.org>
+
+	* exo-desktop-item-edit/exo-die-desktop-model.c
+	  (exo_die_desktop_item_new_from_file): Load only .desktop files of
+	  type Application.
+
 2006-08-06	Benedikt Meurer <benny at xfce.org>
 
 	* exo-desktop-item-edit/exo-die-command-entry.c,

Modified: libexo/trunk/exo-desktop-item-edit/exo-die-desktop-model.c
===================================================================
--- libexo/trunk/exo-desktop-item-edit/exo-die-desktop-model.c	2006-08-07 10:37:15 UTC (rev 22679)
+++ libexo/trunk/exo-desktop-item-edit/exo-die-desktop-model.c	2006-08-07 15:32:02 UTC (rev 22680)
@@ -610,6 +610,7 @@
   const gchar       *command;
   const gchar       *icon;
   const gchar       *name;
+  const gchar       *type;
   XfceRc            *rc;
   gint               icon_len;
 
@@ -626,9 +627,10 @@
           comment = xfce_rc_read_entry (rc, "Comment", NULL);
           icon = xfce_rc_read_entry (rc, "Icon", NULL);
           name = xfce_rc_read_entry (rc, "Name", NULL);
+          type = xfce_rc_read_entry (rc, "Type", "Application");
 
-          /* check if the required attributes were found */
-          if (G_LIKELY (command != NULL && name != NULL))
+          /* check if the required attributes were found (and we have an Application) */
+          if (G_LIKELY (strcmp (type, "Application") == 0 && command != NULL && name != NULL))
             {
               /* allocate the desktop item */
               desktop_item = g_new (ExoDieDesktopItem, 1);



More information about the Xfce4-commits mailing list