# HG changeset patch # User Etan Reisner # Date 1133508649 0 # Node ID d6b5373948f92d0ffffc72766d7a928a9ed4c13b # Parent ac63b000ed42a778828c023059c3c1f733a2698c [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 diff -r ac63b000ed42 -r d6b5373948f9 src/gtkstatusbox.c --- 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);