[PATCH 1/5] Remove stock labels and icons.

David Shea dshea at redhat.com
Tue Mar 25 17:52:32 UTC 2014


Stock labels are deprecated now. This is actually good, because the
stock labels defined keyboard accelerators that are opaque to us, which
is bad.

Diverged from Gtk's migration advice in the cases of gtk-yes and gtk-no,
since there was no advice, and with gtk-find and gtk-clear, since they
said to just switch to a named icon which is dumb.
---
 pyanaconda/ui/gui/main.glade                       | 10 +++----
 pyanaconda/ui/gui/spokes/advanced_user.glade       |  8 +++---
 pyanaconda/ui/gui/spokes/advstorage/fcoe.glade     |  8 +++---
 pyanaconda/ui/gui/spokes/advstorage/iscsi.glade    | 12 ++++----
 pyanaconda/ui/gui/spokes/datetime_spoke.glade      | 12 ++++----
 pyanaconda/ui/gui/spokes/datetime_spoke.py         |  6 ++--
 pyanaconda/ui/gui/spokes/filter.glade              | 32 +++++++++++-----------
 pyanaconda/ui/gui/spokes/keyboard.glade            | 26 +++++++++---------
 .../ui/gui/spokes/lib/custom_storage_helpers.glade |  9 +++---
 pyanaconda/ui/gui/spokes/lib/passphrase.glade      |  8 +++---
 pyanaconda/ui/gui/spokes/lib/passphrase.py         | 14 +++++-----
 pyanaconda/ui/gui/spokes/lib/refresh.glade         | 12 ++++----
 pyanaconda/ui/gui/spokes/lib/resize.glade          |  8 +++---
 pyanaconda/ui/gui/spokes/network.glade             | 28 +++++++++----------
 pyanaconda/ui/gui/spokes/source.glade              |  8 +++---
 tests/glade/accelerators/check_accelerators.py     |  4 +--
 16 files changed, 101 insertions(+), 104 deletions(-)

diff --git a/pyanaconda/ui/gui/main.glade b/pyanaconda/ui/gui/main.glade
index bd20df6..e15f9d9 100644
--- a/pyanaconda/ui/gui/main.glade
+++ b/pyanaconda/ui/gui/main.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:46:10 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkTextBuffer" id="errorTextBuffer"/>
   <object class="GtkDialog" id="errorDialog">
     <property name="width_request">450</property>
@@ -83,12 +83,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-no</property>
+                <property name="label" translatable="yes" context="GUI|Main">_No</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -98,12 +97,11 @@
             </child>
             <child>
               <object class="GtkButton" id="quitButton">
-                <property name="label">gtk-yes</property>
+                <property name="label" translatable="yes" context="GUI|Main">_Yes</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/advanced_user.glade b/pyanaconda/ui/gui/spokes/advanced_user.glade
index 8dc1d31..df40502 100644
--- a/pyanaconda/ui/gui/spokes/advanced_user.glade
+++ b/pyanaconda/ui/gui/spokes/advanced_user.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Tue Jan  7 16:14:53 2014 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkAdjustment" id="gid">
     <property name="lower">1000</property>
     <property name="value">1000</property>
@@ -30,11 +30,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Advanced User">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/advstorage/fcoe.glade b/pyanaconda/ui/gui/spokes/advstorage/fcoe.glade
index 2300c5e..38d58f1 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/fcoe.glade
+++ b/pyanaconda/ui/gui/spokes/advstorage/fcoe.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:47:34 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="fcoeDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -20,11 +20,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Advanced Storage|FCoE">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
index ee5883d..918a65e 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
+++ b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:47:41 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkListStore" id="nodeStore">
     <columns>
       <!-- column-name nodeSelected -->
@@ -34,11 +34,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Advanced Storage|iSCSI|Configure">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -48,12 +48,12 @@
             </child>
             <child>
               <object class="GtkButton" id="okButton">
-                <property name="label">gtk-ok</property>
+                <property name="label" translatable="yes" context="GUI|Advanced Storage|iSCSI|Configure">_OK</property>
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.glade b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
index 413f92c..86c23d5 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.glade
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:57:29 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.2 -->
+  <requires lib="gtk+" version="3.2"/>
   <!-- interface-requires TimezoneMap 0.4 -->
   <!-- interface-requires AnacondaWidgets 1.0 -->
   <object class="GtkImage" id="addImage">
@@ -804,11 +804,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Date and Time|NTP">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -818,11 +818,11 @@
             </child>
             <child>
               <object class="GtkButton" id="okButton">
-                <property name="label">gtk-ok</property>
+                <property name="label" translatable="yes" context="GUI|Date and Time|NTP">_OK</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index f1afb10..699a7b9 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -148,11 +148,11 @@ class NTPconfigDialog(GUIObject):
         value = model[itr][1]
 
         if value == SERVER_QUERY:
