[master] Remove column titles from the software spoke.

David Shea dshea at redhat.com
Thu Oct 31 18:14:47 UTC 2013


The titles are never displayed, so there's no point in having them. For
the one part in the code where the title was used to determine which
column is selected, use its order in the TreeView instead.
---
 pyanaconda/ui/gui/spokes/software.glade | 4 ----
 pyanaconda/ui/gui/spokes/software.py    | 3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/software.glade b/pyanaconda/ui/gui/spokes/software.glade
index bacd565..7a9a717 100644
--- a/pyanaconda/ui/gui/spokes/software.glade
+++ b/pyanaconda/ui/gui/spokes/software.glade
@@ -146,7 +146,6 @@
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="addonSelectedCol">
-                                <property name="title">Selected</property>
                                 <signal name="clicked" handler="on_addon_toggled" swapped="no"/>
                                 <child>
                                   <object class="GtkCellRendererToggle" id="addonSelectedRenderer">
@@ -161,7 +160,6 @@
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="addonDescCol">
-                                <property name="title" translatable="yes">column</property>
                                 <property name="expand">True</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="addonDescRenderer">
@@ -212,7 +210,6 @@
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="environmentSelectedCol">
-                                <property name="title" translatable="yes">column</property>
                                 <child>
                                   <object class="GtkCellRendererToggle" id="environmentSelectedRenderer">
                                     <property name="yalign">0</property>
@@ -227,7 +224,6 @@
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="environmentDescCol">
-                                <property name="title" translatable="yes">column</property>
                                 <property name="expand">True</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="environmentDescRenderer">
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index affbee8..832a77b 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -440,7 +440,8 @@ class SoftwareSelectionSpoke(NormalSpoke):
         # handled separately from this signal handler.  Handling it again here will result in
         # the checkbox being toggled yet again.  So, we need to return in that case.
         col = view.get_cursor()[1]
-        if not col or col.get_title() == "Selected":
+        first_col = view.get_column(0)
+        if col == first_col:
             return
 
         # Always do something here, since addons can be toggled.
-- 
1.8.3.1



More information about the anaconda-patches mailing list