pidgin/gtkconv.c

branch
cpw.qulogic.gtk3
changeset 26929
2a8ade936729
parent 26525
ad90b00d3bc7
child 26936
e37eddda3983
equal deleted inserted replaced
26756:874b154f4220 26929:2a8ade936729
5193 gtkconv->active_conv = conv; 5193 gtkconv->active_conv = conv;
5194 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); 5194 gtkconv->convs = g_list_prepend(gtkconv->convs, conv);
5195 gtkconv->send_history = g_list_append(NULL, NULL); 5195 gtkconv->send_history = g_list_append(NULL, NULL);
5196 5196
5197 /* Setup some initial variables. */ 5197 /* Setup some initial variables. */
5198 #if !GTK_CHECK_VERSION(2,12,0)
5198 gtkconv->tooltips = gtk_tooltips_new(); 5199 gtkconv->tooltips = gtk_tooltips_new();
5200 #endif
5199 gtkconv->unseen_state = PIDGIN_UNSEEN_NONE; 5201 gtkconv->unseen_state = PIDGIN_UNSEEN_NONE;
5200 gtkconv->unseen_count = 0; 5202 gtkconv->unseen_count = 0;
5201 5203
5202 if (conv_type == PURPLE_CONV_TYPE_IM) { 5204 if (conv_type == PURPLE_CONV_TYPE_IM) {
5203 gtkconv->u.im = g_malloc0(sizeof(PidginImPane)); 5205 gtkconv->u.im = g_malloc0(sizeof(PidginImPane));
5386 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { 5388 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
5387 purple_signals_disconnect_by_handle(gtkconv->u.chat); 5389 purple_signals_disconnect_by_handle(gtkconv->u.chat);
5388 g_free(gtkconv->u.chat); 5390 g_free(gtkconv->u.chat);
5389 } 5391 }
5390 5392
5393 #if !GTK_CHECK_VERSION(2,12,0)
5391 gtk_object_sink(GTK_OBJECT(gtkconv->tooltips)); 5394 gtk_object_sink(GTK_OBJECT(gtkconv->tooltips));
5395 #endif
5392 5396
5393 gtkconv->send_history = g_list_first(gtkconv->send_history); 5397 gtkconv->send_history = g_list_first(gtkconv->send_history);
5394 g_list_foreach(gtkconv->send_history, (GFunc)g_free, NULL); 5398 g_list_foreach(gtkconv->send_history, (GFunc)g_free, NULL);
5395 g_list_free(gtkconv->send_history); 5399 g_list_free(gtkconv->send_history);
5396 5400
6601 if (gtkchat->topic_text != NULL) 6605 if (gtkchat->topic_text != NULL)
6602 { 6606 {
6603 topic = purple_conv_chat_get_topic(chat); 6607 topic = purple_conv_chat_get_topic(chat);
6604 6608
6605 gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), topic ? topic : ""); 6609 gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), topic ? topic : "");
6610 #if GTK_CHECK_VERSION(2,12,0)
6611 gtk_widget_set_tooltip_text(gtkchat->topic_text,
6612 topic ? topic : "");
6613 #else
6606 gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text, 6614 gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text,
6607 topic ? topic : "", NULL); 6615 topic ? topic : "", NULL);
6616 #endif
6608 } 6617 }
6609 } 6618 }
6610 6619
6611 if (fields & PIDGIN_CONV_SMILEY_THEME) 6620 if (fields & PIDGIN_CONV_SMILEY_THEME)
6612 pidgin_themes_smiley_themeize(PIDGIN_CONVERSATION(conv)->imhtml); 6621 pidgin_themes_smiley_themeize(PIDGIN_CONVERSATION(conv)->imhtml);
9370 close_image = gtk_label_new("×"); 9379 close_image = gtk_label_new("×");
9371 g_signal_connect(G_OBJECT(gtkconv->close), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_image); 9380 g_signal_connect(G_OBJECT(gtkconv->close), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_image);
9372 g_signal_connect(G_OBJECT(gtkconv->close), "leave-notify-event", G_CALLBACK(close_button_left_cb), close_image); 9381 g_signal_connect(G_OBJECT(gtkconv->close), "leave-notify-event", G_CALLBACK(close_button_left_cb), close_image);
9373 gtk_widget_show(close_image); 9382 gtk_widget_show(close_image);
9374 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image); 9383 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image);
9384 #if GTK_CHECK_VERSION(2,12,0)
9385 gtk_widget_set_tooltip_text(gtkconv->close, _("Close conversation"));
9386 #else
9375 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close, 9387 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close,
9376 _("Close conversation"), NULL); 9388 _("Close conversation"), NULL);
9389 #endif
9377 9390
9378 g_signal_connect(G_OBJECT(gtkconv->close), "button-press-event", 9391 g_signal_connect(G_OBJECT(gtkconv->close), "button-press-event",
9379 G_CALLBACK(close_conv_cb), gtkconv); 9392 G_CALLBACK(close_conv_cb), gtkconv);
9380 9393
9381 #if !GTK_CHECK_VERSION(2,6,0) 9394 #if !GTK_CHECK_VERSION(2,6,0)

mercurial