# HG changeset patch # User Sean Egan # Date 1186364217 0 # Node ID 5a5ca643830892fde99e2044c1254215033efb3c # Parent d9692b58ac2cfb875619010650149f00f7ad510c show toolbar menu on button press, rather than button release. Fixes #2352 diff -r d9692b58ac2c -r 5a5ca6438308 pidgin/gtkimhtmltoolbar.c --- 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; }