[seahorse] Common: don't use Gtk.Stock
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Common: don't use Gtk.Stock
- Date: Sat, 27 Jan 2018 16:19:32 +0000 (UTC)
commit e327d8314221d1ffc5d7775aa577c92daca7b119
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sat Jan 27 10:58:07 2018 +0100
Common: don't use Gtk.Stock
common/catalog.vala | 18 +++++++++---------
common/delete-dialog.vala | 4 ++--
common/exportable.vala | 2 +-
common/passphrase-prompt.vala | 8 ++++----
4 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/common/catalog.vala b/common/catalog.vala
index 7c23b79..e762e1b 100644
--- a/common/catalog.vala
+++ b/common/catalog.vala
@@ -362,25 +362,25 @@ public abstract class Catalog : Gtk.Window {
private const Gtk.ActionEntry[] UI_ENTRIES = {
/* Top menu items */
{ "file-menu", null, N_("_File") },
- { "file-export", Gtk.Stock.SAVE_AS, N_("E_xport…"), null,
- N_("Export to a file"), on_key_export_file },
+ { "file-export", null, N_("E_xport…"), null,
+ N_("Export to a file"), on_key_export_file },
{ "edit-menu", null, N_("_Edit") },
/*Translators: This text refers to deleting an item from its type's backing store*/
- { "edit-export-clipboard", Gtk.Stock.COPY, null, "<control>C",
+ { "edit-export-clipboard", null, N_("_Copy"), "<control>C",
N_("Copy to the clipboard"), on_key_export_clipboard },
- { "edit-delete", Gtk.Stock.DELETE, N_("_Delete"), null,
+ { "edit-delete", null, N_("_Delete"), null,
N_("Delete selected items"), on_object_delete },
- { "properties-object", Gtk.Stock.PROPERTIES, null, null,
+ { "properties-object", null, N_("_Properties"), null,
N_("Show the properties of this item"), on_properties_object },
- { "properties-keyring", Gtk.Stock.PROPERTIES, null, null,
+ { "properties-keyring", null, N_("_Properties"), null,
N_("Show the properties of this keyring"), on_properties_place },
- { "app-preferences", Gtk.Stock.PREFERENCES, N_("Prefere_nces"), null,
+ { "app-preferences", null, N_("Prefere_nces"), null,
N_("Change preferences for this program"), on_app_preferences },
{ "view-menu", null, N_("_View") },
{ "help-menu", null, N_("_Help") },
- { "app-about", Gtk.Stock.ABOUT, null, null,
+ { "app-about", null, N_("_About"), null,
N_("About this program"), on_app_about },
- { "help-show", Gtk.Stock.HELP, N_("_Contents"), "F1",
+ { "help-show", null, N_("_Contents"), "F1",
N_("Show Seahorse help"), on_help_show }
};
diff --git a/common/delete-dialog.vala b/common/delete-dialog.vala
index 94fe02d..5afa123 100644
--- a/common/delete-dialog.vala
+++ b/common/delete-dialog.vala
@@ -84,11 +84,11 @@ public class DeleteDialog : Gtk.MessageDialog {
update_response_buttons();
});
- var cancel = new Gtk.Button.from_stock(Gtk.Stock.CANCEL);
+ var cancel = new Gtk.Button.with_mnemonic(_("_Cancel"));
add_action_widget(cancel, Gtk.ResponseType.CANCEL);
cancel.show();
- var delet = new Gtk.Button.from_stock(Gtk.Stock.DELETE);
+ var delet = new Gtk.Button.with_mnemonic(_("_Delete"));
add_action_widget(delet, Gtk.ResponseType.OK);
delet.show();
}
diff --git a/common/exportable.vala b/common/exportable.vala
index 5000c4b..e425a18 100644
--- a/common/exportable.vala
+++ b/common/exportable.vala
@@ -188,7 +188,7 @@ public interface Exportable : GLib.Object {
out GLib.File chosen_file,
out Exporter chosen_exporter) {
var chooser = new Gtk.FileChooserDialog(null, parent, Gtk.FileChooserAction.SAVE,
- Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
+ _("_Cancel"), Gtk.ResponseType.CANCEL,
_("Export"), Gtk.ResponseType.ACCEPT,
null);
diff --git a/common/passphrase-prompt.vala b/common/passphrase-prompt.vala
index a3d163f..b3ec2f7 100644
--- a/common/passphrase-prompt.vala
+++ b/common/passphrase-prompt.vala
@@ -42,7 +42,7 @@ public class Seahorse.PassphrasePrompt : Gtk.Dialog {
GLib.Object(
title: title,
modal: true,
- icon_name: Gtk.Stock.DIALOG_AUTHENTICATION
+ icon_name: "dialog-password-symbolic"
);
Gtk.Box wvbox = new Gtk.Box(Gtk.Orientation.VERTICAL, HIG_LARGE * 2);
@@ -53,7 +53,7 @@ public class Seahorse.PassphrasePrompt : Gtk.Dialog {
wvbox.pack_start (chbox, false, false);
// The image
- Gtk.Image img = new Gtk.Image.from_stock(Gtk.Stock.DIALOG_AUTHENTICATION, Gtk.IconSize.DIALOG);
+ Gtk.Image img = new Gtk.Image.from_icon_name("dialog-password-symbolic", Gtk.IconSize.DIALOG);
img.set_alignment(0.0f, 0.0f);
chbox.pack_start(img, false, false);
@@ -114,11 +114,11 @@ public class Seahorse.PassphrasePrompt : Gtk.Dialog {
grid.show_all();
- Gtk.Button cancel_button = new Gtk.Button.from_stock(Gtk.Stock.CANCEL);
+ Gtk.Button cancel_button = new Gtk.Button.with_mnemonic(_("_Cancel"));
add_action_widget(cancel_button, Gtk.ResponseType.REJECT);
cancel_button.set_can_default(true);
- Gtk.Button ok_button = new Gtk.Button.from_stock(Gtk.Stock.OK);
+ Gtk.Button ok_button = new Gtk.Button.with_mnemonic(_("_OK"));
add_action_widget(ok_button, Gtk.ResponseType.ACCEPT);
ok_button.set_can_default(true);
ok_button.grab_default();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]