From: <sea...@us...> - 2007-01-18 20:19:42
|
Revision: 18158 http://svn.sourceforge.net/gaim/?rev=18158&view=rev Author: seanegan Date: 2007-01-18 12:19:41 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Make xmppconsole compile on GTK 2.0 Modified Paths: -------------- trunk/gtk/plugins/xmppconsole.c Modified: trunk/gtk/plugins/xmppconsole.c =================================================================== --- trunk/gtk/plugins/xmppconsole.c 2007-01-18 17:57:46 UTC (rev 18157) +++ trunk/gtk/plugins/xmppconsole.c 2007-01-18 20:19:41 UTC (rev 18158) @@ -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, "<iq/>"); 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), "<iq/>", + _("Insert an <iq/> stanza."), "foo", NULL, GTK_SIGNAL_FUNC(iq_clicked_cb), NULL); +#endif +#if GTK_CHECK_VERSION(2,4,0) button = gtk_tool_button_new(NULL, "<presence/>"); 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), "<presence/>", + _("Insert a <presence/> 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, "<message/>"); 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), "<message/>", + _("Insert a <message/> 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |