pidgin/gtkconv.c

branch
cpw.qulogic.gtk3
changeset 32347
169ee59389a1
parent 27779
ad70fa8a4ae2
parent 27439
482df00eccd3
child 32358
2d2e5d960297
equal deleted inserted replaced
27948:212f39e44359 32347:169ee59389a1
5247 gtkconv->active_conv = conv; 5247 gtkconv->active_conv = conv;
5248 gtkconv->convs = g_list_prepend(gtkconv->convs, conv); 5248 gtkconv->convs = g_list_prepend(gtkconv->convs, conv);
5249 gtkconv->send_history = g_list_append(NULL, NULL); 5249 gtkconv->send_history = g_list_append(NULL, NULL);
5250 5250
5251 /* Setup some initial variables. */ 5251 /* Setup some initial variables. */
5252 #if !GTK_CHECK_VERSION(2,12,0)
5252 gtkconv->tooltips = gtk_tooltips_new(); 5253 gtkconv->tooltips = gtk_tooltips_new();
5254 #endif
5253 gtkconv->unseen_state = PIDGIN_UNSEEN_NONE; 5255 gtkconv->unseen_state = PIDGIN_UNSEEN_NONE;
5254 gtkconv->unseen_count = 0; 5256 gtkconv->unseen_count = 0;
5255 5257
5256 if (conv_type == PURPLE_CONV_TYPE_IM) { 5258 if (conv_type == PURPLE_CONV_TYPE_IM) {
5257 gtkconv->u.im = g_malloc0(sizeof(PidginImPane)); 5259 gtkconv->u.im = g_malloc0(sizeof(PidginImPane));
5440 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { 5442 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
5441 purple_signals_disconnect_by_handle(gtkconv->u.chat); 5443 purple_signals_disconnect_by_handle(gtkconv->u.chat);
5442 g_free(gtkconv->u.chat); 5444 g_free(gtkconv->u.chat);
5443 } 5445 }
5444 5446
5447 #if !GTK_CHECK_VERSION(2,12,0)
5445 gtk_object_sink(GTK_OBJECT(gtkconv->tooltips)); 5448 gtk_object_sink(GTK_OBJECT(gtkconv->tooltips));
5449 #endif
5446 5450
5447 gtkconv->send_history = g_list_first(gtkconv->send_history); 5451 gtkconv->send_history = g_list_first(gtkconv->send_history);
5448 g_list_foreach(gtkconv->send_history, (GFunc)g_free, NULL); 5452 g_list_foreach(gtkconv->send_history, (GFunc)g_free, NULL);
5449 g_list_free(gtkconv->send_history); 5453 g_list_free(gtkconv->send_history);
5450 5454
6639 if (gtkchat->topic_text != NULL) 6643 if (gtkchat->topic_text != NULL)
6640 { 6644 {
6641 topic = purple_conv_chat_get_topic(chat); 6645 topic = purple_conv_chat_get_topic(chat);
6642 6646
6643 gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), topic ? topic : ""); 6647 gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), topic ? topic : "");
6648 #if GTK_CHECK_VERSION(2,12,0)
6649 gtk_widget_set_tooltip_text(gtkchat->topic_text,
6650 topic ? topic : "");
6651 #else
6644 gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text, 6652 gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text,
6645 topic ? topic : "", NULL); 6653 topic ? topic : "", NULL);
6654 #endif
6646 } 6655 }
6647 } 6656 }
6648 6657
6649 if (fields & PIDGIN_CONV_SMILEY_THEME) 6658 if (fields & PIDGIN_CONV_SMILEY_THEME)
6650 pidgin_themes_smiley_themeize(PIDGIN_CONVERSATION(conv)->imhtml); 6659 pidgin_themes_smiley_themeize(PIDGIN_CONVERSATION(conv)->imhtml);
9416 close_image = gtk_label_new("×"); 9425 close_image = gtk_label_new("×");
9417 g_signal_connect(G_OBJECT(gtkconv->close), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_image); 9426 g_signal_connect(G_OBJECT(gtkconv->close), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_image);
9418 g_signal_connect(G_OBJECT(gtkconv->close), "leave-notify-event", G_CALLBACK(close_button_left_cb), close_image); 9427 g_signal_connect(G_OBJECT(gtkconv->close), "leave-notify-event", G_CALLBACK(close_button_left_cb), close_image);
9419 gtk_widget_show(close_image); 9428 gtk_widget_show(close_image);
9420 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image); 9429 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image);
9430 #if GTK_CHECK_VERSION(2,12,0)
9431 gtk_widget_set_tooltip_text(gtkconv->close, _("Close conversation"));
9432 #else
9421 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close, 9433 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close,
9422 _("Close conversation"), NULL); 9434 _("Close conversation"), NULL);
9435 #endif
9423 9436
9424 g_signal_connect(G_OBJECT(gtkconv->close), "button-press-event", 9437 g_signal_connect(G_OBJECT(gtkconv->close), "button-press-event",
9425 G_CALLBACK(close_conv_cb), gtkconv); 9438 G_CALLBACK(close_conv_cb), gtkconv);
9426 9439
9427 #if !GTK_CHECK_VERSION(2,6,0) 9440 #if !GTK_CHECK_VERSION(2,6,0)

mercurial