mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
1999-03-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* 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.
This commit is contained in:
parent
1b0258b1d6
commit
68ed301272
@ -1,5 +1,9 @@
|
||||
1999-03-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* 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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user