[easytag/wip/application-window: 72/108] Remove last uses of deprecated GtkStock
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/application-window: 72/108] Remove last uses of deprecated GtkStock
- Date: Fri, 5 Sep 2014 16:23:28 +0000 (UTC)
commit 38c32f7fc350a54cd6bf604223e9dfacb27eade1
Author: David King <amigadave amigadave com>
Date: Fri Aug 8 20:35:20 2014 +0100
Remove last uses of deprecated GtkStock
src/application_window.c | 9 ++++++-
src/browser.c | 23 ++++++++++++---------
src/cddb_dialog.c | 18 +++++++++-------
src/easytag.c | 42 +++++++++++++++++++++++++++------------
src/load_files_dialog.c | 8 +++---
src/misc.c | 14 ++++++++----
src/playlist_dialog.c | 14 +-----------
src/preferences_dialog.c | 4 +-
src/scan_dialog.c | 5 +--
src/search_dialog.c | 8 +++---
src/tag_area.c | 49 +++++++++++++++++++++++----------------------
11 files changed, 107 insertions(+), 87 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index aac2a3e..414129f 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -335,7 +335,10 @@ delete_file (ET_File *ETFile, gboolean multiple_files, GError **error)
message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(msgdialog));
msgdialog_check_button = gtk_check_button_new_with_label(_("Repeat action for the remaining
files"));
gtk_container_add(GTK_CONTAINER(message_area),msgdialog_check_button);
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_NO,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_DELETE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Skip"),
+ GTK_RESPONSE_NO, _("_Cancel"),
+ GTK_RESPONSE_CANCEL, _("_Delete"),
+ GTK_RESPONSE_YES, NULL);
gtk_window_set_title(GTK_WINDOW(msgdialog),_("Delete File"));
//GTK_TOGGLE_BUTTON(msgbox_check_button)->active = TRUE; // Checked by default
}else
@@ -347,7 +350,9 @@ delete_file (ET_File *ETFile, gboolean multiple_files, GError **error)
_("Do you really want to delete the file '%s'?"),
basename_utf8);
gtk_window_set_title(GTK_WINDOW(msgdialog),_("Delete File"));
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_CANCEL,GTK_RESPONSE_NO,GTK_STOCK_DELETE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Cancel"),
+ GTK_RESPONSE_NO, _("_Delete"),
+ GTK_RESPONSE_YES, NULL);
}
gtk_dialog_set_default_response (GTK_DIALOG (msgdialog),
GTK_RESPONSE_YES);
diff --git a/src/browser.c b/src/browser.c
index 152ea03..7da6b79 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -842,7 +842,10 @@ Browser_Tree_Node_Selected (EtBrowser *self, GtkTreeSelection *selection)
"%s",
_("Some files have been modified but not saved"));
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(msgdialog),"%s",_("Do you want to save
them before changing the directory?"));
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_DISCARD,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_SAVE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Discard"),
+ GTK_RESPONSE_NO, _("_Cancel"),
+ GTK_RESPONSE_CANCEL, _("_Save"),
+ GTK_RESPONSE_YES, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (msgdialog),
GTK_RESPONSE_YES);
gtk_window_set_title(GTK_WINDOW(msgdialog),_("Confirm Directory Change"));
@@ -3827,7 +3830,7 @@ create_browser (EtBrowser *self)
/*
* The button to select a directory to browse
*/
- priv->button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
+ priv->button = gtk_button_new_with_mnemonic (_("_Open"));
gtk_box_pack_start (GTK_BOX (HBox), priv->button, FALSE, FALSE, 1);
g_signal_connect_swapped (priv->button, "clicked",
G_CALLBACK (File_Selection_Window_For_Directory),
@@ -4350,9 +4353,9 @@ et_browser_show_rename_directory_dialog (EtBrowser *self)
priv->rename_directory_dialog = gtk_dialog_new_with_buttons (_("Rename Directory"),
GTK_WINDOW (MainWindow),
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
+ _("_Cancel"),
GTK_RESPONSE_CANCEL,
- GTK_STOCK_APPLY,
+ _("_Rename"),
GTK_RESPONSE_APPLY,
NULL);
@@ -4760,9 +4763,9 @@ et_browser_show_open_directory_with_dialog (EtBrowser *self)
priv->open_directory_with_dialog = gtk_dialog_new_with_buttons (_("Browse Directory With"),
GTK_WINDOW (MainWindow),
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
+ _("_Cancel"),
GTK_RESPONSE_CANCEL,
- GTK_STOCK_EXECUTE,
+ _("_Execute"),
GTK_RESPONSE_OK, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (priv->open_directory_with_dialog),
@@ -4797,7 +4800,7 @@ et_browser_show_open_directory_with_dialog (EtBrowser *self)
self);
/* The button to Browse */
- Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
+ Button = gtk_button_new_with_mnemonic (_("_Open"));
gtk_box_pack_start(GTK_BOX(HBox),Button,FALSE,FALSE,0);
g_signal_connect_swapped(G_OBJECT(Button),"clicked",
G_CALLBACK(File_Selection_Window_For_File),G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->open_directory_with_combobox))));
@@ -4955,9 +4958,9 @@ et_browser_show_open_files_with_dialog (EtBrowser *self)
priv->open_files_with_dialog = gtk_dialog_new_with_buttons (_("Open Files With"),
GTK_WINDOW (MainWindow),
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
+ _("_Cancel"),
GTK_RESPONSE_CANCEL,
- GTK_STOCK_EXECUTE,
+ _("_Execute"),
GTK_RESPONSE_OK,
NULL);
@@ -4999,7 +5002,7 @@ et_browser_show_open_files_with_dialog (EtBrowser *self)
self);
/* The button to Browse */
- Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
+ Button = gtk_button_new_with_mnemonic (_("_Open"));
gtk_box_pack_start(GTK_BOX(HBox),Button,FALSE,FALSE,0);
g_signal_connect_swapped(G_OBJECT(Button),"clicked",
G_CALLBACK(File_Selection_Window_For_File),G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->open_files_with_combobox))));
diff --git a/src/cddb_dialog.c b/src/cddb_dialog.c
index e628cad..cfeeb37 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -2524,7 +2524,9 @@ Cddb_Set_Track_Infos_To_File_List (EtCDDBDialog *self)
GTK_BUTTONS_NONE,
"%s",
_("The number of CDDB results does not match the number of
selected files"));
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_APPLY,GTK_RESPONSE_APPLY,
NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Cancel"),
+ GTK_RESPONSE_CANCEL, _("_Apply"),
+ GTK_RESPONSE_APPLY, NULL);
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(msgdialog),"%s","Do you want to
continue?");
gtk_window_set_title (GTK_WINDOW (msgdialog),
_("Write Tag from CDDB"));
@@ -2977,8 +2979,8 @@ create_cddb_dialog (EtCDDBDialog *self)
gtk_widget_set_halign (Label, GTK_ALIGN_END);
gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
- // Button to generate CddbId and request string from the selected files
- Button = gtk_button_new_from_stock (GTK_STOCK_FIND);
+ /* Button to generate CddbId and request string from the selected files. */
+ Button = gtk_button_new_with_mnemonic (_("_Search"));
gtk_box_pack_start (GTK_BOX (hbox), Button, FALSE, FALSE, 0);
gtk_widget_set_can_default (Button, TRUE);
gtk_widget_grab_default (Button);
@@ -3006,7 +3008,7 @@ create_cddb_dialog (EtCDDBDialog *self)
gtk_box_pack_start(GTK_BOX(hbox),Separator,FALSE,FALSE,0);
/* Button to quit. */
- Button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+ Button = gtk_button_new_with_mnemonic (_("_Close"));
gtk_box_pack_end(GTK_BOX(hbox),Button,FALSE,FALSE,0);
gtk_widget_set_can_default(Button,TRUE);
g_signal_connect_swapped (Button, "clicked",
@@ -3054,8 +3056,8 @@ create_cddb_dialog (EtCDDBDialog *self)
/* Set content of the clipboard if available. */
gtk_editable_paste_clipboard (GTK_EDITABLE (priv->search_string_entry));
- // Button to run the search
- priv->search_button = gtk_button_new_from_stock(GTK_STOCK_FIND);
+ /* Button to run the search. */
+ priv->search_button = gtk_button_new_with_mnemonic (_("_Search"));
gtk_box_pack_start(GTK_BOX(hbox),priv->search_button,FALSE,FALSE,0);
gtk_widget_set_can_default(priv->search_button,TRUE);
gtk_widget_grab_default(priv->search_button);
@@ -3079,7 +3081,7 @@ create_cddb_dialog (EtCDDBDialog *self)
gtk_widget_set_tooltip_text (priv->stop_search_button, _("Stop the search"));
/* Button to quit. */
- Button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+ Button = gtk_button_new_with_mnemonic (_("_Close"));
gtk_box_pack_end(GTK_BOX(hbox),Button,FALSE,FALSE,0);
gtk_widget_set_can_default(Button,TRUE);
g_signal_connect_swapped (Button, "clicked",
@@ -3534,7 +3536,7 @@ create_cddb_dialog (EtCDDBDialog *self)
_("Whether to use the DLM algorithm to match CDDB results to files"));
/* Button to apply. */
- priv->apply_button = gtk_button_new_from_stock(GTK_STOCK_APPLY);
+ priv->apply_button = gtk_button_new_with_mnemonic (_("_Apply"));
gtk_box_pack_end(GTK_BOX(hbox),priv->apply_button,FALSE,FALSE,0);
g_signal_connect_swapped (priv->apply_button, "clicked",
G_CALLBACK (Cddb_Set_Track_Infos_To_File_List),
diff --git a/src/easytag.c b/src/easytag.c
index a79e553..6e3c833 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -292,7 +292,9 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
GTK_BUTTONS_NONE,
ngettext("A file was changed by an external program","%d files
were changed by an external program.",nb_files_changed_by_ext_program),
nb_files_changed_by_ext_program);
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_DISCARD,GTK_RESPONSE_NO,GTK_STOCK_SAVE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Discard"),
+ GTK_RESPONSE_NO, _("_Save"), GTK_RESPONSE_YES,
+ NULL);
gtk_dialog_set_default_response (GTK_DIALOG (msgdialog),
GTK_RESPONSE_YES);
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(msgdialog),"%s",_("Do you want to
continue saving the file?"));
@@ -507,14 +509,17 @@ Save_File (ET_File *ETFile, gboolean multiple_files,
msgdialog_check_button = gtk_check_button_new_with_label(_("Repeat action for the remaining
files"));
gtk_container_add(GTK_CONTAINER(message_area),msgdialog_check_button);
gtk_widget_show (msgdialog_check_button);
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_DISCARD,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_SAVE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog),
+ _("_Discard"), GTK_RESPONSE_NO,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
+ _("_Save"), GTK_RESPONSE_YES, NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(msgdialog_check_button), TRUE); // Checked by
default
- }else
+ }
+ else
{
gtk_dialog_add_buttons (GTK_DIALOG (msgdialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
- GTK_STOCK_SAVE, GTK_RESPONSE_YES,
- NULL);
+ _("_Cancel"), GTK_RESPONSE_NO,
+ _("_Save"), GTK_RESPONSE_YES, NULL);
}
gtk_dialog_set_default_response (GTK_DIALOG (msgdialog),
@@ -628,11 +633,17 @@ Save_File (ET_File *ETFile, gboolean multiple_files,
msgdialog_check_button = gtk_check_button_new_with_label(_("Repeat action for the remaining
files"));
gtk_container_add(GTK_CONTAINER(message_area),msgdialog_check_button);
gtk_widget_show (msgdialog_check_button);
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_DISCARD,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_SAVE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Discard"),
+ GTK_RESPONSE_NO, _("_Cancel"),
+ GTK_RESPONSE_CANCEL, _("_Save"),
+ GTK_RESPONSE_YES, NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(msgdialog_check_button), TRUE); // Checked by
default
- }else
+ }
+ else
{
-
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_DISCARD,GTK_RESPONSE_NO,GTK_STOCK_SAVE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgdialog), _("_Discard"),
+ GTK_RESPONSE_NO, _("_Save"),
+ GTK_RESPONSE_YES, NULL);
}
g_free(msg);
g_free(msg1);
@@ -1150,8 +1161,8 @@ Open_Quit_Recursion_Function_Window (void)
"%s",
_("Searching for audio files…"));
gtk_window_set_title (GTK_WINDOW (QuitRecursionWindow), _("Searching"));
- gtk_dialog_add_button (GTK_DIALOG (QuitRecursionWindow), GTK_STOCK_STOP,
- GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button (GTK_DIALOG (QuitRecursionWindow), _("_Stop"),
+ GTK_RESPONSE_CANCEL);
g_signal_connect (G_OBJECT (QuitRecursionWindow),"response",
G_CALLBACK (et_on_quit_recursion_response), NULL);
@@ -1251,7 +1262,10 @@ void Quit_MainWindow (void)
GTK_BUTTONS_NONE,
"%s",
_("Some files have been modified but not saved"));
-
gtk_dialog_add_buttons(GTK_DIALOG(msgbox),GTK_STOCK_DISCARD,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_SAVE,GTK_RESPONSE_YES,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgbox), _("_Discard"),
+ GTK_RESPONSE_NO, _("_Cancel"),
+ GTK_RESPONSE_CANCEL, _("_Save"),
+ GTK_RESPONSE_YES, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (msgbox),
GTK_RESPONSE_YES);
gtk_window_set_title(GTK_WINDOW(msgbox),_("Quit"));
@@ -1284,7 +1298,9 @@ void Quit_MainWindow (void)
GTK_BUTTONS_NONE,
"%s",
_("Do you really want to quit?"));
-
gtk_dialog_add_buttons(GTK_DIALOG(msgbox),GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_QUIT,GTK_RESPONSE_CLOSE,NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (msgbox), _("_Cancel"),
+ GTK_RESPONSE_CANCEL, _("_Quit"),
+ GTK_RESPONSE_CLOSE, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (msgbox),
GTK_RESPONSE_CLOSE);
gtk_window_set_title(GTK_WINDOW(msgbox),_("Quit"));
diff --git a/src/load_files_dialog.c b/src/load_files_dialog.c
index 6671f36..f0a4739 100644
--- a/src/load_files_dialog.c
+++ b/src/load_files_dialog.c
@@ -937,8 +937,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
_("Load Filenames From a Text File"));
gtk_window_set_transient_for (GTK_WINDOW (self), GTK_WINDOW (MainWindow));
gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
- gtk_dialog_add_buttons (GTK_DIALOG (self), GTK_STOCK_CLOSE,
- GTK_RESPONSE_CANCEL, GTK_STOCK_APPLY,
+ gtk_dialog_add_buttons (GTK_DIALOG (self), _("_Close"),
+ GTK_RESPONSE_CANCEL, _("_Apply"),
GTK_RESPONSE_APPLY, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_APPLY);
g_signal_connect (self, "response", G_CALLBACK (on_response), NULL);
@@ -971,8 +971,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
if ((path = et_application_window_get_current_path (ET_APPLICATION_WINDOW (MainWindow))) != NULL)
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->file_to_load_combo))),path);
// the 'changed' signal is attached below to enable/disable the button to load
- // Button 'browse'
- Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
+ /* Button 'browse'. */
+ Button = gtk_button_new_with_mnemonic (_("_Open"));
gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
g_signal_connect_swapped(G_OBJECT(Button),"clicked", G_CALLBACK(File_Selection_Window_For_File),
G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->file_to_load_combo))));
// Button 'load'
diff --git a/src/misc.c b/src/misc.c
index ade7569..c84a582 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -387,11 +387,15 @@ static void Open_File_Selection_Window (GtkWidget *entry, gchar *title, GtkFileC
return;
}
- FileSelectionWindow = gtk_file_chooser_dialog_new(title, parent_window, action,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
- NULL);
- // Set initial directory
+ FileSelectionWindow = gtk_file_chooser_dialog_new (title, parent_window,
+ action,
+ _("_Cancel"),
+ GTK_RESPONSE_CANCEL,
+ _("_Open"),
+ GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ /* Set initial directory. */
tmp = gtk_entry_get_text(GTK_ENTRY(entry));
if (tmp && *tmp)
{
diff --git a/src/playlist_dialog.c b/src/playlist_dialog.c
index 254bfbf..1f953b0 100644
--- a/src/playlist_dialog.c
+++ b/src/playlist_dialog.c
@@ -540,16 +540,6 @@ write_button_clicked (EtPlaylistDialog *self)
{
gchar *msg;
msg = g_strdup_printf(_("Written playlist file '%s'"),playlist_name_utf8);
- /*msgbox = msg_box_new(_("Information"),
- GTK_WINDOW(WritePlaylistWindow),
- NULL,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- msg,
- GTK_STOCK_DIALOG_INFO,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_run(GTK_DIALOG(msgbox));
- gtk_widget_destroy(msgbox);*/
Statusbar_Message(msg,TRUE);
g_free(msg);
}
@@ -665,8 +655,8 @@ create_playlist_dialog (EtPlaylistDialog *self)
gtk_window_set_title (GTK_WINDOW (self), _("Generate Playlist"));
gtk_window_set_transient_for (GTK_WINDOW (self), GTK_WINDOW (MainWindow));
gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
- gtk_dialog_add_buttons (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL);
+ gtk_dialog_add_buttons (dialog, _("_Cancel"), GTK_RESPONSE_CANCEL,
+ _("_Save"), GTK_RESPONSE_OK, NULL);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
g_signal_connect (dialog, "response", G_CALLBACK (on_response), NULL);
g_signal_connect (dialog, "delete-event",
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index 1ad8a90..0da26a7 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -304,8 +304,8 @@ create_preferences_dialog (EtPreferencesDialog *self)
gtk_window_set_title (GTK_WINDOW (self), _("Preferences"));
gtk_window_set_transient_for (GTK_WINDOW (self), GTK_WINDOW (MainWindow));
gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
- gtk_dialog_add_buttons (GTK_DIALOG (self), GTK_STOCK_CLOSE,
- GTK_RESPONSE_CLOSE, NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (self), _("_Close"), GTK_RESPONSE_CLOSE,
+ NULL);
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_CLOSE);
g_signal_connect (self, "response",
G_CALLBACK (et_preferences_on_response), NULL);
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index b0588cc..519af7f 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -2492,12 +2492,11 @@ create_scan_dialog (EtScanDialog *self)
gtk_window_set_title (GTK_WINDOW (self), _("Tag and Filename Scan"));
gtk_window_set_transient_for (GTK_WINDOW (self), GTK_WINDOW (MainWindow));
gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
- gtk_dialog_add_buttons (GTK_DIALOG (self), GTK_STOCK_CLOSE,
+ gtk_dialog_add_buttons (GTK_DIALOG (self), _("_Close"),
GTK_RESPONSE_CLOSE, NULL);
/* 'Scan selected files' button */
- scan_button = gtk_button_new_from_stock (GTK_STOCK_APPLY);
- gtk_button_set_label (GTK_BUTTON (scan_button), _("Scan Files"));
+ scan_button = gtk_button_new_with_label (_("Scan Files"));
gtk_widget_set_can_default (scan_button, TRUE);
gtk_dialog_add_action_widget (GTK_DIALOG (self), scan_button,
GTK_RESPONSE_APPLY);
diff --git a/src/search_dialog.c b/src/search_dialog.c
index 5639305..32cabd7 100644
--- a/src/search_dialog.c
+++ b/src/search_dialog.c
@@ -881,8 +881,8 @@ create_search_dialog (EtSearchDialog *self)
"changed", G_CALLBACK(Search_Result_List_Row_Selected),
self);
- // Button to run the search
- Button = gtk_button_new_from_stock(GTK_STOCK_FIND);
+ /* Button to run the search. */
+ Button = gtk_button_new_with_mnemonic (_("_Find"));
gtk_grid_attach (GTK_GRID (Table), Button, 5, 0, 1, 1);
gtk_widget_set_can_default(Button,TRUE);
gtk_widget_grab_default(Button);
@@ -890,8 +890,8 @@ create_search_dialog (EtSearchDialog *self)
g_signal_connect (gtk_bin_get_child (GTK_BIN (priv->search_string_combo)),
"activate", G_CALLBACK (Search_File), self);
- // Button to cancel
- Button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+ /* Button to cancel. */
+ Button = gtk_button_new_with_mnemonic (_("_Close"));
gtk_grid_attach (GTK_GRID (Table), Button, 5, 1, 1, 1);
g_signal_connect (Button, "clicked", G_CALLBACK (on_close_clicked), self);
diff --git a/src/tag_area.c b/src/tag_area.c
index b7af8b7..68b9cbf 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -747,17 +747,13 @@ on_entry_populate_popup (GtkEntry *entry,
menu_item = gtk_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- menu_item = gtk_image_menu_item_new_with_label (_("Convert '_' and '%20' to spaces"));
- image = gtk_image_new_from_stock (GTK_STOCK_CONVERT, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+ menu_item = gtk_menu_item_new_with_label (_("Convert '_' and '%20' to spaces"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
g_signal_connect_swapped (menu_item, "activate",
G_CALLBACK (Convert_P20_And_Underscore_Into_Spaces),
G_OBJECT (entry));
- menu_item = gtk_image_menu_item_new_with_label (_("Convert ' ' to '_'"));
- image = gtk_image_new_from_stock (GTK_STOCK_CONVERT, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+ menu_item = gtk_menu_item_new_with_label (_("Convert ' ' to '_'"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
g_signal_connect_swapped (menu_item, "activate",
G_CALLBACK (Convert_Space_Into_Underscore),
@@ -1411,12 +1407,13 @@ on_picture_add_button_clicked (GObject *object,
}
- FileSelectionWindow = gtk_file_chooser_dialog_new(_("Add Images"),
- parent_window,
- GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_OK,
- NULL);
+ FileSelectionWindow = gtk_file_chooser_dialog_new (_("Add Images"),
+ parent_window,
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ _("_Cancel"),
+ GTK_RESPONSE_CANCEL,
+ _("_Open"),
+ GTK_RESPONSE_OK, NULL);
// Add files filters
// "All files" filter
@@ -1561,12 +1558,14 @@ on_picture_properties_button_clicked (GObject *object,
title = g_strdup_printf (_("Image Properties %d/%d"), selection_i++,
selection_nbr);
- PictureTypesWindow = gtk_dialog_new_with_buttons(title,
- parent_window,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
+ PictureTypesWindow = gtk_dialog_new_with_buttons (title,
+ parent_window,
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ _("_Cancel"),
+ GTK_RESPONSE_REJECT,
+ _("_OK"),
+ GTK_RESPONSE_OK,
+ NULL);
g_free(title);
gtk_window_set_default_size (GTK_WINDOW (PictureTypesWindow), 400,
@@ -1775,12 +1774,14 @@ on_picture_save_button_clicked (GObject *object,
title = g_strdup_printf (_("Save Image %d/%d"), selection_i++,
selection_nbr);
- FileSelectionWindow = gtk_file_chooser_dialog_new(title,
- parent_window,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
- NULL);
+ FileSelectionWindow = gtk_file_chooser_dialog_new (title,
+ parent_window,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ _("_Cancel"),
+ GTK_RESPONSE_CANCEL,
+ _("_Save"),
+ GTK_RESPONSE_OK,
+ NULL);
g_free(title);
// Add files filters
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]