# HG changeset patch # User Sean Egan # Date 1169151581 0 # Node ID 7162a5ebb2f714d9f83ff6d7bc8cdc6d55d58119 # Parent bb8b9d5604cb3c56746384e2c7be4de195d4df10 [gaim-migrate @ 18158] Make xmppconsole compile on GTK 2.0 committer: Tailor Script diff -r bb8b9d5604cb -r 7162a5ebb2f7 gtk/plugins/xmppconsole.c --- a/gtk/plugins/xmppconsole.c Thu Jan 18 17:57:46 2007 +0000 +++ b/gtk/plugins/xmppconsole.c Thu Jan 18 20:19:41 2007 +0000 @@ -26,6 +26,9 @@ #include "xmlnode.h" #include "gtkimhtml.h" +#if !GTK_CHECK_VERSION(2,4,0) +#include "gaimcombobox.h" +#endif typedef struct { GaimConnection *gc; @@ -726,8 +729,10 @@ GtkWidget *label; GtkTextBuffer *buffer; GtkWidget *toolbar; + GList *connections; +#if GTK_CHECK_VERSION(2,4,0) GtkToolItem *button; - GList *connections; +#endif if (console) { gtk_window_present(GTK_WINDOW(console->window)); @@ -776,18 +781,33 @@ gtk_container_add(GTK_CONTAINER(sw), console->imhtml); toolbar = gtk_toolbar_new(); +#if GTK_CHECK_VERSION(2,4,0) button = gtk_tool_button_new(NULL, ""); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(iq_clicked_cb), NULL); gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(button)); +#else + gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "", + _("Insert an stanza."), "foo", NULL, GTK_SIGNAL_FUNC(iq_clicked_cb), NULL); +#endif +#if GTK_CHECK_VERSION(2,4,0) button = gtk_tool_button_new(NULL, ""); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(presence_clicked_cb), NULL); gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(button)); +#else + gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "", + _("Insert a stanza."), NULL, gtk_label_new(NULL), GTK_SIGNAL_FUNC(presence_clicked_cb), NULL); +#endif +#if GTK_CHECK_VERSION(2,4,0) button = gtk_tool_button_new(NULL, ""); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(message_clicked_cb), NULL); gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(button)); - +#else + gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "", + _("Insert a stanza."), "foo", gtk_label_new(NULL), GTK_SIGNAL_FUNC(message_clicked_cb), NULL); +#endif + gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); sw = gtk_scrolled_window_new(NULL, NULL);