-            renderer.set_property("stock-id", "gtk-dialog-question")
+            renderer.set_property("icon-name", "gtk-dialog-question")
         elif value == SERVER_OK:
-            renderer.set_property("stock-id", "gtk-yes")
+            renderer.set_property("icon-name", "gtk-yes")
         else:
-            renderer.set_property("stock-id", "gtk-no")
+            renderer.set_property("icon-name", "gtk-no")
 
     def initialize(self):
         self.window.set_size_request(500, 400)
diff --git a/pyanaconda/ui/gui/spokes/filter.glade b/pyanaconda/ui/gui/spokes/filter.glade
index 6c3fbc7..cd6022d 100644
--- a/pyanaconda/ui/gui/spokes/filter.glade
+++ b/pyanaconda/ui/gui/spokes/filter.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:57:44 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <!-- interface-requires AnacondaWidgets 1.0 -->
   <object class="GtkListStore" id="diskStore">
     <columns>
@@ -485,11 +485,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="searchClearButton">
-                                    <property name="label">gtk-clear</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|Search">_Clear</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                     <signal name="clicked" handler="on_clear_clicked" swapped="no"/>
                                   </object>
                                   <packing>
@@ -501,11 +501,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="searchFindButton">
-                                    <property name="label">gtk-find</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|Search">_Find</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                     <signal name="clicked" handler="on_find_clicked" swapped="no"/>
                                   </object>
                                   <packing>
@@ -834,11 +834,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="multipathClearButton">
-                                    <property name="label">gtk-clear</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|Multipath">_Clear</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                     <signal name="clicked" handler="on_clear_clicked" swapped="no"/>
                                   </object>
                                   <packing>
@@ -850,11 +850,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="multipathFindButton">
-                                    <property name="label">gtk-find</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|Multipath">_Find</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                     <signal name="clicked" handler="on_find_clicked" swapped="no"/>
                                   </object>
                                   <packing>
@@ -1175,11 +1175,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="otherClearButton">
-                                    <property name="label">gtk-clear</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|Other">_Clear</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                     <signal name="clicked" handler="on_clear_clicked" swapped="no"/>
                                   </object>
                                   <packing>
@@ -1191,11 +1191,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="otherFindButton">
-                                    <property name="label">gtk-find</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|Other">_Find</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                     <signal name="clicked" handler="on_find_clicked" swapped="no"/>
                                   </object>
                                   <packing>
@@ -1315,11 +1315,11 @@
                                 </child>
                                 <child>
                                   <object class="GtkButton" id="zClearButton">
-                                    <property name="label">gtk-clear</property>
+                                    <property name="label" translatable="yes" context="GUI|Installation Destination|Filter|zSeries">_Clear</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
+                                    <property name="use_underline">True</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">5</property>
diff --git a/pyanaconda/ui/gui/spokes/keyboard.glade b/pyanaconda/ui/gui/spokes/keyboard.glade
index ac9f06e..c715b06 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.glade
+++ b/pyanaconda/ui/gui/spokes/keyboard.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:58:06 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.2 -->
+  <requires lib="gtk+" version="3.2"/>
   <!-- interface-requires AnacondaWidgets 1.0 -->
   <object class="GtkListStore" id="addedLayoutStore">
     <columns>
@@ -49,11 +49,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Keyboard Layout|Add Layout">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -63,11 +63,11 @@
             </child>
             <child>
               <object class="GtkButton" id="confirmAddButton">
-                <property name="label">gtk-add</property>
+                <property name="label" translatable="yes" context="GUI|Keyboard Layout|Add Layout">_Add</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="on_confirm_add_clicked" swapped="no"/>
               </object>
               <packing>
@@ -364,9 +364,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="toolbar_style">icons</property>
-                            <style>
-                              <class name="inline-toolbar"/>
-                            </style>
                             <property name="icon_size">1</property>
                             <child>
                               <object class="GtkToolButton" id="addLayoutButton">
@@ -444,6 +441,9 @@
                                 <property name="homogeneous">True</property>
                               </packing>
                             </child>
+                            <style>
+                              <class name="inline-toolbar"/>
+                            </style>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -585,11 +585,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button2">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Keyboard Layout|Switching Options">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -599,11 +599,11 @@
             </child>
             <child>
               <object class="GtkButton" id="button1">
-                <property name="label">gtk-ok</property>
+                <property name="label" translatable="yes" context="GUI|Keyboard Layout|Switching Options">_OK</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
index d05d4be..ecec01e 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:51:34 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.2 -->
-  <!-- interface-requires AnacondaWidgets 1.0 -->
+  <requires lib="gtk+" version="3.2"/>
   <object class="GtkEntryBuffer" id="mountPointEntryBuffer"/>
   <object class="GtkListStore" id="mountPointStore">
     <columns>
