# HG changeset patch # User zas_ # Date 1260467071 0 # Node ID e82401bf20c841f6491820b3b4ed739be0ed64d6 # Parent 56c019ed874691bc6d77e20dc094cd5e9c47ce5c Fix contextual menus in lateral bars. Use button_release_event instead of button_press_event, this makes contextual menus persistent until an option is selected or the menu is closed. diff -r 56c019ed8746 -r e82401bf20c8 src/bar.c --- a/src/bar.c Fri Dec 04 21:01:11 2009 +0000 +++ b/src/bar.c Thu Dec 10 17:44:31 2009 +0000 @@ -517,7 +517,7 @@ gtk_box_pack_start(GTK_BOX(bd->vbox), expander, FALSE, TRUE, 0); - g_signal_connect(expander, "button_press_event", G_CALLBACK(bar_menu_cb), bd); + g_signal_connect(expander, "button_release_event", G_CALLBACK(bar_menu_cb), bd); gtk_container_add(GTK_CONTAINER(expander), pane); @@ -610,7 +610,7 @@ g_signal_connect(G_OBJECT(bd->widget), "size-allocate", G_CALLBACK(bar_size_allocate), bd); - g_signal_connect(G_OBJECT(bd->widget), "button_press_event", G_CALLBACK(bar_menu_cb), bd); + g_signal_connect(G_OBJECT(bd->widget), "button_release_event", G_CALLBACK(bar_menu_cb), bd); bd->width = SIDEBAR_DEFAULT_WIDTH; gtk_widget_set_size_request(bd->widget, bd->width, -1); diff -r 56c019ed8746 -r e82401bf20c8 src/bar_exif.c --- a/src/bar_exif.c Fri Dec 04 21:01:11 2009 +0000 +++ b/src/bar_exif.c Thu Dec 10 17:44:31 2009 +0000 @@ -176,7 +176,7 @@ gtk_box_pack_start(GTK_BOX(ped->vbox), ee->ebox, FALSE, FALSE, 0); bar_pane_exif_entry_dnd_init(ee->ebox); - g_signal_connect(ee->ebox, "button_press_event", G_CALLBACK(bar_pane_exif_menu_cb), ped); + g_signal_connect(ee->ebox, "button_release_event", G_CALLBACK(bar_pane_exif_menu_cb), ped); bar_pane_exif_setup_entry_box(ped, ee); @@ -746,7 +746,7 @@ G_CALLBACK(bar_pane_exif_size_allocate), ped); bar_pane_exif_dnd_init(ped->widget); - g_signal_connect(ped->widget, "button_press_event", G_CALLBACK(bar_pane_exif_menu_cb), ped); + g_signal_connect(ped->widget, "button_release_event", G_CALLBACK(bar_pane_exif_menu_cb), ped); file_data_register_notify_func(bar_pane_exif_notify_cb, ped, NOTIFY_PRIORITY_LOW); diff -r 56c019ed8746 -r e82401bf20c8 src/bar_gps.c --- a/src/bar_gps.c Fri Dec 04 21:01:11 2009 +0000 +++ b/src/bar_gps.c Thu Dec 10 17:44:31 2009 +0000 @@ -242,7 +242,7 @@ clutter_container_add(CLUTTER_CONTAINER(pgd->icon_layer), marker, NULL); clutter_actor_set_reactive(marker, TRUE); - g_signal_connect(G_OBJECT(marker), "button_press_event", + g_signal_connect(G_OBJECT(marker), "button_release_event", G_CALLBACK(bar_pane_gps_marker_keypress_cb), pgd); g_object_set_data(G_OBJECT(marker), "file_fd", fd); diff -r 56c019ed8746 -r e82401bf20c8 src/bar_keywords.c --- a/src/bar_keywords.c Fri Dec 04 21:01:11 2009 +0000 +++ b/src/bar_keywords.c Thu Dec 10 17:44:31 2009 +0000 @@ -1356,7 +1356,7 @@ g_signal_connect(G_OBJECT(pkd->keyword_treeview), "drag_motion", G_CALLBACK(bar_pane_keywords_dnd_motion), pkd); - g_signal_connect(G_OBJECT(pkd->keyword_treeview), "button_press_event", + g_signal_connect(G_OBJECT(pkd->keyword_treeview), "button_release_event", G_CALLBACK(bar_pane_keywords_menu_cb), pkd); gtk_container_add(GTK_CONTAINER(scrolled), pkd->keyword_treeview);