mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
1998-03-19 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (desktop_icon_context_popup): It is not necessary to set the menu position. (desktop_icon_context_popup): gtk_signal_connect_object_after to the menu items with gtk_widget_destroy as a callback so that we can destroy the menu widget appropriately.
This commit is contained in:
parent
10d7865679
commit
1cdbe8dbda
@ -1,3 +1,11 @@
|
||||
1998-03-19 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdesktop.c (desktop_icon_context_popup): It is not necessary to
|
||||
set the menu position.
|
||||
(desktop_icon_context_popup): gtk_signal_connect_object_after to the menu
|
||||
items with gtk_widget_destroy as a callback so that we can destroy
|
||||
the menu widget appropriately.
|
||||
|
||||
1998-03-19 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gscreen.c (display_mini_info): Implement mini status.
|
||||
|
@ -691,20 +691,24 @@ desktop_icon_context_popup (GdkEventButton *event, desktop_icon_t *di)
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
/* We connect_object_after to the items so that we can destroy
|
||||
* the menu at the proper time.
|
||||
*/
|
||||
|
||||
item = gtk_menu_item_new_with_label (_("Properties"));
|
||||
gtk_signal_connect (GTK_OBJECT (item), "activate", GTK_SIGNAL_FUNC (icon_properties), di);
|
||||
gtk_signal_connect_object_after (GTK_OBJECT (item), "activate",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), menu);
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_widget_show (item);
|
||||
|
||||
item = gtk_menu_item_new_with_label (_("Delete"));
|
||||
gtk_signal_connect (GTK_OBJECT (item), "activate", GTK_SIGNAL_FUNC (icon_delete), di);
|
||||
gtk_signal_connect_object_after (GTK_OBJECT (item), "activate",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), menu);
|
||||
gtk_menu_append (GTK_MENU (menu), item);
|
||||
gtk_widget_show (item);
|
||||
|
||||
gtk_widget_set_uposition (menu, event->x, event->y);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (menu), "deactivate", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
|
||||
|
||||
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, 0, NULL, 3, event->time);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user