changeset 1739:70f58b0dd4aa

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.
author zas_
date Thu, 10 Dec 2009 17:44:31 +0000
parents 808dd5257146
children 8a1aa99345fa
files src/bar.c src/bar_exif.c src/bar_gps.c src/bar_keywords.c
diffstat 4 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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);
 
--- 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);
--- 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
@@ -1354,7 +1354,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);