[gnome-control-center] printers: Ellipsize long names and locations



commit d32408c051e5752594ac890d2cabc4f24fe45164
Author: Marek Kasik <mkasik redhat com>
Date:   Wed Feb 12 17:05:25 2014 +0100

    printers: Ellipsize long names and locations
    
    Ellipsize long names of printers and long location strings
    in the printers panel.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661667

 panels/printers/cc-printers-panel.c |    4 +++-
 panels/printers/printers.ui         |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index 9914f46..7fdd394 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -1376,7 +1376,9 @@ populate_printers_list (CcPrintersPanel *self)
 
 
   renderer = gtk_cell_renderer_text_new ();
-  g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, "width-chars", 18, NULL);
+  g_object_set (G_OBJECT (renderer),
+                "ellipsize", PANGO_ELLIPSIZE_MIDDLE,
+                "max-width-chars", 18, NULL);
   column = gtk_tree_view_column_new_with_attributes ("Printer", renderer,
                                                      "text", PRINTER_NAME_COLUMN, NULL);
   gtk_tree_view_column_set_cell_data_func (column, renderer, set_cell_sensitivity_func,
diff --git a/panels/printers/printers.ui b/panels/printers/printers.ui
index dc78f7a..ecb545f 100644
--- a/panels/printers/printers.ui
+++ b/panels/printers/printers.ui
@@ -150,6 +150,7 @@
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="text">---</property>
+                        <property name="ellipsize">PANGO_ELLIPSIZE_MIDDLE</property>
                         <accessibility>
                           <relation type="labelled-by" target="label10"/>
                         </accessibility>
@@ -273,6 +274,7 @@
                         <property name="text">Printer</property>
                         <property name="weight">700</property>
                         <property name="scale">1.2</property>
+                        <property name="ellipsize">PANGO_ELLIPSIZE_MIDDLE</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>


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