diff options
Diffstat (limited to 'packages/gaim/files/01-optional-icons-in-dialogs.patch')
-rw-r--r-- | packages/gaim/files/01-optional-icons-in-dialogs.patch | 514 |
1 files changed, 514 insertions, 0 deletions
diff --git a/packages/gaim/files/01-optional-icons-in-dialogs.patch b/packages/gaim/files/01-optional-icons-in-dialogs.patch new file mode 100644 index 0000000000..260dcf364f --- /dev/null +++ b/packages/gaim/files/01-optional-icons-in-dialogs.patch @@ -0,0 +1,514 @@ +Index: gaim/src/gtkblist.c +=================================================================== +--- gaim.orig/src/gtkblist.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtkblist.c 2005-08-21 02:32:13.989658832 +0200 +@@ -873,16 +873,23 @@ + void + gaim_gtk_blist_joinchat_show(void) + { +- GtkWidget *hbox, *vbox; ++ GtkWidget *vbox; + GtkWidget *rowbox; + GtkWidget *label; ++ GtkWidget *pri_label; + GaimGtkBuddyList *gtkblist; ++ GtkWidget *sw; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img = NULL; ++#endif + GaimGtkJoinChatData *data = NULL; + + gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); ++#if ICONS_IN_DIALOGS + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG); ++#endif + data = g_new0(GaimGtkJoinChatData, 1); + + data->window = gtk_dialog_new_with_buttons(_("Join a Chat"), +@@ -897,6 +904,7 @@ + GTK_CONTAINER(GTK_DIALOG(data->window)->vbox), GAIM_HIG_BOX_SPACE); + gtk_window_set_role(GTK_WINDOW(data->window), "join_chat"); + ++#if ICONS_IN_DIALOGS + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(data->window)->vbox), hbox); + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); +@@ -905,6 +913,9 @@ + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(vbox), 0); + gtk_container_add(GTK_CONTAINER(hbox), vbox); ++#else ++ vbox = GTK_DIALOG(data->window)->vbox; ++#endif + + label = gtk_label_new(_("Please enter the appropriate information " + "about the chat you would like to join.\n")); +@@ -4304,9 +4315,13 @@ + { + GtkWidget *table; + GtkWidget *label; ++ GtkWidget *pri_label; + GtkWidget *hbox; + GtkWidget *vbox; ++ GtkWidget *sw; ++#if ICONS_IN_DIALOGS + GtkWidget *img; ++#endif + GaimGtkBuddyList *gtkblist; + GaimGtkAddBuddyData *data = g_new0(GaimGtkAddBuddyData, 1); + +@@ -4315,8 +4330,10 @@ + ? account + : gaim_connection_get_account(gaim_connections_get_all()->data)); + ++#if ICONS_IN_DIALOGS + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG); ++#endif + + gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); + +@@ -4335,6 +4352,7 @@ + gtk_window_set_type_hint(GTK_WINDOW(data->window), + GDK_WINDOW_TYPE_HINT_DIALOG); + ++#if ICONS_IN_DIALOGS + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(data->window)->vbox), hbox); + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); +@@ -4342,6 +4360,9 @@ + + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(hbox), vbox); ++#else ++ vbox = GTK_DIALOG(data->window)->vbox; ++#endif + + label = gtk_label_new( + _("Please enter the screen name of the person you would like " +@@ -4663,10 +4684,14 @@ + GList *l; + GaimConnection *gc; + GtkWidget *label; ++ GtkWidget *pri_label; + GtkWidget *rowbox; +- GtkWidget *hbox; + GtkWidget *vbox; ++ GtkWidget *sw; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img; ++#endif + + if (account != NULL) { + gc = gaim_account_get_connection(account); +@@ -4698,8 +4723,10 @@ + data->account = account; + data->default_chat_name = g_strdup(name); + ++#if ICONS_IN_DIALOGS + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG); ++#endif + + gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); + +@@ -4720,6 +4747,7 @@ + gtk_window_set_type_hint(GTK_WINDOW(data->window), + GDK_WINDOW_TYPE_HINT_DIALOG); + ++#if ICONS_IN_DIALOGS + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(data->window)->vbox), hbox); + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); +@@ -4727,6 +4755,9 @@ + + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_add(GTK_CONTAINER(hbox), vbox); ++#else ++ vbox = GTK_DIALOG(data->window)->vbox; ++#endif + + label = gtk_label_new( + _("Please enter an alias, and the appropriate information " +Index: gaim/src/gtkconn.c +=================================================================== +--- gaim.orig/src/gtkconn.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtkconn.c 2005-08-19 23:27:18.000000000 +0200 +@@ -371,7 +371,10 @@ + + /* Build the window if it isn't there yet */ + if (!disconnect_window) { +- GtkWidget *hbox, *vbox, *img; ++ GtkWidget *hbox, *vbox; ++ #if ICONS_IN_DIALOGS ++ GtkWidget *img; ++ #endif + GtkCellRenderer *rend, *rend2; + + disconnect_window = g_new0(struct disconnect_window, 1); +@@ -384,6 +387,7 @@ + gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(disconnect_window->window)->vbox), GAIM_HIG_BORDER); + gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(disconnect_window->window)->vbox), GAIM_HIG_BOX_SPACE); + ++#if ICONS_IN_DIALOGS + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(disconnect_window->window)->vbox), hbox); + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG); +@@ -392,6 +396,9 @@ + + vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); ++#else ++ vbox = GTK_DIALOG(disconnect_window->window)->vbox; ++#endif + + disconnect_window->label = gtk_label_new(label_text); + +Index: gaim/src/gtkconv.c +=================================================================== +--- gaim.orig/src/gtkconv.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtkconv.c 2005-08-19 23:27:18.000000000 +0200 +@@ -847,10 +847,12 @@ + GtkWidget *label; + GtkWidget *vbox, *hbox; + GtkWidget *table; ++#if ICONS_IN_DIALOGS + GtkWidget *img; + + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG); ++#endif + + info = g_new0(InviteBuddyInfo, 1); + info->conv = conv; +@@ -880,6 +882,7 @@ + gtk_box_set_spacing(GTK_BOX(vbox), GAIM_HIG_BORDER); + gtk_container_set_border_width(GTK_CONTAINER(vbox), GAIM_HIG_BOX_SPACE); + ++#if ICONS_IN_DIALOGS + /* Setup the inner hbox and put the dialog's icon in it. */ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(vbox), hbox); +@@ -889,6 +892,7 @@ + /* Setup the right vbox. */ + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(hbox), vbox); ++#endif + + /* Put our happy label in it. */ + label = gtk_label_new(_("Please enter the name of the user you wish " +@@ -1107,8 +1111,10 @@ + GaimGtkWindow *gtkwin = GAIM_GTK_WINDOW(win); + GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + GtkWidget *hbox; ++#if ICONS_IN_DIALOGS + GtkWidget *img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG); ++#endif + GtkWidget *label; + struct _search *s; + +@@ -1139,9 +1145,11 @@ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(gtkconv->dialogs.search)->vbox), + hbox); ++#if ICONS_IN_DIALOGS + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); + + gtk_misc_set_alignment(GTK_MISC(img), 0, 0); ++#endif + gtk_dialog_set_response_sensitive(GTK_DIALOG(gtkconv->dialogs.search), + GTK_RESPONSE_OK, FALSE); + +Index: gaim/src/gtkdebug.c +=================================================================== +--- gaim.orig/src/gtkdebug.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtkdebug.c 2005-08-19 23:27:18.000000000 +0200 +@@ -149,7 +149,10 @@ + static void + find_cb(GtkWidget *w, DebugWindow *win) + { +- GtkWidget *hbox, *img, *label; ++ GtkWidget *hbox, *label; ++#if ICONS_IN_DIALOGS ++ GtkWidget *img; ++#endif + struct _find *f; + + if(win->find) +@@ -179,11 +182,13 @@ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(win->find)->vbox), + hbox); ++#if ICONS_IN_DIALOGS + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, + GTK_ICON_SIZE_DIALOG); + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); + + gtk_misc_set_alignment(GTK_MISC(img), 0, 0); ++#endif + gtk_dialog_set_response_sensitive(GTK_DIALOG(win->find), + GTK_RESPONSE_OK, FALSE); + +Index: gaim/src/gtkdialogs.c +=================================================================== +--- gaim.orig/src/gtkdialogs.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtkdialogs.c 2005-08-19 23:27:18.000000000 +0200 +@@ -534,7 +534,9 @@ + GtkWidget *window; + GtkWidget *hbox; + GtkWidget *label; ++#if ICONS_IN_DIALOGS + GtkWidget *img; ++#endif + gchar *norm = gaim_strreplace(ee, "rocksmyworld", ""); + + label = gtk_label_new(NULL); +@@ -582,8 +584,10 @@ + + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox); ++#if ICONS_IN_DIALOGS + img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, gtk_icon_size_from_name(GAIM_ICON_SIZE_DIALOG_COOL)); + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); ++#endif + + gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); +Index: gaim/src/gtkgaim.h +=================================================================== +--- gaim.orig/src/gtkgaim.h 2005-08-19 23:26:29.000000000 +0200 ++++ gaim/src/gtkgaim.h 2005-08-21 02:32:29.270335816 +0200 +@@ -61,5 +61,10 @@ + #define GAIM_HIG_BORDER 12 + #define GAIM_HIG_BOX_SPACE 6 + ++/** ++ * Do we want icons in dialogs? ++ */ ++#define ICONS_IN_DIALOGS 1 ++ + #endif /* _GAIM_GTKGAIM_H_ */ + +Index: gaim/src/gtknotify.c +=================================================================== +--- gaim.orig/src/gtknotify.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtknotify.c 2005-08-21 02:32:03.765213184 +0200 +@@ -125,7 +125,9 @@ + GtkWidget *dialog; + GtkWidget *hbox; + GtkWidget *label; ++#if ICONS_IN_DIALOGS + GtkWidget *img = NULL; ++#endif + char label_text[2048]; + const char *icon_name = NULL; + char *primary_esc, *secondary_esc; +@@ -149,11 +151,13 @@ + break; + } + ++#if ICONS_IN_DIALOGS + if (icon_name != NULL) + { + img = gtk_image_new_from_stock(icon_name, GTK_ICON_SIZE_DIALOG); + gtk_misc_set_alignment(GTK_MISC(img), 0, 0); + } ++#endif + + dialog = gtk_dialog_new_with_buttons(title ? title : GAIM_ALERT_TITLE, + NULL, 0, GTK_STOCK_CLOSE, +@@ -173,8 +177,10 @@ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); + ++#if ICONS_IN_DIALOGS + if (img != NULL) + gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); ++#endif + + primary_esc = g_markup_escape_text(primary, -1); + secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; +@@ -218,9 +224,11 @@ + GaimNotifyMailData *data; + GtkWidget *dialog; + GtkWidget *vbox; +- GtkWidget *hbox; + GtkWidget *label; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img; ++#endif + char *detail_text; + char *label_text; + +@@ -248,6 +256,7 @@ + gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); + gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BORDER); + ++#if ICONS_IN_DIALOGS + /* Setup the main horizontal box */ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); +@@ -262,6 +271,9 @@ + vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); ++#else ++ vbox = GTK_DIALOG(dialog)->vbox; ++#endif + + /* Descriptive label */ + detail_text = g_strdup_printf(ngettext("%s has %d new message.", +Index: gaim/src/gtkrequest.c +=================================================================== +--- gaim.orig/src/gtkrequest.c 2005-08-19 23:23:45.000000000 +0200 ++++ gaim/src/gtkrequest.c 2005-08-21 02:32:15.943361824 +0200 +@@ -281,10 +281,12 @@ + GaimGtkRequestData *data; + GtkWidget *dialog; + GtkWidget *vbox; +- GtkWidget *hbox; + GtkWidget *label; + GtkWidget *entry; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img; ++#endif + GtkWidget *toolbar; + char *label_text; + char *primary_esc, *secondary_esc; +@@ -318,6 +320,7 @@ + gtk_dialog_set_default_response(GTK_DIALOG(dialog), 0); + gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BORDER); + ++#if ICONS_IN_DIALOGS + /* Setup the main horizontal box */ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); +@@ -332,6 +335,9 @@ + vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); ++#else ++ vbox = GTK_DIALOG(dialog)->vbox; ++#endif + + /* Descriptive label */ + primary_esc = (primary != NULL) ? g_markup_escape_text(primary, -1) : NULL; +@@ -435,9 +441,11 @@ + GaimGtkRequestData *data; + GtkWidget *dialog; + GtkWidget *vbox, *vbox2; +- GtkWidget *hbox; + GtkWidget *label; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img; ++#endif + GtkWidget *radio = NULL; + char *label_text; + char *radio_text; +@@ -475,6 +483,7 @@ + gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); + gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BORDER); + ++#if ICONS_IN_DIALOGS + /* Setup the main horizontal box */ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); +@@ -488,6 +497,9 @@ + /* Vertical box */ + vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); ++#else ++ vbox = GTK_DIALOG(dialog)->vbox; ++#endif + + /* Descriptive label */ + primary_esc = (primary != NULL) ? g_markup_escape_text(primary, -1) : NULL; +@@ -536,9 +548,11 @@ + GaimGtkRequestData *data; + GtkWidget *dialog; + GtkWidget *vbox; +- GtkWidget *hbox; + GtkWidget *label; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img; ++#endif + void **buttons; + char *label_text; + char *primary_esc, *secondary_esc; +@@ -584,6 +598,7 @@ + gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); + gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BORDER); + ++#if ICONS_IN_DIALOGS + /* Setup the main horizontal box */ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); +@@ -597,7 +612,10 @@ + /* Vertical box */ + vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); +- ++#else ++ vbox = GTK_DIALOG(dialog)->vbox; ++#endif ++ + /* Descriptive label */ + primary_esc = (primary != NULL) ? g_markup_escape_text(primary, -1) : NULL; + secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; +@@ -620,10 +638,12 @@ + + + if (default_action == GAIM_DEFAULT_ACTION_NONE) { ++#if ICONS_IN_DIALOGS + GTK_WIDGET_SET_FLAGS(img, GTK_CAN_DEFAULT); + GTK_WIDGET_SET_FLAGS(img, GTK_CAN_FOCUS); + gtk_widget_grab_focus(img); + gtk_widget_grab_default(img); ++#endif + } else + gtk_dialog_set_default_response(GTK_DIALOG(dialog), default_action); + +@@ -1351,13 +1371,15 @@ + GtkWidget *win; + GtkWidget *vbox; + GtkWidget *vbox2; +- GtkWidget *hbox; + GtkWidget *bbox; + GtkWidget *frame; + GtkWidget *label; + GtkWidget *table; + GtkWidget *button; ++#if ICONS_IN_DIALOGS ++ GtkWidget *hbox; + GtkWidget *img; ++#endif + GtkWidget *sw; + GtkSizeGroup *sg; + GList *gl, *fl; +@@ -1392,6 +1414,7 @@ + g_signal_connect(G_OBJECT(win), "delete_event", + G_CALLBACK(destroy_multifield_cb), data); + ++#if ICONS_IN_DIALOGS + /* Setup the main horizontal box */ + hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); + gtk_container_add(GTK_CONTAINER(win), hbox); +@@ -1407,6 +1430,10 @@ + /* Setup the vbox */ + vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); ++#else ++ vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); ++ gtk_container_add(GTK_CONTAINER(win), vbox); ++#endif + gtk_widget_show(vbox); + + sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |