! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Xfdesktop hates right-click properties on desktop icons
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Moinak Ghosh 2006-08-28 13:09:31 CEST
User-Agent:       Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.0.3) Gecko/20060602 Firefox/1.5.0.3
Build Identifier: 

While trying out xfdesktop 4.3.90.2 on OpenSolaris (BeleniX) I noticed a couple of segfaults when using the right-click popup menu of the desktop icons.

Reproducible: Always

Steps to Reproduce:
1. Right-click on a desktop icon
2. Select Properties

Also

1. Right-Click on a desktop icon
2. Hover mouse over "Create New"

Actual Results:  
Segfaults and dumps core.


I am attaching a suggested fix for both the above issues:

--- src/xfdesktop-file-icon-manager.c.orig      Mon Aug 28 00:29:33 2006
+++ src/xfdesktop-file-icon-manager.c   Mon Aug 28 01:01:18 2006
@@ -1020,6 +1020,7 @@
     static const gchar *access_types[4] = {
         N_("None"), N_("Write only"), N_("Read only"), N_("Read & Write")
     };
+    gchar *rname;

     selected = xfdesktop_icon_view_get_selected_items(fmanager->priv->icon_view);
     g_return_if_fail(g_list_length(selected) == 1);
@@ -1349,7 +1350,11 @@
     gtk_table_attach(GTK_TABLE(table), lbl, 0, 1, row, row + 1,
                      GTK_FILL, GTK_FILL, 0, 0);

-    str = g_strdup_printf("%s (%s)", thunar_vfs_user_get_real_name(user),
+    rname = thunar_vfs_user_get_real_name(user);
+    if (rname == NULL) {
+        rname = thunar_vfs_user_get_name(user);
+    }
+    str = g_strdup_printf("%s (%s)", rname,
                           thunar_vfs_user_get_name(user));
     lbl = gtk_label_new(str);
     g_free(str);
@@ -2367,7 +2372,6 @@
             gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img);
         }
     }
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img);
     gtk_widget_show(mi);
     gtk_menu_shell_append(GTK_MENU_SHELL(menu2), mi);
     g_signal_connect(G_OBJECT(mi), "activate",
Comment 1 Brian J. Tarricone (not reading bugmail) 2006-10-09 03:56:43 CEST
Benny, is thunar_vfs_user_get_real_name() allowed to return NULL?
Comment 2 Benedikt Meurer editbugs 2006-10-09 09:44:41 CEST
Yes.
Comment 3 Brian J. Tarricone (not reading bugmail) 2006-10-11 05:02:08 CEST
All right, fixed then.
Comment 4 Brian J. Tarricone (not reading bugmail) 2006-10-11 05:02:56 CEST
and we can actually mark it fixed this time :-P

Bug #2229

Reported by:
Moinak Ghosh
Reported on: 2006-08-28
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Attachments

Additional information