comparison src/gtkstatusbox.c @ 12275:0d6aeb831975

[gaim-migrate @ 14579] Fixes the "overlap" thing and the "have to hold down the mouse button" thing committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 30 Nov 2005 21:28:53 +0000
parents 3d9ef8a98074
children 255e6912607b
comparison
equal deleted inserted replaced
12274:3d9ef8a98074 12275:0d6aeb831975
560 gtk_box_pack_start(GTK_BOX(status_box->hbox), status_box->arrow, FALSE, FALSE, 0); 560 gtk_box_pack_start(GTK_BOX(status_box->hbox), status_box->arrow, FALSE, FALSE, 0);
561 gtk_widget_show_all(status_box->toggle_button); 561 gtk_widget_show_all(status_box->toggle_button);
562 #if GTK_CHECK_VERSION(2,4,0) 562 #if GTK_CHECK_VERSION(2,4,0)
563 gtk_button_set_focus_on_click(GTK_BUTTON(status_box->toggle_button), FALSE); 563 gtk_button_set_focus_on_click(GTK_BUTTON(status_box->toggle_button), FALSE);
564 #endif 564 #endif
565 gtk_container_add(GTK_CONTAINER(status_box), status_box->toggle_button);
566
567 status_box->icon_rend = gtk_cell_renderer_pixbuf_new(); 565 status_box->icon_rend = gtk_cell_renderer_pixbuf_new();
568 status_box->text_rend = gtk_cell_renderer_text_new(); 566 status_box->text_rend = gtk_cell_renderer_text_new();
569 567
570 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), icon_rend, FALSE); 568 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), icon_rend, FALSE);
571 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), text_rend, TRUE); 569 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), text_rend, TRUE);
596 G_CALLBACK(imhtml_remove_focus), status_box); 594 G_CALLBACK(imhtml_remove_focus), status_box);
597 g_signal_connect_swapped(G_OBJECT(status_box->imhtml), "message_send", G_CALLBACK(remove_typing_cb), status_box); 595 g_signal_connect_swapped(G_OBJECT(status_box->imhtml), "message_send", G_CALLBACK(remove_typing_cb), status_box);
598 gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE); 596 gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE);
599 gtk_widget_set_parent(status_box->vbox, GTK_WIDGET(status_box)); 597 gtk_widget_set_parent(status_box->vbox, GTK_WIDGET(status_box));
600 gtk_widget_set_parent(status_box->toggle_button, GTK_WIDGET(status_box)); 598 gtk_widget_set_parent(status_box->toggle_button, GTK_WIDGET(status_box));
599 GTK_BIN(status_box)->child = status_box->toggle_button;
601 status_box->sw = gtk_scrolled_window_new(NULL, NULL); 600 status_box->sw = gtk_scrolled_window_new(NULL, NULL);
602 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(status_box->sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); 601 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(status_box->sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
603 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(status_box->sw), GTK_SHADOW_IN); 602 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(status_box->sw), GTK_SHADOW_IN);
604 gtk_container_add(GTK_CONTAINER(status_box->sw), vbox); 603 gtk_container_add(GTK_CONTAINER(status_box->sw), vbox);
605 gtk_box_pack_start(GTK_BOX(vbox), status_box->toolbar, FALSE, FALSE, 0); 604 gtk_box_pack_start(GTK_BOX(vbox), status_box->toolbar, FALSE, FALSE, 0);
703 static gboolean 702 static gboolean
704 gtk_gaim_status_box_expose_event(GtkWidget *widget, 703 gtk_gaim_status_box_expose_event(GtkWidget *widget,
705 GdkEventExpose *event) 704 GdkEventExpose *event)
706 { 705 {
707 GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX(widget); 706 GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX(widget);
708 gtk_widget_send_expose(status_box->toggle_button, (GdkEvent*)(event));
709 gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->vbox, event); 707 gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->vbox, event);
708 gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->toggle_button, event);
710 return FALSE; 709 return FALSE;
711 } 710 }
712 711
713 static void 712 static void
714 gtk_gaim_status_box_forall(GtkContainer *container, 713 gtk_gaim_status_box_forall(GtkContainer *container,
719 GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX (container); 718 GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX (container);
720 719
721 if (include_internals) 720 if (include_internals)
722 { 721 {
723 (* callback) (status_box->vbox, callback_data); 722 (* callback) (status_box->vbox, callback_data);
723 (* callback) (status_box->toggle_button, callback_data);
724 (* callback) (status_box->arrow, callback_data);
724 } 725 }
725 726
726 combo_box_forall(container, include_internals, callback, callback_data); 727 combo_box_forall(container, include_internals, callback, callback_data);
727 } 728 }
728 729