diff --git a/gnome/ChangeLog b/gnome/ChangeLog index d611e9cd6..9d7cabda3 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,5 +1,9 @@ 1999-03-11 Federico Mena Quintero + * gpopup2.c (create_mime_actions): Do not free the file name here, + since it is passed on to the callback. It will be freed on the + destroy handler instead. + * gpopup2.c (escape_underlines): New function to escape the underlines in a string so that GtkLabel will include them in the final result. diff --git a/gnome/gpopup2.c b/gnome/gpopup2.c index 6223b8b61..06224d686 100644 --- a/gnome/gpopup2.c +++ b/gnome/gpopup2.c @@ -385,10 +385,11 @@ create_mime_actions (GtkWidget *menu, WPanel *panel, int pos, DesktopIconInfo *d full_name = g_concat_dir_and_file (panel->cwd, panel->dir.list[panel->selected].fname); mime_type = gnome_mime_type_or_default (full_name, NULL); - g_free (full_name); - if (!mime_type) + if (!mime_type) { + g_free (full_name); return pos; + } keys = gnome_mime_get_keys (mime_type); for (l = keys; l; l = l->next) { @@ -437,11 +438,13 @@ create_mime_actions (GtkWidget *menu, WPanel *panel, int pos, DesktopIconInfo *d (GtkSignalFunc) free_on_destroy, full_name); } + if (pos_init != pos) { uiinfo[0].type = GNOME_APP_UI_SEPARATOR; fill_menu (GTK_MENU_SHELL (menu), uiinfo, pos++); g_list_free (keys); } + return pos; }