Author: nick
Date: 2007-10-17 09:21:10 +0000 (Wed, 17 Oct 2007)
New Revision: 26139
Modified:
xfce4-panel/trunk/plugins/launcher/launcher-dialog.c
Log:
* Fix problem with unnamed items in the launcher dialog. Reported by Mike.
Modified: xfce4-panel/trunk/plugins/launcher/launcher-dialog.c
===================================================================
--- xfce4-panel/trunk/plugins/launcher/launcher-dialog.c 2007-10-17
09:15:21 UTC (rev 26138)
+++ xfce4-panel/trunk/plugins/launcher/launcher-dialog.c 2007-10-17
09:21:10 UTC (rev 26139)
@@ -814,6 +814,7 @@
GtkTreeSelection *selection;
GtkTreeIter iter;
GdkPixbuf *icon = NULL;
+ const gchar *name;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ld->treeview));
@@ -837,9 +838,12 @@
break;
case COLUMN_NAME:
+ /* build name */
+ name = ld->entry->name ? ld->entry->name : _("Unnamed");
+
/* set new name */
gtk_list_store_set (ld->store, &iter,
- COLUMN_NAME, ld->entry->name,
+ COLUMN_NAME, name,
-1);
break;
@@ -1278,6 +1282,7 @@
GList *li;
LauncherEntry *entry;
GdkPixbuf *icon;
+ const gchar *name;
/* scrolled window */
scroll = gtk_scrolled_window_new (NULL, NULL);
@@ -1327,16 +1332,19 @@
{
entry = li->data;
- if (G_LIKELY (entry && entry->name))
+ if (G_LIKELY (entry))
{
/* load icon */
icon = launcher_utility_load_pixbuf (gtk_widget_get_screen
(ld->treeview), entry->icon, LAUNCHER_TREE_ICON_SIZE);
+
+ /* build name */
+ name = entry->name ? entry->name : _("Unnamed");
/* create new row and add the data */
gtk_list_store_append (ld->store, &iter);
gtk_list_store_set (ld->store, &iter,
COLUMN_ICON, icon,
- COLUMN_NAME, entry->name, -1);
+ COLUMN_NAME, name, -1);
/* release the pixbuf */
if (G_LIKELY (icon))
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits