[RHEL 7.2 - PATCH 2/5] Ellipsize comboboxes (#1212615)

Robert Marshall rmarshall at redhat.com
Mon Jul 6 15:27:01 UTC 2015


From: David Shea <dshea at redhat.com>

Cherry pick from David Shea's work for #1170275 as it appears
on master in commit b4ef2f17c864987571ed1dad10724ccc6afa5aff.

This way super-long container types (LVM Thin Provisioning, translations
of LVM Thin Provisioning), RAID descriptions and container names won't
blow out the window size. For container names, ellipsize in the middle
instead of the end so that supercrazylongcontainername-data01 is easily
distinguishable from supercrazylongcontainername-data02. In all cases
the full string is visible when the ComboBox is expanded.

Resolves: rhbz#1212615
---
 pyanaconda/ui/gui/spokes/custom.glade | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index 14371f3..fb326c7 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -108,9 +108,6 @@
                 <property name="margin_left">6</property>
                 <property name="margin_right">6</property>
                 <property name="margin_top">6</property>
-                <child>
-                  <placeholder/>
-                </child>
               </object>
             </child>
           </object>
@@ -645,7 +642,9 @@
                                                         <signal name="changed" handler="on_device_type_changed" swapped="no"/>
                                                         <signal name="changed" handler="on_value_changed" swapped="no"/>
                                                         <child>
-                                                          <object class="GtkCellRendererText" id="deviceTypeRenderer"/>
+                                                          <object class="GtkCellRendererText" id="deviceTypeRenderer">
+                                                            <property name="ellipsize">end</property>
+                                                          </object>
                                                           <attributes>
                                                             <attribute name="text">0</attribute>
                                                           </attributes>
@@ -816,7 +815,9 @@
                                                         <property name="model">containerStore</property>
                                                         <signal name="changed" handler="on_container_changed" swapped="no"/>
                                                         <child>
-                                                          <object class="GtkCellRendererText" id="descRenderer"/>
+                                                          <object class="GtkCellRendererText" id="descRenderer">
+                                                            <property name="ellipsize">middle</property>
+                                                          </object>
                                                           <attributes>
                                                             <attribute name="text">0</attribute>
                                                           </attributes>
@@ -899,7 +900,9 @@
                                                     <property name="model">raidStoreFiltered</property>
                                                     <signal name="changed" handler="on_value_changed" swapped="no"/>
                                                     <child>
-                                                      <object class="GtkCellRendererText" id="raidLevelRenderer"/>
+                                                      <object class="GtkCellRendererText" id="raidLevelRenderer">
+                                                        <property name="ellipsize">end</property>
+                                                      </object>
                                                       <attributes>
                                                         <attribute name="markup">0</attribute>
                                                       </attributes>
-- 
2.4.3


More information about the anaconda-patches mailing list