Mercurial > pidgin
comparison src/gtkstatusbox.c @ 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 | 255e6912607b |
children | b3385115815c |
comparison
equal
deleted
inserted
replaced
12293:ac63b000ed42 | 12294:d6b5373948f9 |
---|---|
494 gaim_account_get_active_status(box->account)); | 494 gaim_account_get_active_status(box->account)); |
495 else | 495 else |
496 update_to_reflect_current_status(box); | 496 update_to_reflect_current_status(box); |
497 } | 497 } |
498 | 498 |
499 #if 0 | |
499 static gboolean button_released_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) | 500 static gboolean button_released_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) |
500 { | 501 { |
501 | 502 |
502 if (event->button != 1) | 503 if (event->button != 1) |
503 return FALSE; | 504 return FALSE; |
514 return FALSE; | 515 return FALSE; |
515 gtk_combo_box_popup(GTK_COMBO_BOX(box)); | 516 gtk_combo_box_popup(GTK_COMBO_BOX(box)); |
516 // Disabled until button_released_cb works | 517 // Disabled until button_released_cb works |
517 // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), TRUE); | 518 // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), TRUE); |
518 return TRUE; | 519 return TRUE; |
520 } | |
521 #endif | |
522 | |
523 static void | |
524 toggled_cb(GtkWidget *widget, GtkGaimStatusBox *box) | |
525 { | |
526 gtk_combo_box_popup(GTK_COMBO_BOX(box)); | |
527 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), FALSE); | |
519 } | 528 } |
520 | 529 |
521 static void | 530 static void |
522 gtk_gaim_status_box_init (GtkGaimStatusBox *status_box) | 531 gtk_gaim_status_box_init (GtkGaimStatusBox *status_box) |
523 { | 532 { |
583 status_box->toolbar = gtk_imhtmltoolbar_new(); | 592 status_box->toolbar = gtk_imhtmltoolbar_new(); |
584 gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(status_box->toolbar), status_box->imhtml); | 593 gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(status_box->toolbar), status_box->imhtml); |
585 status_box->hsep = gtk_hseparator_new(); | 594 status_box->hsep = gtk_hseparator_new(); |
586 | 595 |
587 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); | 596 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); |
597 #if 0 | |
588 g_signal_connect(G_OBJECT(status_box->toggle_button), "button-press-event", | 598 g_signal_connect(G_OBJECT(status_box->toggle_button), "button-press-event", |
589 G_CALLBACK(button_pressed_cb), status_box); | 599 G_CALLBACK(button_pressed_cb), status_box); |
590 g_signal_connect(G_OBJECT(status_box->toggle_button), "button-release-event", | 600 g_signal_connect(G_OBJECT(status_box->toggle_button), "button-release-event", |
591 G_CALLBACK(button_released_cb), status_box); | 601 G_CALLBACK(button_released_cb), status_box); |
602 #endif | |
603 g_signal_connect(G_OBJECT(status_box->toggle_button), "toggled", | |
604 G_CALLBACK(toggled_cb), status_box); | |
592 g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(imhtml_changed_cb), status_box); | 605 g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(imhtml_changed_cb), status_box); |
593 g_signal_connect(G_OBJECT(status_box->imhtml), "key_press_event", | 606 g_signal_connect(G_OBJECT(status_box->imhtml), "key_press_event", |
594 G_CALLBACK(imhtml_remove_focus), status_box); | 607 G_CALLBACK(imhtml_remove_focus), status_box); |
595 g_signal_connect_swapped(G_OBJECT(status_box->imhtml), "message_send", G_CALLBACK(remove_typing_cb), status_box); | 608 g_signal_connect_swapped(G_OBJECT(status_box->imhtml), "message_send", G_CALLBACK(remove_typing_cb), status_box); |
596 gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE); | 609 gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE); |