changeset 18802:5a5ca6438308

show toolbar menu on button press, rather than button release. Fixes #2352
author Sean Egan <seanegan@gmail.com>
date Mon, 06 Aug 2007 01:36:57 +0000
parents d9692b58ac2c
children 580e0bfe7e33
files pidgin/gtkimhtmltoolbar.c
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c	Mon Aug 06 00:56:05 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Mon Aug 06 01:36:57 2007 +0000
@@ -939,12 +939,10 @@
 		*y -= widget->allocation.height;
 }
 
-static void pidgin_menu_clicked(GtkWidget *button, GtkMenu *menu)
+static void pidgin_menu_clicked(GtkWidget *button, GdkEventButton *event, GtkMenu *menu)
 {
-	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))) {
-		gtk_widget_show_all(GTK_WIDGET(menu));
-		gtk_menu_popup(menu, NULL, NULL, menu_position_func, button, 0, gtk_get_current_event_time());
-	}
+	gtk_widget_show_all(GTK_WIDGET(menu));
+	gtk_menu_popup(menu, NULL, NULL, menu_position_func, button, 0, gtk_get_current_event_time());
 }
 
 static void pidgin_menu_deactivate(GtkWidget *menu, GtkToggleButton *button)
@@ -1179,7 +1177,7 @@
 				G_CALLBACK(button_sensitiveness_changed), menuitem);
 	}
 
-	g_signal_connect(G_OBJECT(font_button), "clicked", G_CALLBACK(pidgin_menu_clicked), font_menu);
+	g_signal_connect(G_OBJECT(font_button), "button-press-event", G_CALLBACK(pidgin_menu_clicked), font_menu);
 	g_signal_connect(G_OBJECT(font_menu), "deactivate", G_CALLBACK(pidgin_menu_deactivate), font_button);
 
 	/* Sep */
@@ -1220,7 +1218,7 @@
 	g_signal_connect(G_OBJECT(toolbar->link), "notify::sensitive",
 			G_CALLBACK(button_sensitiveness_changed), menuitem);
 
-	g_signal_connect(G_OBJECT(insert_button), "clicked", G_CALLBACK(pidgin_menu_clicked), insert_menu);
+	g_signal_connect(G_OBJECT(insert_button), "button-press-event", G_CALLBACK(pidgin_menu_clicked), insert_menu);
 	g_signal_connect(G_OBJECT(insert_menu), "deactivate", G_CALLBACK(pidgin_menu_deactivate), insert_button);
 	toolbar->sml = NULL;
 }