pidgin/gtkconv.c

changeset 29240
901af871b5f0
parent 29217
903157b8f52b
child 29289
2d9f9ac25d16
child 29686
f9dee36112d0
equal deleted inserted replaced
29238:490da8d37c25 29240:901af871b5f0
9506 gtk_label_set_markup(label, "<u>×</u>"); 9506 gtk_label_set_markup(label, "<u>×</u>");
9507 gdk_window_set_cursor(event->window, hand); 9507 gdk_window_set_cursor(event->window, hand);
9508 return FALSE; 9508 return FALSE;
9509 } 9509 }
9510 9510
9511 static gboolean
9512 gtkconv_tab_set_tip(GtkWidget *widget, GdkEventCrossing *event, PidginConversation *gtkconv)
9513 {
9514 #if GTK_CHECK_VERSION(2, 12, 0)
9515 #define gtk_tooltips_set_tip(tips, w, l, p) gtk_widget_set_tooltip_text(w, l)
9516 #endif
9517 PangoLayout *layout;
9518
9519 layout = gtk_label_get_layout(GTK_LABEL(gtkconv->tab_label));
9520 gtk_tooltips_set_tip(gtkconv->tooltips, widget,
9521 pango_layout_is_ellipsized(layout) ? gtk_label_get_text(GTK_LABEL(gtkconv->tab_label)) : NULL,
9522 NULL);
9523 return FALSE;
9524 #if GTK_CHECK_VERSION(2, 12, 0)
9525 #undef gtk_tooltips_set_tip
9526 #endif
9527 }
9528
9511 void 9529 void
9512 pidgin_conv_window_add_gtkconv(PidginWindow *win, PidginConversation *gtkconv) 9530 pidgin_conv_window_add_gtkconv(PidginWindow *win, PidginConversation *gtkconv)
9513 { 9531 {
9514 PurpleConversation *conv = gtkconv->active_conv; 9532 PurpleConversation *conv = gtkconv->active_conv;
9515 PidginConversation *focus_gtkconv; 9533 PidginConversation *focus_gtkconv;
9664 ebox = gtk_event_box_new(); 9682 ebox = gtk_event_box_new();
9665 #if GTK_CHECK_VERSION(2,4,0) 9683 #if GTK_CHECK_VERSION(2,4,0)
9666 gtk_event_box_set_visible_window(GTK_EVENT_BOX(ebox), FALSE); 9684 gtk_event_box_set_visible_window(GTK_EVENT_BOX(ebox), FALSE);
9667 #endif 9685 #endif
9668 gtk_container_add(GTK_CONTAINER(ebox), gtkconv->tabby); 9686 gtk_container_add(GTK_CONTAINER(ebox), gtkconv->tabby);
9687 g_signal_connect(G_OBJECT(ebox), "enter-notify-event",
9688 G_CALLBACK(gtkconv_tab_set_tip), gtkconv);
9669 9689
9670 if (gtkconv->tab_label->parent == NULL) { 9690 if (gtkconv->tab_label->parent == NULL) {
9671 /* Pack if it's a new widget */ 9691 /* Pack if it's a new widget */
9672 gtk_box_pack_start(GTK_BOX(gtkconv->tabby), first, FALSE, FALSE, 0); 9692 gtk_box_pack_start(GTK_BOX(gtkconv->tabby), first, FALSE, FALSE, 0);
9673 gtk_box_pack_start(GTK_BOX(gtkconv->tabby), gtkconv->tab_label, TRUE, TRUE, 0); 9693 gtk_box_pack_start(GTK_BOX(gtkconv->tabby), gtkconv->tab_label, TRUE, TRUE, 0);

mercurial