LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File menu-item-theme-icon.diff of Package gnome-panel-nld (Project home:winddss:gnome-panel-nld)

--- gnome-panel/menu-ditem.c
+++ gnome-panel/menu-ditem.c
@@ -5,10 +5,11 @@
 
 #include <glib/gi18n.h>
 #include <libgnomeui/gnome-ditem-edit.h>
-
+#include "panel-globals.h"
 #include "menu-ditem.h"
 #include "panel-util.h"
 
+
 enum {
 	REVERT_BUTTON
 };
@@ -169,14 +170,19 @@
 		   const char *dir,
 		   GdkScreen  *screen)
 {
-	GnomeDesktopItem *ditem;
+	const GnomeDesktopItem *ditem;
 	GtkWidget        *dialog;
 	GtkWidget        *dedit;
-	
+	char *icon=NULL;
+	char *themeicon=NULL;
+	GnomeIconTheme *panel_icon_theme = NULL;
+	panel_icon_theme = gnome_icon_theme_new ();
+	gnome_icon_theme_set_allow_svg (panel_icon_theme, TRUE);
 	g_return_val_if_fail (loc != NULL, NULL);
-
-	ditem = gnome_desktop_item_new_from_uri (loc, 0, NULL);		 
-
+	ditem = gnome_desktop_item_new_from_uri (loc, 0, NULL);		
+	icon=gnome_desktop_item_get_string (ditem, GNOME_DESKTOP_ITEM_ICON);
+	themeicon=gnome_desktop_item_find_icon (panel_icon_theme, icon, 48, 0);
+	gnome_desktop_item_set_string (ditem, GNOME_DESKTOP_ITEM_ICON, themeicon);			
 	dialog = gtk_dialog_new_with_buttons (
 				_("Launcher Properties"),
 				NULL, 0 /* flags */,