Mercurial > pidgin.yaz
changeset 12294:d6b5373948f9
[gaim-migrate @ 14598]
sadrul and I noticed that using space stopped bringing the statusbox menu up
recently, this fixes that. sadrul had used the "clicked" signal, I feel
"toggled" is probably better, but I really don't know that it matters. Also I
commented out the button-{press,release}-event signal handlers/connections
since the menu works without them now. If there is a reason we still need them
put them back.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Fri, 02 Dec 2005 07:30:49 +0000 |
parents | ac63b000ed42 |
children | fc42c0d41482 |
files | src/gtkstatusbox.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkstatusbox.c Fri Dec 02 07:28:26 2005 +0000 +++ b/src/gtkstatusbox.c Fri Dec 02 07:30:49 2005 +0000 @@ -496,6 +496,7 @@ update_to_reflect_current_status(box); } +#if 0 static gboolean button_released_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) { @@ -517,6 +518,14 @@ // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), TRUE); return TRUE; } +#endif + +static void +toggled_cb(GtkWidget *widget, GtkGaimStatusBox *box) +{ + gtk_combo_box_popup(GTK_COMBO_BOX(box)); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), FALSE); +} static void gtk_gaim_status_box_init (GtkGaimStatusBox *status_box) @@ -585,10 +594,14 @@ status_box->hsep = gtk_hseparator_new(); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); +#if 0 g_signal_connect(G_OBJECT(status_box->toggle_button), "button-press-event", G_CALLBACK(button_pressed_cb), status_box); g_signal_connect(G_OBJECT(status_box->toggle_button), "button-release-event", G_CALLBACK(button_released_cb), status_box); +#endif + g_signal_connect(G_OBJECT(status_box->toggle_button), "toggled", + G_CALLBACK(toggled_cb), status_box); g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(imhtml_changed_cb), status_box); g_signal_connect(G_OBJECT(status_box->imhtml), "key_press_event", G_CALLBACK(imhtml_remove_focus), status_box);