[orca] Remove deprecated stock items



commit 638ebc4a11e6d0a887cdb7557b884a628f453c00
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Jul 8 05:44:48 2013 -0400

    Remove deprecated stock items
    
    As a nice side effect, this will fix the problem of stock items not
    getting displayed in the correct language when profile-based language
    switching is used.

 src/orca/guilabels.py            |    9 +++++++++
 src/orca/orca-find.ui            |   15 ++++-----------
 src/orca/orca-setup.ui           |   20 ++++++++++----------
 src/orca/orca_gui_commandlist.py |    5 +++--
 src/orca/orca_gui_navlist.py     |    4 ++--
 5 files changed, 28 insertions(+), 25 deletions(-)
---
diff --git a/src/orca/guilabels.py b/src/orca/guilabels.py
index c0af0a5..fcfbe96 100644
--- a/src/orca/guilabels.py
+++ b/src/orca/guilabels.py
@@ -57,6 +57,15 @@ BRAILLE_DOT_8 = _("Dot _8")
 # "marking"/indicating that a given word is bold.
 BRAILLE_DOT_7_8 = _("Dots 7 an_d 8")
 
+# Translators: This is the label for a button in a dialog.
+BTN_CANCEL = _("_Cancel")
+
+# Translators: This is the label for a button in a dialog.
+BTN_JUMP_TO = _("_Jump to")
+
+# Translators: This is the label for a button in a dialog.
+BTN_OK = _("_OK")
+
 # Translators: Orca has had to implement its own caret navigation model to work
 # around issues in Gecko/Firefox. In some versions of Firefox, we must perform
 # a focus grab on each object being navigated in order for things to work as
diff --git a/src/orca/orca-find.ui b/src/orca/orca-find.ui
index 2fba961..7b2c666 100644
--- a/src/orca/orca-find.ui
+++ b/src/orca/orca-find.ui
@@ -26,20 +26,14 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="closeButton">
-                <property name="label">gtk-close</property>
+                <property name="label" translatable="yes" comments="Translators: This is the label for a 
button in a dialog.">_Close</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-                <accelerator key="c" signal="activate" modifiers="GDK_MOD1_MASK"/>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="closeButton-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Close</property>
-                  </object>
-                </child>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="closeButtonClicked" swapped="no"/>
               </object>
               <packing>
@@ -50,7 +44,7 @@
             </child>
             <child>
               <object class="GtkButton" id="findButton">
-                <property name="label">gtk-find</property>
+                <property name="label" translatable="yes" comments="Translators: This is the label for a 
button in a dialog.">_Find</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
@@ -59,8 +53,7 @@
                 <property name="has_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-                <accelerator key="f" signal="activate" modifiers="GDK_MOD1_MASK"/>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="findButtonClicked" swapped="no"/>
               </object>
               <packing>
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 3f1ee44..762ee4b 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -207,14 +207,14 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="helpButton">
-                <property name="label">gtk-help</property>
+                <property name="label" translatable="yes" comments="Translators: This is the label for a 
button in a dialog.">_Help</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="helpButtonClicked" swapped="no"/>
               </object>
               <packing>
@@ -225,14 +225,14 @@
             </child>
             <child>
               <object class="GtkButton" id="applyButton">
-                <property name="label">gtk-apply</property>
+                <property name="label" translatable="yes" comments="Translators: This is the label for a 
button in a dialog.">_Apply</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="applyButtonClicked" swapped="no"/>
               </object>
               <packing>
@@ -243,14 +243,14 @@
             </child>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" comments="Translators: This is the label for a 
button in a dialog.">_Cancel</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="cancelButtonClicked" swapped="no"/>
               </object>
               <packing>
@@ -261,14 +261,14 @@
             </child>
             <child>
               <object class="GtkButton" id="okButton">
-                <property name="label">gtk-ok</property>
+                <property name="label" translatable="yes" comments="Translators: This is the label for a 
button in a dialog.">_OK</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="okButtonClicked" swapped="no"/>
               </object>
               <packing>
@@ -487,13 +487,13 @@
                             </child>
                             <child>
                               <object class="GtkButton" id="saveProfileButton">
-                                <property name="label">gtk-save-as</property>
+                                <property name="label" translatable="yes" comments="Translators: This is the 
label for a button in a dialog.">Save _As</property>
                                 <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
                                 <property name="use_action_appearance">False</property>
-                                <property name="use_stock">True</property>
+                                <property name="use_underline">True</property>
                                 <signal name="clicked" handler="showProfileGUI" swapped="no"/>
                               </object>
                               <packing>
diff --git a/src/orca/orca_gui_commandlist.py b/src/orca/orca_gui_commandlist.py
index bbc564c..0099aed 100644
--- a/src/orca/orca_gui_commandlist.py
+++ b/src/orca/orca_gui_commandlist.py
@@ -28,6 +28,7 @@ __copyright__ = "Copyright (c) 2013 Igalia, S.L."
 __license__   = "LGPL"
 
 from gi.repository import GObject, Gdk, Gtk
+from . import guilabels
 from . import orca_state
 
 class OrcaCommandListGUI:
@@ -77,10 +78,10 @@ class OrcaCommandListGUI:
         column = self._tree.get_column(0)
         column.set_visible(False)
 
-        btn = dialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
+        btn = dialog.add_button(guilabels.BTN_CANCEL, Gtk.ResponseType.CANCEL)
         btn.connect('clicked', self._onCancelClicked)
 
-        self._okButton = dialog.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
+        self._okButton = dialog.add_button(guilabels.BTN_OK, Gtk.ResponseType.OK)
         self._okButton.grab_default()
         self._okButton.connect('clicked', self._onOKClicked)
 
diff --git a/src/orca/orca_gui_navlist.py b/src/orca/orca_gui_navlist.py
index 5899687..6ccab0b 100644
--- a/src/orca/orca_gui_navlist.py
+++ b/src/orca/orca_gui_navlist.py
@@ -83,10 +83,10 @@ class OrcaNavListGUI:
         selection = self._tree.get_selection()
         selection.select_path(selectedRow)
 
-        btn = dialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
+        btn = dialog.add_button(guilabels.BTN_CANCEL, Gtk.ResponseType.CANCEL)
         btn.connect('clicked', self._onCancelClicked)
 
-        btn = dialog.add_button(Gtk.STOCK_JUMP_TO, Gtk.ResponseType.APPLY)
+        btn = dialog.add_button(guilabels.BTN_JUMP_TO, Gtk.ResponseType.APPLY)
         btn.grab_default()
         btn.connect('clicked', self._onJumpToClicked)
 


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