[gnome-control-center/gnome-3-18] network: Elipsize device metadata fields



commit 99c2ddcf7cda3dd8ab8c7cef2e5118f1985ee71f
Author: Andrew Cowie <andrew operationaldynamics com>
Date:   Tue Dec 22 14:35:07 2015 +1100

    network: Elipsize device metadata fields
    
    Excessively long metadata fields cause the the control-center panel to
    blow out to wider than screen width. Probably the right thing is to
    limit the allocation to the device detail pane from somewhere up the
    stack, but for now, enable ellipsizing and set an max-width to
    constrain the width of things which are there just for information
    anyway; true values are available in the edit dialog.
    
    Closes #759766.
    
    Signed-off-by: Andrew Cowie <andrew operationaldynamics com>

 panels/network/panel-common.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/panel-common.c b/panels/network/panel-common.c
index 9e84c60..c4a521e 100644
--- a/panels/network/panel-common.c
+++ b/panels/network/panel-common.c
@@ -516,6 +516,8 @@ panel_set_device_widget_details (GtkBuilder *builder,
                 gtk_widget_show (heading);
                 gtk_widget_show (widget);
                 gtk_label_set_label (GTK_LABEL (widget), value);
+                gtk_label_set_max_width_chars (GTK_LABEL (widget), 50);
+                gtk_label_set_ellipsize (GTK_LABEL (widget), PANGO_ELLIPSIZE_END);
         }
         return TRUE;
 }


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