@@ -980,11 +979,11 @@ use.  Try something else?</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="help_close_button">
-                <property name="label">gtk-close</property>
+                <property name="label" translatable="yes" context="GUI|Custom Partitioning|Help">_Close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <signal name="clicked" handler="on_close" swapped="no"/>
               </object>
               <packing>
diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.glade b/pyanaconda/ui/gui/spokes/lib/passphrase.glade
index 05cf2ad..35cbf44 100644
--- a/pyanaconda/ui/gui/spokes/lib/passphrase.glade
+++ b/pyanaconda/ui/gui/spokes/lib/passphrase.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:48:44 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <!-- interface-requires AnacondaWidgets 1.0 -->
   <object class="GtkDialog" id="passphrase_dialog">
     <property name="can_focus">False</property>
@@ -36,12 +36,12 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="passphrase_cancel_button">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Passphrase Dialog">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="halign">end</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py
index dcd61c5..734d02b 100644
--- a/pyanaconda/ui/gui/spokes/lib/passphrase.py
+++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py
@@ -59,7 +59,7 @@ class PassphraseDialog(GUIObject):
         # disable input methods for the passphrase Entry widgets and make sure
         # the focus change mask is enabled
         self._passphrase_entry.set_property("im-module", "")
-        self._passphrase_entry.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, "")
+        self._passphrase_entry.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, None)
         self._passphrase_entry.add_events(Gdk.EventMask.FOCUS_CHANGE_MASK)
         self._confirm_entry.set_property("im-module", "")
         self._confirm_entry.add_events(Gdk.EventMask.FOCUS_CHANGE_MASK)
@@ -126,20 +126,20 @@ class PassphraseDialog(GUIObject):
         self._strength_label.set_text(text)
 
     def _set_entry_icon(self, entry, icon, msg):
-        entry.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, icon)
+        entry.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, icon)
         entry.set_icon_tooltip_text(Gtk.EntryIconPosition.SECONDARY, msg)
 
     def on_passphrase_changed(self, entry):
         self._update_passphrase_strength()
         passphrase = entry.get_text()
         if passphrase and passphrase == self._confirm_entry.get_text():
-            self._set_entry_icon(self._confirm_entry, "", "")
+            self._set_entry_icon(self._confirm_entry, None, "")
             self._save_button.set_sensitive(True)
         else:
             self._save_button.set_sensitive(False)
 
         if not self._pwq_error:
-            self._set_entry_icon(entry, "", "")
+            self._set_entry_icon(entry, None, "")
 
         can_override_icon = entry.get_icon_name(Gtk.EntryIconPosition.SECONDARY)\
                             in ["gtk-dialog-warning", "", None]
@@ -149,7 +149,7 @@ class PassphraseDialog(GUIObject):
                 self._set_entry_icon(entry, "gtk-dialog-warning",
                                      _("contains non-ASCII characters"))
             else:
-                self._set_entry_icon(entry, "", "")
+                self._set_entry_icon(entry, None, "")
 
     def on_passphrase_editing_done(self, entry, *args):
         if self._pwq_error:
@@ -159,7 +159,7 @@ class PassphraseDialog(GUIObject):
 
     def on_confirm_changed(self, entry):
         if entry.get_text() and entry.get_text() == self._passphrase_entry.get_text():
-            self._set_entry_icon(entry, "", "")
+            self._set_entry_icon(entry, None, "")
             self._save_button.set_sensitive(True)
         else:
             self._save_button.set_sensitive(False)
@@ -173,7 +173,7 @@ class PassphraseDialog(GUIObject):
             self._set_entry_icon(entry, icon, _(msg))
             self._save_button.set_sensitive(False)
         else:
-            self._set_entry_icon(entry, "", "")
+            self._set_entry_icon(entry, None, "")
 
     def on_save_clicked(self, button):
         self.passphrase = self._passphrase_entry.get_text()
diff --git a/pyanaconda/ui/gui/spokes/lib/refresh.glade b/pyanaconda/ui/gui/spokes/lib/refresh.glade
index 62f14d1..a097194 100644
--- a/pyanaconda/ui/gui/spokes/lib/refresh.glade
+++ b/pyanaconda/ui/gui/spokes/lib/refresh.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:48:52 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="refreshDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -22,11 +22,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="refreshCancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Refresh Dialog|Rescan">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -36,12 +36,12 @@
             </child>
             <child>
               <object class="GtkButton" id="refreshOKButton">
