/soc/2015/mmcc/main: 9b3a8112fa25: initial replacement of deprec...
Michael McConville
mmcconville at mykolab.com
Wed Jun 24 22:22:47 EDT 2015
Changeset: 9b3a8112fa258702a8fcae049446628b1253025d
Author: Michael McConville <mmcconville at mykolab.com>
Date: 2015-06-24 22:22 -0400
Branch: default
URL: https://hg.pidgin.im/soc/2015/mmcc/main/rev/9b3a8112fa25
Description:
initial replacement of deprecated GTK Stock Items
diffstat:
pidgin/gtkaccount.c | 2 +-
pidgin/gtkcertmgr.c | 6 +++---
pidgin/gtkconv.c | 4 ++--
pidgin/gtkdebug.c | 6 ++++--
pidgin/gtkdialogs.c | 2 +-
pidgin/gtklog.c | 4 ++--
pidgin/gtknotify.c | 2 +-
pidgin/gtkplugin.c | 2 +-
pidgin/gtkrequest.c | 4 +++-
pidgin/gtksmiley-manager.c | 4 ++--
pidgin/gtkwhiteboard.c | 4 ++--
pidgin/gtkxfer.c | 10 +++++-----
pidgin/plugins/gevolution/add_buddy_dialog.c | 4 ++--
pidgin/plugins/gevolution/assoc-buddy.c | 4 ++--
pidgin/plugins/gevolution/new_person_dialog.c | 6 +++---
pidgin/plugins/spellchk.c | 4 ++--
pidgin/plugins/xmppconsole.c | 6 +++---
17 files changed, 39 insertions(+), 35 deletions(-)
diffs (truncated from 363 to 300 lines):
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -700,7 +700,7 @@ add_user_options(AccountPrefsDialog *dia
gtk_box_pack_start(GTK_BOX(vbox2), hbox2, FALSE, FALSE, PIDGIN_HIG_BORDER);
gtk_widget_show(hbox2);
- button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
+ button = gtk_button_new_with_mnemonic(_("_Remove"));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(icon_reset_cb), dialog);
gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0);
diff --git a/pidgin/gtkcertmgr.c b/pidgin/gtkcertmgr.c
--- a/pidgin/gtkcertmgr.c
+++ b/pidgin/gtkcertmgr.c
@@ -481,7 +481,7 @@ tls_peers_mgmt_build(void)
/* Import button */
tpm_dat->importbutton = importbutton =
- gtk_button_new_from_stock(GTK_STOCK_OPEN);
+ gtk_button_new_with_mnemonic(_("_Open"));
gtk_box_pack_start(GTK_BOX(bbox), importbutton, FALSE, FALSE, 0);
gtk_widget_show(importbutton);
g_signal_connect(G_OBJECT(importbutton), "clicked",
@@ -490,7 +490,7 @@ tls_peers_mgmt_build(void)
/* Export button */
tpm_dat->exportbutton = exportbutton =
- gtk_button_new_from_stock(GTK_STOCK_SAVE_AS);
+ gtk_button_new_with_mnemonic(_("Save _As"));
gtk_box_pack_start(GTK_BOX(bbox), exportbutton, FALSE, FALSE, 0);
gtk_widget_show(exportbutton);
g_signal_connect(G_OBJECT(exportbutton), "clicked",
@@ -508,7 +508,7 @@ tls_peers_mgmt_build(void)
/* Delete button */
tpm_dat->deletebutton = deletebutton =
- gtk_button_new_from_stock(GTK_STOCK_DELETE);
+ gtk_button_new_with_mnemonic(_("_Delete"));
gtk_box_pack_start(GTK_BOX(bbox), deletebutton, FALSE, FALSE, 0);
gtk_widget_show(deletebutton);
g_signal_connect(G_OBJECT(deletebutton), "clicked",
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -937,7 +937,7 @@ invite_cb(GtkWidget *widget, PidginConve
invite_dialog = gtk_dialog_new_with_buttons(
_("Invite Buddy Into Chat Room"),
GTK_WINDOW(gtkwin->window), 0,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
PIDGIN_STOCK_INVITE, GTK_RESPONSE_OK, NULL);
gtk_dialog_set_default_response(GTK_DIALOG(invite_dialog),
@@ -9009,7 +9009,7 @@ build_warn_close_dialog(PidginConvWindow
warn_close_dialog = gtk_dialog_new_with_buttons(_("Confirm close"),
GTK_WINDOW(gtkwin->window), GTK_DIALOG_MODAL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL);
gtk_dialog_set_default_response(GTK_DIALOG(warn_close_dialog),
diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c
--- a/pidgin/gtkdebug.c
+++ b/pidgin/gtkdebug.c
@@ -468,14 +468,16 @@ debug_window_new(void)
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
/* Save */
- item = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE);
+ item = gtk_tool_button_new(NULL, _("_Save"));
+ gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(item), "document-save");
gtk_tool_item_set_is_important(item, TRUE);
gtk_tool_item_set_tooltip_text(item, _("Save"));
g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(save_cb), win);
gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item));
/* Clear button */
- item = gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR);
+ item = gtk_tool_button_new(NULL, _("_Clear"));
+ gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(item), "edit-clear");
gtk_tool_item_set_is_important(item, TRUE);
gtk_tool_item_set_tooltip_text(item, _("Clear"));
g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(clear_cb), win);
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -1054,7 +1054,7 @@ pidgin_dialogs_ee(const char *ee)
if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0)
return FALSE;
- window = gtk_dialog_new_with_buttons(PIDGIN_ALERT_TITLE, NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL);
+ window = gtk_dialog_new_with_buttons(PIDGIN_ALERT_TITLE, NULL, 0, _("_Close"), GTK_RESPONSE_OK, NULL);
gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK);
g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL);
diff --git a/pidgin/gtklog.c b/pidgin/gtklog.c
--- a/pidgin/gtklog.c
+++ b/pidgin/gtklog.c
@@ -574,7 +574,7 @@ static PidginLogViewer *display_log_view
/* Window ***********/
lv->window = gtk_dialog_new_with_buttons(title, NULL, 0,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
+ _("_Close"), GTK_RESPONSE_CLOSE, NULL);
#ifdef _WIN32
/* Steal the "HELP" response and use it to trigger browsing to the logs folder */
gtk_dialog_add_button(GTK_DIALOG(lv->window), _("_Browse logs folder"), GTK_RESPONSE_HELP);
@@ -667,7 +667,7 @@ static PidginLogViewer *display_log_view
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
lv->entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(hbox), lv->entry, TRUE, TRUE, 0);
- find_button = gtk_button_new_from_stock(GTK_STOCK_FIND);
+ find_button = gtk_button_new_with_mnemonic(_("_Find"));
gtk_box_pack_start(GTK_BOX(hbox), find_button, FALSE, FALSE, 0);
g_signal_connect(GTK_ENTRY(lv->entry), "activate", G_CALLBACK(search_cb), lv);
g_signal_connect(GTK_BUTTON(find_button), "clicked", G_CALLBACK(search_cb), lv);
diff --git a/pidgin/gtknotify.c b/pidgin/gtknotify.c
--- a/pidgin/gtknotify.c
+++ b/pidgin/gtknotify.c
@@ -570,7 +570,7 @@ pidgin_notify_message(PurpleNotifyMsgTyp
}
dialog = gtk_dialog_new_with_buttons(title ? title : PIDGIN_ALERT_TITLE,
- NULL, 0, GTK_STOCK_CLOSE,
+ NULL, 0, _("_Close"),
GTK_RESPONSE_CLOSE, NULL);
gtk_window_set_role(GTK_WINDOW(dialog), "notify_dialog");
diff --git a/pidgin/gtkplugin.c b/pidgin/gtkplugin.c
--- a/pidgin/gtkplugin.c
+++ b/pidgin/gtkplugin.c
@@ -351,7 +351,7 @@ pidgin_plugin_open_config(PurplePlugin *
ui_data->u.frame.dialog = dialog = gtk_dialog_new_with_buttons(
PIDGIN_ALERT_TITLE, parent,
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE,
+ GTK_DIALOG_DESTROY_WITH_PARENT, _("_Close"),
GTK_RESPONSE_CLOSE, NULL);
g_signal_connect(G_OBJECT(dialog), "response",
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -325,6 +325,8 @@ destroy_multifield_cb(GtkWidget *dialog,
if (!strcmp((r), text) || !strcmp(_(r), text)) \
return (l);
+/* XXX: this seems to serve no real purpose, especially
+ * because we're switching off of Stock Items */
static const char *
text_to_stock(const char *text)
{
@@ -540,7 +542,7 @@ pidgin_request_input(const char *title,
/* Create the dialog. */
dialog = gtk_dialog_new_with_buttons(title ? title : PIDGIN_ALERT_TITLE,
NULL, 0,
- text_to_stock(cancel_text), 1,
+ _("_Cancel"), 1,
text_to_stock(ok_text), 0,
NULL);
data->dialog = dialog;
diff --git a/pidgin/gtksmiley-manager.c b/pidgin/gtksmiley-manager.c
--- a/pidgin/gtksmiley-manager.c
+++ b/pidgin/gtksmiley-manager.c
@@ -326,7 +326,7 @@ edit_dialog_show(SmileyManager *manager,
smiley ? _("Edit Smiley") : _("Add Smiley"),
manager ? GTK_WINDOW(manager->window) : NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
smiley ? GTK_STOCK_SAVE : GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT,
NULL));
gtk_dialog_set_default_response(
@@ -766,7 +766,7 @@ pidgin_smiley_manager_show(void)
manager->window = win = GTK_DIALOG(gtk_dialog_new_with_buttons(
_("Custom Smiley Manager"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
- PIDGIN_STOCK_ADD, GTK_RESPONSE_YES,
+ _("_Add"), GTK_RESPONSE_YES,
PIDGIN_STOCK_MODIFY, PIDGIN_RESPONSE_MODIFY,
GTK_STOCK_DELETE, GTK_RESPONSE_NO,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
diff --git a/pidgin/gtkwhiteboard.c b/pidgin/gtkwhiteboard.c
--- a/pidgin/gtkwhiteboard.c
+++ b/pidgin/gtkwhiteboard.c
@@ -245,14 +245,14 @@ static void pidgin_whiteboard_create(Pur
gtk_widget_show(vbox_controls);
/* Add a clear button */
- clear_button = gtk_button_new_from_stock(GTK_STOCK_CLEAR);
+ clear_button = gtk_button_new_with_mnemonic(_("_Close"));
gtk_box_pack_start(GTK_BOX(vbox_controls), clear_button, FALSE, FALSE, PIDGIN_HIG_BOX_SPACE);
gtk_widget_show(clear_button);
g_signal_connect(G_OBJECT(clear_button), "clicked",
G_CALLBACK(pidgin_whiteboard_button_clear_press), gtkwb);
/* Add a save button */
- save_button = gtk_button_new_from_stock(GTK_STOCK_SAVE);
+ save_button = gtk_button_new_with_mnemonic(_("_Save"));
gtk_box_pack_start(GTK_BOX(vbox_controls), save_button, FALSE, FALSE, PIDGIN_HIG_BOX_SPACE);
gtk_widget_show(save_button);
diff --git a/pidgin/gtkxfer.c b/pidgin/gtkxfer.c
--- a/pidgin/gtkxfer.c
+++ b/pidgin/gtkxfer.c
@@ -774,7 +774,7 @@ pidgin_xfer_dialog_new(void)
bbox = pidgin_dialog_get_action_area(GTK_DIALOG(window));
#define ADD_BUTTON(b, label, callback, callbackdata) do { \
- GtkWidget *button = gtk_button_new_from_stock(label); \
+ GtkWidget *button = gtk_button_new_with_mnemonic(_(label)); \
gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); \
g_signal_connect(G_OBJECT(button), "clicked", callback, callbackdata); \
gtk_widget_show(button); \
@@ -782,19 +782,19 @@ pidgin_xfer_dialog_new(void)
} while (0)
/* Open button */
- ADD_BUTTON(dialog->open_button, GTK_STOCK_OPEN, G_CALLBACK(open_button_cb), dialog);
+ ADD_BUTTON(dialog->open_button, "_Open", G_CALLBACK(open_button_cb), dialog);
gtk_widget_set_sensitive(dialog->open_button, FALSE);
/* Remove button */
- ADD_BUTTON(dialog->remove_button, GTK_STOCK_REMOVE, G_CALLBACK(remove_button_cb), dialog);
+ ADD_BUTTON(dialog->remove_button, "_Remove", G_CALLBACK(remove_button_cb), dialog);
gtk_widget_hide(dialog->remove_button);
/* Stop button */
- ADD_BUTTON(dialog->stop_button, GTK_STOCK_STOP, G_CALLBACK(stop_button_cb), dialog);
+ ADD_BUTTON(dialog->stop_button, "_Stop", G_CALLBACK(stop_button_cb), dialog);
gtk_widget_set_sensitive(dialog->stop_button, FALSE);
/* Close button */
- ADD_BUTTON(dialog->close_button, GTK_STOCK_CLOSE, G_CALLBACK(close_button_cb), dialog);
+ ADD_BUTTON(dialog->close_button, "_Close", G_CALLBACK(close_button_cb), dialog);
#undef ADD_BUTTON
diff --git a/pidgin/plugins/gevolution/add_buddy_dialog.c b/pidgin/plugins/gevolution/add_buddy_dialog.c
--- a/pidgin/plugins/gevolution/add_buddy_dialog.c
+++ b/pidgin/plugins/gevolution/add_buddy_dialog.c
@@ -502,7 +502,7 @@ gevo_add_buddy_dialog_show(PurpleAccount
G_CALLBACK(search_changed_cb), dialog);
/* Clear button */
- button = gtk_button_new_from_stock(GTK_STOCK_CLEAR);
+ button = gtk_button_new_with_mnemonic(_("_Clear"));
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
gtk_widget_show(button);
@@ -572,7 +572,7 @@ gevo_add_buddy_dialog_show(PurpleAccount
G_CALLBACK(new_person_cb), dialog);
/* "Cancel" button */
- button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+ button = gtk_button_new_with_mnemonic(_("_Cancel"));
gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
gtk_widget_show(button);
diff --git a/pidgin/plugins/gevolution/assoc-buddy.c b/pidgin/plugins/gevolution/assoc-buddy.c
--- a/pidgin/plugins/gevolution/assoc-buddy.c
+++ b/pidgin/plugins/gevolution/assoc-buddy.c
@@ -381,7 +381,7 @@ gevo_associate_buddy_dialog_new(PurpleBu
G_CALLBACK(search_changed_cb), dialog);
/* Clear button */
- button = gtk_button_new_from_stock(GTK_STOCK_CLEAR);
+ button = gtk_button_new_with_mnemonic(_("_Clear"));
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
gtk_widget_show(button);
@@ -441,7 +441,7 @@ gevo_associate_buddy_dialog_new(PurpleBu
G_CALLBACK(new_person_cb), dialog);
/* "Cancel" button */
- button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+ button = gtk_button_new_with_mnemonic(_("_Cancel"));
gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
gtk_widget_show(button);
diff --git a/pidgin/plugins/gevolution/new_person_dialog.c b/pidgin/plugins/gevolution/new_person_dialog.c
--- a/pidgin/plugins/gevolution/new_person_dialog.c
+++ b/pidgin/plugins/gevolution/new_person_dialog.c
@@ -325,7 +325,7 @@ gevo_new_person_dialog_show(EBook *book,
gtk_widget_show(vbox2);
/* Buddy icon button */
- button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
+ button = gtk_button_new_with_mnemonic(_("_Open"));
gtk_box_pack_start(GTK_BOX(vbox2), button, FALSE, FALSE, 0);
gtk_widget_show(button);
@@ -397,7 +397,7 @@ gevo_new_person_dialog_show(EBook *book,
gtk_widget_show(bbox);
/* Cancel button */
- button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+ button = gtk_button_new_with_mnemonic(_("_Cancel"));
More information about the Commits
mailing list