[gnome-contacts] Remove use of GtkStock



commit 8f135689efb1bd24839f24f6e6aff02ad68e196b
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Aug 4 09:58:05 2013 +0200

    Remove use of GtkStock
    
    Replace with literal button labels and mnemonics.

 src/contacts-app.vala                |    8 ++++----
 src/contacts-avatar-dialog.vala      |    6 +++---
 src/contacts-new-contact-dialog.vala |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 89866ad..e3d86e4 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -476,7 +476,7 @@ public class Contacts.App : Gtk.Application {
                            "%d contacts linked",
                            contact_list.size).printf (contact_list.size);
 
-    var b = new Button.from_stock (Stock.UNDO);
+    var b = new Button.with_mnemonic (_("_Undo"));
     g.add (new Label (msg));
     g.add (b);
 
@@ -508,7 +508,7 @@ public class Contacts.App : Gtk.Application {
                            "%d contacts deleted",
                            contact_list.size).printf (contact_list.size);
 
-    var b = new Button.from_stock (Stock.UNDO);
+    var b = new Button.with_mnemonic (_("_Undo"));
     g.add (new Label (msg));
     g.add (b);
 
@@ -549,7 +549,7 @@ public class Contacts.App : Gtk.Application {
     var label = new Label (_("Contact deleted: \"%s\"").printf (contact.display_name));
     label.set_max_width_chars (45);
     label.set_ellipsize (Pango.EllipsizeMode.END);
-    var b = new Button.from_stock (Stock.UNDO);
+    var b = new Button.with_mnemonic (_("_Undo"));
     g.add (label);
     g.add (b);
 
@@ -594,7 +594,7 @@ public class Contacts.App : Gtk.Application {
     else
       msg = _("%s linked to the contact").printf (linked_contact);
 
-    var b = new Button.from_stock (Stock.UNDO);
+    var b = new Button.with_mnemonic (_("_Undo"));
     g.add (new Label (msg));
     g.add (b);
 
diff --git a/src/contacts-avatar-dialog.vala b/src/contacts-avatar-dialog.vala
index 8c39e78..70620a4 100644
--- a/src/contacts-avatar-dialog.vala
+++ b/src/contacts-avatar-dialog.vala
@@ -171,7 +171,7 @@ public class Contacts.AvatarDialog : Dialog {
       if (pixbuf != null)
        preview.set_from_pixbuf (pixbuf);
       else
-       preview.set_from_stock (Stock.DIALOG_QUESTION,
+       preview.set_from_stock ("dialog-question",
                                IconSize.DIALOG);
     }
 
@@ -197,8 +197,8 @@ public class Contacts.AvatarDialog : Dialog {
     var chooser = new FileChooserDialog (_("Browse for more pictures"),
                                         (Gtk.Window)this.get_toplevel (),
                                         FileChooserAction.OPEN,
-                                        Stock.CANCEL, ResponseType.CANCEL,
-                                        Stock.OPEN, ResponseType.ACCEPT);
+                                        _("_Cancel"), ResponseType.CANCEL,
+                                        _("_Open"), ResponseType.ACCEPT);
     chooser.set_modal (true);
     chooser.set_local_only (false);
     var preview = new Image ();
diff --git a/src/contacts-new-contact-dialog.vala b/src/contacts-new-contact-dialog.vala
index 80750e0..db604ab 100644
--- a/src/contacts-new-contact-dialog.vala
+++ b/src/contacts-new-contact-dialog.vala
@@ -47,7 +47,7 @@ public class Contacts.NewContactDialog : Dialog {
     set_destroy_with_parent (true);
     set_transient_for (parent);
 
-    add_buttons (Stock.CANCEL, ResponseType.CANCEL,
+    add_buttons (_("_Cancel"), ResponseType.CANCEL,
                 _("Create Contact"), ResponseType.OK);
 
     set_default_response (ResponseType.OK);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]