-                <property name="label">gtk-ok</property>
+                <property name="label" translatable="yes" context="GUI|Refresh Dialog|Rescan">_OK</property>
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index df3fdb5..147f22e 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Wed Jan 22 15:54:55 2014 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkTreeStore" id="diskStore">
     <columns>
       <!-- column-name diskID -->
@@ -52,11 +52,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Reclaim Dialog">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
index 94b29d7..e555995 100644
--- a/pyanaconda/ui/gui/spokes/network.glade
+++ b/pyanaconda/ui/gui/spokes/network.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:58:35 2013 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <!-- interface-requires AnacondaWidgets 1.0 -->
   <object class="GtkListStore" id="liststore_add_device">
     <columns>
@@ -42,11 +42,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button_add_device_cancel">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Network|Add Device Dialog">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -56,11 +56,11 @@
             </child>
             <child>
               <object class="GtkButton" id="button_add_device_create">
-                <property name="label">gtk-add</property>
+                <property name="label" translatable="yes" context="GUI|Network|Add Device Dialog">_Add</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -331,9 +331,6 @@ updates available for you.</property>
                                     <property name="can_focus">False</property>
                                     <property name="toolbar_style">icons</property>
                                     <property name="show_arrow">False</property>
-                                    <style>
-                                      <class name="inline-toolbar"/>
-                                    </style>
                                     <property name="icon_size">1</property>
                                     <child>
                                       <object class="GtkToolButton" id="add_toolbutton">
@@ -363,6 +360,9 @@ updates available for you.</property>
                                         <property name="homogeneous">True</property>
                                       </packing>
                                     </child>
+                                    <style>
+                                      <class name="inline-toolbar"/>
+                                    </style>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
@@ -810,8 +810,8 @@ updates available for you.</property>
                                             <property name="label" translatable="yes" context="GUI|Network|Wired">C_onfigure...</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
                                             <property name="tooltip_text" translatable="yes">To apply the configuration immediately turn the device off and on.</property>
-                                            <property name="receives_default">True</property>
                                             <property name="halign">end</property>
                                             <property name="valign">end</property>
                                             <property name="hexpand">True</property>
@@ -2506,11 +2506,11 @@ updates available for you.</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button1">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Network|Authentication Dialog">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
                 <property name="image_position">right</property>
               </object>
               <packing>
@@ -2521,11 +2521,11 @@ updates available for you.</property>
             </child>
             <child>
               <object class="GtkButton" id="connect_button">
-                <property name="label">gtk-connect</property>
+                <property name="label" translatable="yes" context="GUI|Network|Authentication Dialog">C_onnect</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 033f06c..b5862b8 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -26,11 +26,11 @@
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="cancelChooserButton">
-                <property name="label">gtk-cancel</property>
+                <property name="label" translatable="yes" context="GUI|Software Source|ISO Chooser Dialog">_Cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -40,11 +40,11 @@
             </child>
             <child>
               <object class="GtkButton" id="openChooserButton">
-                <property name="label">gtk-open</property>
+                <property name="label" translatable="yes" context="GUI|Software Source|ISO Chooser Dialog">_Open</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/tests/glade/accelerators/check_accelerators.py b/tests/glade/accelerators/check_accelerators.py
index bba4b1f..75f478a 100755
--- a/tests/glade/accelerators/check_accelerators.py
+++ b/tests/glade/accelerators/check_accelerators.py
@@ -148,12 +148,12 @@ def process_object(glade_filename, interface_object, po_map):
     accels = [{}]
 
     # Add everything that isn't a child of a GtkNotebook
-    for label in interface_object.xpath(".//property[@name='label' and ../property[@name='use_underline']/text() = 'True' and not(ancestor::object[@class='GtkNotebook']) and not(../property[@name='use_stock']/text() = 'True')]"):
+    for label in interface_object.xpath(".//property[@name='label' and ../property[@name='use_underline']/text() = 'True' and not(ancestor::object[@class='GtkNotebook'])]"):
         add_check_accel(glade_filename, accels[0], label, po_map)
 
     # For each GtkNotebook tab that is not a child of another notebook,
     # add the tab to the top-level context
-    for notebook_label in interface_object.xpath(".//object[@class='GtkNotebook' and not(ancestor::object[@class='GtkNotebook'])]/child[@type='tab']//property[@name='label' and ../property[@name='use_underline']/text() = 'True' and not(../property[@name='use_stock']/text() = 'True')]"):
+    for notebook_label in interface_object.xpath(".//object[@class='GtkNotebook' and not(ancestor::object[@class='GtkNotebook'])]/child[@type='tab']//property[@name='label' and ../property[@name='use_underline']/text() = 'True']"):
         add_check_accel(glade_filename, accels[0], notebook_label, po_map)
 
     # Now process each non-tab object in each Gtknotebook that is not a child
-- 
1.9.0



More information about the anaconda-patches mailing list