summaryrefslogtreecommitdiff
path: root/mate-dictionary
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-02-14 04:03:57 +0100
committerraveit65 <[email protected]>2018-02-14 09:26:08 +0100
commit70a60111e00fe834e1303d87265c1aa65cb1f086 (patch)
tree88faea28f15ac67a81e05724b068f772a8ab8057 /mate-dictionary
parentdab6502bbced250a11781b0239300af3d787b4a4 (diff)
downloadmate-utils-70a60111e00fe834e1303d87265c1aa65cb1f086.tar.bz2
mate-utils-70a60111e00fe834e1303d87265c1aa65cb1f086.tar.xz
avoid deprecated GtkStock
Diffstat (limited to 'mate-dictionary')
-rw-r--r--mate-dictionary/libgdict/gdict-database-chooser.c6
-rw-r--r--mate-dictionary/libgdict/gdict-source-chooser.c6
-rw-r--r--mate-dictionary/libgdict/gdict-strategy-chooser.c6
-rw-r--r--mate-dictionary/src/gdict-applet.c39
-rw-r--r--mate-dictionary/src/gdict-pref-dialog.c4
-rw-r--r--mate-dictionary/src/gdict-source-dialog.c12
-rw-r--r--mate-dictionary/src/gdict-window.c32
7 files changed, 66 insertions, 39 deletions
diff --git a/mate-dictionary/libgdict/gdict-database-chooser.c b/mate-dictionary/libgdict/gdict-database-chooser.c
index 37572abe..8ccc8201 100644
--- a/mate-dictionary/libgdict/gdict-database-chooser.c
+++ b/mate-dictionary/libgdict/gdict-database-chooser.c
@@ -1130,7 +1130,11 @@ gdict_database_chooser_add_button (GdictDatabaseChooser *chooser,
priv = chooser->priv;
- button = gtk_button_new_from_stock (button_text);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", button_text,
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
gtk_widget_set_can_default (button, TRUE);
diff --git a/mate-dictionary/libgdict/gdict-source-chooser.c b/mate-dictionary/libgdict/gdict-source-chooser.c
index 54b77f4e..1579cc19 100644
--- a/mate-dictionary/libgdict/gdict-source-chooser.c
+++ b/mate-dictionary/libgdict/gdict-source-chooser.c
@@ -884,7 +884,11 @@ gdict_source_chooser_add_button (GdictSourceChooser *chooser,
priv = chooser->priv;
- button = gtk_button_new_from_stock (button_text);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", button_text,
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
gtk_widget_set_can_default (button, TRUE);
diff --git a/mate-dictionary/libgdict/gdict-strategy-chooser.c b/mate-dictionary/libgdict/gdict-strategy-chooser.c
index 4b6f1ecd..a3a28112 100644
--- a/mate-dictionary/libgdict/gdict-strategy-chooser.c
+++ b/mate-dictionary/libgdict/gdict-strategy-chooser.c
@@ -1074,7 +1074,11 @@ gdict_strategy_chooser_add_button (GdictStrategyChooser *chooser,
priv = chooser->priv;
- button = gtk_button_new_from_stock (button_text);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", button_text,
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
gtk_widget_set_can_default (button, TRUE);
diff --git a/mate-dictionary/src/gdict-applet.c b/mate-dictionary/src/gdict-applet.c
index 817880dd..e8b7e62b 100644
--- a/mate-dictionary/src/gdict-applet.c
+++ b/mate-dictionary/src/gdict-applet.c
@@ -206,8 +206,8 @@ save_cb (GtkWidget *widget,
dialog = gtk_file_chooser_dialog_new (_("Save a Copy"),
GTK_WINDOW (priv->window),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ "gtk-cancel", GTK_RESPONSE_CANCEL,
+ "gtk-save", GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
@@ -353,7 +353,12 @@ gdict_applet_build_window (GdictApplet *applet)
gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
- button = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-clear",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_tooltip_text (button, _("Clear the definitions found"));
set_atk_name_description (button,
_("Clear definition"),
@@ -363,7 +368,12 @@ gdict_applet_build_window (GdictApplet *applet)
gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
- button = gtk_button_new_from_stock (GTK_STOCK_PRINT);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-print",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_tooltip_text (button, _("Print the definitions found"));
set_atk_name_description (button,
_("Print definition"),
@@ -373,7 +383,12 @@ gdict_applet_build_window (GdictApplet *applet)
gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
- button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-save",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_tooltip_text (button, _("Save the definitions found"));
set_atk_name_description (button,
_("Save definition"),
@@ -1154,25 +1169,25 @@ gdict_applet_init (GdictApplet *applet)
}
static const GtkActionEntry gdict_applet_menu_actions[] = {
- {"DictionaryLookup", GTK_STOCK_FIND, N_("_Look Up Selected Text"),
+ {"DictionaryLookup", "edit-find", N_("_Look Up Selected Text"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_lookup) },
- {"DictionaryClear", GTK_STOCK_CLEAR, N_("Cl_ear"),
+ {"DictionaryClear", "edit-clear", N_("Cl_ear"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_clear) },
- {"DictionaryPrint", GTK_STOCK_PRINT, N_("_Print"),
+ {"DictionaryPrint", "document-print", N_("_Print"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_print) },
- {"DictionarySave", GTK_STOCK_SAVE, N_("_Save"),
+ {"DictionarySave", "document-save", N_("_Save"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_save) },
- {"DictionaryPreferences", GTK_STOCK_PREFERENCES, N_("Preferences"),
+ {"DictionaryPreferences", "preferences-desktop", N_("Preferences"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_preferences) },
- {"DictionaryHelp", GTK_STOCK_HELP, N_("_Help"),
+ {"DictionaryHelp", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_help) },
- {"DictionaryAbout", GTK_STOCK_ABOUT, N_("_About"),
+ {"DictionaryAbout", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (gdict_applet_cmd_about) },
};
diff --git a/mate-dictionary/src/gdict-pref-dialog.c b/mate-dictionary/src/gdict-pref-dialog.c
index e3563479..ddf80f0e 100644
--- a/mate-dictionary/src/gdict-pref-dialog.c
+++ b/mate-dictionary/src/gdict-pref-dialog.c
@@ -352,10 +352,10 @@ source_remove_clicked_cb (GtkWidget *widget,
"dictionary source from the list."));
gtk_dialog_add_button (GTK_DIALOG (confirm_dialog),
- GTK_STOCK_CANCEL,
+ "gtk-cancel",
GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (GTK_DIALOG (confirm_dialog),
- GTK_STOCK_REMOVE,
+ "gtk-remove",
GTK_RESPONSE_OK);
gtk_window_set_title (GTK_WINDOW (confirm_dialog), "");
diff --git a/mate-dictionary/src/gdict-source-dialog.c b/mate-dictionary/src/gdict-source-dialog.c
index f79b5a4a..3fc17de5 100644
--- a/mate-dictionary/src/gdict-source-dialog.c
+++ b/mate-dictionary/src/gdict-source-dialog.c
@@ -607,7 +607,7 @@ gdict_source_dialog_constructor (GType type,
/* the help button is always visible */
dialog->help_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
- GTK_STOCK_HELP,
+ "gtk-help",
GTK_RESPONSE_HELP);
vbox = GTK_WIDGET (gtk_builder_get_object (dialog->builder, "db-vbox"));
@@ -636,15 +636,15 @@ gdict_source_dialog_constructor (GType type,
/* we just allow closing the dialog */
dialog->close_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
- GTK_STOCK_CLOSE,
+ "gtk-close",
GTK_RESPONSE_CLOSE);
break;
case GDICT_SOURCE_DIALOG_CREATE:
dialog->cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL,
+ "gtk-cancel",
GTK_RESPONSE_CANCEL);
dialog->add_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
- GTK_STOCK_ADD,
+ "gtk-add",
GTK_RESPONSE_ACCEPT);
/* the "add" button sensitivity is controlled by the transport_combo
* since it's the only setting that makes a source usable.
@@ -653,10 +653,10 @@ gdict_source_dialog_constructor (GType type,
break;
case GDICT_SOURCE_DIALOG_EDIT:
dialog->cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL,
+ "gtk-cancel",
GTK_RESPONSE_CANCEL);
dialog->close_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
- GTK_STOCK_CLOSE,
+ "gtk-close",
GTK_RESPONSE_CLOSE);
break;
default:
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c
index 07d05922..b5e371fd 100644
--- a/mate-dictionary/src/gdict-window.c
+++ b/mate-dictionary/src/gdict-window.c
@@ -964,8 +964,8 @@ gdict_window_cmd_save_as (GtkAction *action,
dialog = gtk_file_chooser_dialog_new (_("Save a Copy"),
GTK_WINDOW (window),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ "gtk-cancel", GTK_RESPONSE_CANCEL,
+ "gtk-save", GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
@@ -1291,40 +1291,40 @@ static const GtkActionEntry entries[] =
{ "Help", NULL, N_("_Help") },
/* File menu */
- { "FileNew", GTK_STOCK_NEW, N_("_New"), "<control>N",
+ { "FileNew", "document-new", N_("_New"), "<control>N",
N_("New look up"), G_CALLBACK (gdict_window_cmd_file_new) },
- { "FileSaveAs", GTK_STOCK_SAVE_AS, N_("_Save a Copy..."), NULL, NULL,
+ { "FileSaveAs", "document-save-as", N_("_Save a Copy..."), NULL, NULL,
G_CALLBACK (gdict_window_cmd_save_as) },
{ "FilePreview", NULL, N_("P_review..."), "<control><shift>P",
N_("Preview this document"), G_CALLBACK (gdict_window_cmd_file_preview) },
- { "FilePrint", GTK_STOCK_PRINT, N_("_Print..."), "<control>P",
+ { "FilePrint", "document-print", N_("_Print..."), "<control>P",
N_("Print this document"), G_CALLBACK (gdict_window_cmd_file_print) },
- { "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W", NULL,
+ { "FileCloseWindow", "window-close", N_("_Close"), "<control>W", NULL,
G_CALLBACK (gdict_window_cmd_file_close_window) },
/* Edit menu */
- { "EditCopy", GTK_STOCK_COPY, NULL, "<control>C", NULL,
+ { "EditCopy", "edit-copy", N_("_Copy"), "<control>C", NULL,
G_CALLBACK (gdict_window_cmd_edit_copy) },
{ "EditSelectAll", NULL, N_("Select _All"), "<control>A", NULL,
G_CALLBACK (gdict_window_cmd_edit_select_all) },
- { "EditFind", GTK_STOCK_FIND, NULL, "<control>F",
+ { "EditFind", "edit-find", N_("_Find"), "<control>F",
N_("Find a word or phrase in the document"),
G_CALLBACK (gdict_window_cmd_edit_find) },
{ "EditFindNext", NULL, N_("Find Ne_xt"), "<control>G", NULL,
G_CALLBACK (gdict_window_cmd_edit_find_next) },
{ "EditFindPrevious", NULL, N_("Find Pre_vious"), "<control><shift>G", NULL,
G_CALLBACK (gdict_window_cmd_edit_find_previous) },
- { "EditPreferences", GTK_STOCK_PREFERENCES, N_("_Preferences"), NULL, NULL,
+ { "EditPreferences", "preferences-desktop", N_("_Preferences"), NULL, NULL,
G_CALLBACK (gdict_window_cmd_edit_preferences) },
/* Go menu */
- { "GoPreviousDef", GTK_STOCK_GO_BACK, N_("_Previous Definition"), "<control>Page_Up",
+ { "GoPreviousDef", "go-previous", N_("_Previous Definition"), "<control>Page_Up",
N_("Go to the previous definition"), G_CALLBACK (gdict_window_cmd_go_previous_def) },
- { "GoNextDef", GTK_STOCK_GO_FORWARD, N_("_Next Definition"), "<control>Page_Down",
+ { "GoNextDef", "go-next", N_("_Next Definition"), "<control>Page_Down",
N_("Go to the next definition"), G_CALLBACK (gdict_window_cmd_go_next_def) },
- { "GoFirstDef", GTK_STOCK_GOTO_FIRST, N_("_First Definition"), "<control>Home",
+ { "GoFirstDef", "go-first", N_("_First Definition"), "<control>Home",
N_("Go to the first definition"), G_CALLBACK (gdict_window_cmd_go_first_def) },
- { "GoLastDef", GTK_STOCK_GOTO_LAST, N_("_Last Definition"), "<control>End",
+ { "GoLastDef", "go-last", N_("_Last Definition"), "<control>End",
N_("Go to the last definition"), G_CALLBACK (gdict_window_cmd_go_last_def) },
/* View menu */
@@ -1338,15 +1338,15 @@ static const GtkActionEntry entries[] =
G_CALLBACK (gdict_window_cmd_view_strategies), },
/* Help menu */
- { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", NULL,
+ { "HelpContents", "help-browser", N_("_Contents"), "F1", NULL,
G_CALLBACK (gdict_window_cmd_help_contents) },
- { "HelpAbout", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL,
+ { "HelpAbout", "help-about", N_("_About"), NULL, NULL,
G_CALLBACK (gdict_window_cmd_help_about) },
/* Accelerators */
{ "Lookup", NULL, "", "<control>L", NULL, G_CALLBACK (gdict_window_cmd_lookup) },
{ "Escape", NULL, "", "Escape", "", G_CALLBACK (gdict_window_cmd_escape) },
- { "Slash", GTK_STOCK_FIND, NULL, "slash", NULL, G_CALLBACK (gdict_window_cmd_edit_find) },
+ { "Slash", "edit-find", NULL, "slash", NULL, G_CALLBACK (gdict_window_cmd_edit_find) },
};
static const GtkToggleActionEntry toggle_entries[] = {