[master 2/2] Ellipsize comboboxes (#1170275)

David Shea dshea at redhat.com
Thu Dec 18 20:05:13 UTC 2014


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.
---
 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 082f0ce..8f2182e 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>
@@ -661,7 +658,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>
@@ -833,7 +832,9 @@
                                                         <signal name="changed" handler="on_container_changed" swapped="no"/>
                                                         <signal name="changed" handler="on_value_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>
@@ -916,7 +917,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.1.0



More information about the anaconda-patches mailing list