pidgin.next.minor: 279714db: Kill off more GTK_CHECK_VERSION uses tha...
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Sun Aug 23 13:02:33 EDT 2009
-----------------------------------------------------------------
Revision: 279714db7381ba6b83431408a5c756c86bcaf7bd
Ancestor: b7c22ae46ca508aa88e7ac3c201b065c89640998
Author: rekkanoryo at pidgin.im
Date: 2009-08-23T15:33:52
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/279714db7381ba6b83431408a5c756c86bcaf7bd
Modified files:
pidgin/gtkrequest.c pidgin/gtksavedstatuses.c
pidgin/gtkscrollbook.c pidgin/gtksession.c
pidgin/pidginstock.c pidgin/pidgintooltip.c
pidgin/plugins/gestures/gestures.c pidgin/plugins/pidginrc.c
pidgin/plugins/spellchk.c pidgin/plugins/xmppconsole.c
ChangeLog:
Kill off more GTK_CHECK_VERSION uses that we don't need anymore. Refs #10024.
-------------- next part --------------
============================================================
--- pidgin/gtkrequest.c d61ed4211e527cc244a8b5c22f20096abfe6939f
+++ pidgin/gtkrequest.c 17cd99420bf3da43c44f41768c0354a0bb822ee6
@@ -595,9 +595,7 @@ pidgin_request_action(const char *title,
/* Create the dialog. */
data->dialog = dialog = gtk_dialog_new();
-#if GTK_CHECK_VERSION(2,10,0)
gtk_window_set_deletable(GTK_WINDOW(data->dialog), FALSE);
-#endif
if (title != NULL)
gtk_window_set_title(GTK_WINDOW(dialog), title);
@@ -1445,7 +1443,6 @@ file_yes_no_cb(PidginRequestData *data,
}
}
-#if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
static void
file_ok_check_if_exists_cb(GtkWidget *widget, gint response, PidginRequestData *data)
{
@@ -1470,51 +1467,6 @@ file_ok_check_if_exists_cb(GtkWidget *wi
}
g_free(current_folder);
}
-
-#else /* FILECHOOSER */
-
-static void
-file_ok_check_if_exists_cb(GtkWidget *button, PidginRequestData *data)
-{
- const gchar *name;
- gchar *current_folder;
-
- generic_response_start(data);
-
- name = gtk_file_selection_get_filename(GTK_FILE_SELECTION(data->dialog));
-
- /* If name is a directory then change directories */
- if (data->type == PURPLE_REQUEST_FILE) {
- if (pidgin_check_if_dir(name, GTK_FILE_SELECTION(data->dialog)))
- return;
- }
-
- current_folder = g_path_get_dirname(name);
-
- g_free(data->u.file.name);
- if (data->type == PURPLE_REQUEST_FILE)
- data->u.file.name = g_strdup(name);
- else
- {
- if (g_file_test(name, G_FILE_TEST_IS_DIR))
- data->u.file.name = g_strdup(name);
- else
- data->u.file.name = g_strdup(current_folder);
- }
-
- if (current_folder != NULL) {
- if (data->u.file.savedialog) {
- purple_prefs_set_path(PIDGIN_PREFS_ROOT "/filelocations/last_save_folder", current_folder);
- } else {
- purple_prefs_set_path(PIDGIN_PREFS_ROOT "/filelocations/last_open_folder", current_folder);
- }
- g_free(current_folder);
- }
-
-#endif /* FILECHOOSER */
-#if 0 /* mismatched curly braces */
- }
-#endif
if ((data->u.file.savedialog == TRUE) &&
(g_file_test(data->u.file.name, G_FILE_TEST_EXISTS))) {
purple_request_action(data, NULL, _("That file already exists"),
@@ -1527,20 +1479,6 @@ file_ok_check_if_exists_cb(GtkWidget *bu
file_yes_no_cb(data, 1);
}
-#if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
-static gboolean
-file_cancel_cb(PidginRequestData *data)
-{
- generic_response_start(data);
-
- if (data->cbs[0] != NULL)
- ((PurpleRequestFileCb)data->cbs[0])(data->user_data, NULL);
-
- purple_request_close(data->type, data);
- return FALSE;
-}
-#endif /* FILECHOOSER */
-
static void *
pidgin_request_file(const char *title, const char *filename,
gboolean savedialog,
@@ -1551,9 +1489,7 @@ pidgin_request_file(const char *title, c
PidginRequestData *data;
GtkWidget *filesel;
const gchar *current_folder;
-#if GTK_CHECK_VERSION(2,4,0)
gboolean folder_set = FALSE;
-#endif
data = g_new0(PidginRequestData, 1);
data->type = PURPLE_REQUEST_FILE;
@@ -1564,7 +1500,6 @@ pidgin_request_file(const char *title, c
data->cbs[1] = ok_cb;
data->u.file.savedialog = savedialog;
-#if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
filesel = gtk_file_chooser_dialog_new(
title ? title : (savedialog ? _("Save File...")
: _("Open File...")),
@@ -1610,31 +1545,7 @@ pidgin_request_file(const char *title, c
#endif
g_signal_connect(G_OBJECT(GTK_FILE_CHOOSER(filesel)), "response",
G_CALLBACK(file_ok_check_if_exists_cb), data);
-#else /* FILECHOOSER */
- filesel = gtk_file_selection_new(
- title ? title : (savedialog ? _("Save File...")
- : _("Open File...")));
- if (savedialog) {
- current_folder = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/filelocations/last_save_folder");
- } else {
- current_folder = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/filelocations/last_open_folder");
- }
- if (current_folder != NULL) {
- gchar *path = g_strdup_printf("%s%s", current_folder, G_DIR_SEPARATOR_S);
- gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), path);
- g_free(path);
- }
- if (filename != NULL)
- gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), filename);
- g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(filesel)), "delete_event",
- G_CALLBACK(file_cancel_cb), data);
- g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button),
- "clicked", G_CALLBACK(file_cancel_cb), data);
- g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked",
- G_CALLBACK(file_ok_check_if_exists_cb), data);
-#endif /* FILECHOOSER */
-
pidgin_auto_parent_window(filesel);
data->dialog = filesel;
@@ -1661,7 +1572,6 @@ pidgin_request_folder(const char *title,
data->cbs[1] = ok_cb;
data->u.file.savedialog = FALSE;
-#if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
dirsel = gtk_file_chooser_dialog_new(
title ? title : _("Select Folder..."),
NULL,
@@ -1676,17 +1586,7 @@ pidgin_request_folder(const char *title,
g_signal_connect(G_OBJECT(GTK_FILE_CHOOSER(dirsel)), "response",
G_CALLBACK(file_ok_check_if_exists_cb), data);
-#else
- dirsel = gtk_file_selection_new(title ? title : _("Select Folder..."));
- g_signal_connect_swapped(G_OBJECT(dirsel), "delete_event",
- G_CALLBACK(file_cancel_cb), data);
- g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(dirsel)->cancel_button),
- "clicked", G_CALLBACK(file_cancel_cb), data);
- g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(dirsel)->ok_button), "clicked",
- G_CALLBACK(file_ok_check_if_exists_cb), data);
-#endif
-
data->dialog = dirsel;
pidgin_auto_parent_window(dirsel);
============================================================
--- pidgin/gtksavedstatuses.c 9252f37e26e2b8a165a5655f0a8d67c6d9efe18a
+++ pidgin/gtksavedstatuses.c 14e6bfcd3d16239f729737f3cb6cf6f41306caaf
@@ -179,24 +179,7 @@ status_window_destroy_cb(GtkWidget *widg
return FALSE;
}
-#if !GTK_CHECK_VERSION(2,2,0)
static void
-count_selected_helper(GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, gpointer user_data)
-{
- (*(gint *)user_data)++;
-}
-
-static void
-list_selected_helper(GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, gpointer user_data)
-{
- GList **list = (GList **)user_data;
- *list = g_list_append(*list, gtk_tree_path_copy(path));
-}
-#endif
-
-static void
status_window_use_cb(GtkButton *button, StatusWindow *dialog)
{
GtkTreeSelection *selection;
@@ -206,11 +189,7 @@ status_window_use_cb(GtkButton *button,
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->treeview));
-#if GTK_CHECK_VERSION(2,2,0)
num_selected = gtk_tree_selection_count_selected_rows(selection);
-#else
- gtk_tree_selection_selected_foreach(selection, count_selected_helper, &num_selected);
-#endif
if (num_selected != 1)
/*
* This shouldn't happen because the "Use" button should have
@@ -218,11 +197,7 @@ status_window_use_cb(GtkButton *button,
*/
return;
-#if GTK_CHECK_VERSION(2,2,0)
list = gtk_tree_selection_get_selected_rows(selection, NULL);
-#else
- gtk_tree_selection_selected_foreach(selection, list_selected_helper, &list);
-#endif
if (gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model),
&iter, list->data))
@@ -310,11 +285,7 @@ status_window_delete_cb(GtkButton *butto
gpointer handle;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->treeview));
-#if GTK_CHECK_VERSION(2,2,0)
sel_paths = gtk_tree_selection_get_selected_rows(selection, NULL);
-#else
- gtk_tree_selection_selected_foreach(selection, list_selected_helper, &sel_paths);
-#endif
/* This is ugly because we're not allowed to modify the model from within
* gtk_tree_selection_selected_foreach() and the GtkTreePaths can become invalid
@@ -364,11 +335,7 @@ status_selected_cb(GtkTreeSelection *sel
int num_selected;
GtkTreeModel *model = GTK_TREE_MODEL(dialog->model);
-#if GTK_CHECK_VERSION(2,2,0)
sel_paths = gtk_tree_selection_get_selected_rows(sel, NULL);
-#else
- gtk_tree_selection_selected_foreach(sel, list_selected_helper, &sel_paths);
-#endif
for (tmp = sel_paths, num_selected = 0; tmp; tmp = tmp->next, num_selected++) {
GtkTreeIter iter;
@@ -520,9 +487,7 @@ create_saved_status_list(StatusWindow *d
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer, "text",
STATUS_WINDOW_COLUMN_TITLE);
-#if GTK_CHECK_VERSION(2,6,0)
g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-#endif
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column, _("Type"));
@@ -549,9 +514,7 @@ create_saved_status_list(StatusWindow *d
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer, "text",
STATUS_WINDOW_COLUMN_MESSAGE);
-#if GTK_CHECK_VERSION(2,6,0)
g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-#endif
/* Enable CTRL+F searching */
gtk_tree_view_set_search_column(GTK_TREE_VIEW(treeview), STATUS_WINDOW_COLUMN_TITLE);
============================================================
--- pidgin/gtkscrollbook.c 49a6bddc77ce7db1876a0b647081e12b3c2e6eb8
+++ pidgin/gtkscrollbook.c 3ae843a1563e6d9278b7014206d75054f38d3af2
@@ -80,11 +80,7 @@ scroll_right_cb(PidginScrollBook *scroll
{
int index, count;
index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
-#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
-#else
- count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
-#endif
if (index + 1 < count)
gtk_notebook_set_current_page(GTK_NOTEBOOK(scroll_book->notebook), index + 1);
@@ -130,11 +126,7 @@ page_count_change_cb(PidginScrollBook *s
{
int count;
int index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
-#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
-#else
- count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
-#endif
refresh_scroll_box(scroll_book, index, count);
}
@@ -149,11 +141,7 @@ switch_page_cb(GtkNotebook *notebook, Gt
switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, PidginScrollBook *scroll_book)
{
int count;
-#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
-#else
- count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
-#endif
refresh_scroll_box(scroll_book, page_num, count);
}
@@ -268,9 +256,7 @@ pidgin_scroll_book_init (PidginScrollBoo
/* Close */
eb = gtk_event_box_new();
gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION(2,4,0)
gtk_event_box_set_visible_window(GTK_EVENT_BOX(eb), FALSE);
-#endif
gtk_widget_set_events(eb, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
close_button = gtk_label_new("x");
g_signal_connect(G_OBJECT(eb), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_button);
============================================================
--- pidgin/gtksession.c 8ddb4cb11a8fe5c7561ae0ec3be1beba66810b4f
+++ pidgin/gtksession.c 3709686bc6a94f50b8d1fc7ff8252f375137af26
@@ -163,10 +163,8 @@ static gchar **session_make_command(gcha
ret[j++] = g_strdup(config_dir);
}
-#if GTK_CHECK_VERSION(2,2,0)
ret[j++] = g_strdup("--display");
ret[j++] = g_strdup((gchar *)gdk_display_get_name(gdk_display_get_default()));
-#endif
ret[j++] = NULL;
============================================================
--- pidgin/pidginstock.c 6a6a9f800a54f17abf5555f7eedba6dbacbb9711
+++ pidgin/pidginstock.c c760ceb63ae60f491a23e5843b336adf6f26b73f
@@ -53,49 +53,29 @@ static struct StockIcon
} const stock_icons[] = {
{ PIDGIN_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE },
-#if GTK_CHECK_VERSION(2,6,0)
{ PIDGIN_STOCK_ALIAS, NULL, GTK_STOCK_EDIT },
-#else
- { PIDGIN_STOCK_ALIAS, "buttons", "edit.png" },
-#endif
{ PIDGIN_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO },
{ PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR },
{ PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE },
{ PIDGIN_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES },
{ PIDGIN_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN },
-#if GTK_CHECK_VERSION(2,6,0)
{ PIDGIN_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT },
-#else
- { PIDGIN_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" },
-#endif
{ PIDGIN_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" },
-#if GTK_CHECK_VERSION(2,6,0)
{ PIDGIN_STOCK_EDIT, NULL, GTK_STOCK_EDIT },
-#else
- { PIDGIN_STOCK_EDIT, "buttons", "edit.png" },
-#endif
{ PIDGIN_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL },
{ PIDGIN_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY },
{ PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR },
{ PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO },
{ PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES },
{ PIDGIN_STOCK_ADD, NULL, GTK_STOCK_ADD },
-#if GTK_CHECK_VERSION(2,6,0)
{ PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE },
-#else
- { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" },
-#endif
{ PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO },
{ PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO },
{ PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE },
{ PIDGIN_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE },
{ PIDGIN_STOCK_TYPED, "pidgin", "typed.png" },
{ PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP },
-#if GTK_CHECK_VERSION(2,8,0)
{ PIDGIN_STOCK_INFO, NULL, GTK_STOCK_INFO },
-#else
- { PIDGIN_STOCK_INFO, "buttons", "info.png" },
-#endif
};
static const GtkStockItem stock_items[] =
@@ -411,11 +391,9 @@ reload_settings(void)
static void
reload_settings(void)
{
-#if GTK_CHECK_VERSION(2,4,0)
GtkSettings *setting = NULL;
setting = gtk_settings_get_default();
gtk_rc_reset_styles(setting);
-#endif
}
/*****************************************************************************
============================================================
--- pidgin/pidgintooltip.c 5ec73164bef1649bf14d28e4ba01fb34d5375841
+++ pidgin/pidgintooltip.c 6cbb6497a0392885150807a90221f1d7f9b925c4
@@ -119,9 +119,7 @@ setup_tooltip_window(void)
tipwindow = gtk_window_new(GTK_WINDOW_POPUP);
name = gtk_window_get_title(GTK_WINDOW(pidgin_tooltip.widget));
-#if GTK_CHECK_VERSION(2,10,0)
gtk_window_set_type_hint(GTK_WINDOW(tipwindow), GDK_WINDOW_TYPE_HINT_TOOLTIP);
-#endif
gtk_widget_set_app_paintable(tipwindow, TRUE);
gtk_window_set_title(GTK_WINDOW(tipwindow), name ? name : _("Pidgin Tooltip"));
gtk_window_set_resizable(GTK_WINDOW(tipwindow), FALSE);
@@ -136,41 +134,26 @@ setup_tooltip_window_position(gpointer d
{
int sig;
int scr_w, scr_h, x, y, dy;
-#if GTK_CHECK_VERSION(2,2,0)
int mon_num;
GdkScreen *screen = NULL;
-#endif
GdkRectangle mon_size;
GtkWidget *tipwindow = pidgin_tooltip.tipwindow;
-#if GTK_CHECK_VERSION(2,2,0)
gdk_display_get_pointer(gdk_display_get_default(), &screen, &x, &y, NULL);
mon_num = gdk_screen_get_monitor_at_point(screen, x, y);
gdk_screen_get_monitor_geometry(screen, mon_num, &mon_size);
scr_w = mon_size.width + mon_size.x;
scr_h = mon_size.height + mon_size.y;
-#else
- scr_w = gdk_screen_width();
- scr_h = gdk_screen_height();
- gdk_window_get_pointer(NULL, &x, &y, NULL);
- mon_size.x = 0;
- mon_size.y = 0;
-#endif
-#if GTK_CHECK_VERSION(2,4,0)
dy = gdk_display_get_default_cursor_size(gdk_display_get_default()) / 2;
-#else
- dy = 0;
-#endif
-#if GTK_CHECK_VERSION(2,2,0)
if (w > mon_size.width)
w = mon_size.width - 10;
if (h > mon_size.height)
h = mon_size.height - 10;
-#endif
+
x -= ((w >> 1) + 4);
if ((y + h + 4) > scr_h)
============================================================
--- pidgin/plugins/gestures/gestures.c 8d5d2c94b0c78ab3aeb4ad7167729490e070283e
+++ pidgin/plugins/gestures/gestures.c d91e43d58cec0aa90fbb3c982778604c40b6245f
@@ -57,11 +57,7 @@ switch_page(PidginWindow *win, GtkDirect
{
int count, current;
-#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win->notebook));
-#else
- count = g_list_length(GTK_NOTEBOOK(win->notebook)->children);
-#endif
current = gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook));
if (dir == GTK_DIR_LEFT)
============================================================
--- pidgin/plugins/pidginrc.c ef1ff2c4b86dddb98caef4d96c3dd332f5f96c3e
+++ pidgin/plugins/pidginrc.c 730ac76679629799c75c094030c17bfbd1adf89f
@@ -198,17 +198,13 @@ purplerc_make_changes(void)
purplerc_make_changes(void)
{
GString *str = make_gtkrc_string();
-#if GTK_CHECK_VERSION(2,4,0)
GtkSettings *setting = NULL;
-#endif
gtk_rc_parse_string(str->str);
g_string_free(str, TRUE);
-#if GTK_CHECK_VERSION(2,4,0)
setting = gtk_settings_get_default();
gtk_rc_reset_styles(setting);
-#endif
}
static void
============================================================
--- pidgin/plugins/spellchk.c cbb00602bc0c4f3cb302ddbee5191fa774011d18
+++ pidgin/plugins/spellchk.c 783eab9ec8163c237498b0a786e395f1ea5c8a02
@@ -2081,24 +2081,11 @@ static void save_list()
g_string_free(data, TRUE);
}
-#if !GTK_CHECK_VERSION(2,2,0)
-static void
-count_selected_helper(GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, gpointer user_data)
-{
- (*(gint *)user_data)++;
-}
-#endif
-
static void on_selection_changed(GtkTreeSelection *sel,
gpointer data)
{
gint num_selected;
-#if GTK_CHECK_VERSION(2,2,0)
num_selected = gtk_tree_selection_count_selected_rows(sel);
-#else
- gtk_tree_selection_selected_foreach(sel, count_selected_helper, &num_selected);
-#endif
gtk_widget_set_sensitive((GtkWidget*)data, (num_selected > 0));
}
============================================================
--- pidgin/plugins/xmppconsole.c daeeaff074bed4cc31530122e64e1b664017f7d0
+++ pidgin/plugins/xmppconsole.c 934ca84b2aa0e84f3216391457290a91c56dc13d
@@ -26,9 +26,6 @@
#include "xmlnode.h"
#include "gtkimhtml.h"
-#if !GTK_CHECK_VERSION(2,4,0)
-#include "pidgincombobox.h"
-#endif
#include "gtkutils.h"
typedef struct {
@@ -734,9 +731,7 @@ create_console(PurplePluginAction *actio
GtkTextBuffer *buffer;
GtkWidget *toolbar;
GList *connections;
-#if GTK_CHECK_VERSION(2,4,0)
GtkToolItem *button;
-#endif
if (console) {
gtk_window_present(GTK_WINDOW(console->window));
@@ -783,32 +778,17 @@ create_console(PurplePluginAction *actio
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);
More information about the Commits
mailing list