[network-manager-applet] libnm-gtk: set max-width-chars on WWAN wizard labels to prevent wide dialogs



commit f35b9267d1309d2b69c946457a158c2379dd0e39
Author: Dan Williams <dcbw redhat com>
Date:   Tue May 6 21:33:55 2014 -0500

    libnm-gtk: set max-width-chars on WWAN wizard labels to prevent wide dialogs
    
    GTK+ 3.10 and lower capped labels with wrapping set, but without
    max-width-chars set, from taking up the entire screen width.  GTK+
    git master no longer does that, so some of our labels never wrap
    and the dialogs look ugly.
    
    GTK+ 3.10 hack:
    https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-10&id=2436627eb4644234a9e577538ec334d224e3d2be

 src/libnm-gtk/nm-mobile-wizard.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libnm-gtk/nm-mobile-wizard.c b/src/libnm-gtk/nm-mobile-wizard.c
index f99be0e..d552ff1 100644
--- a/src/libnm-gtk/nm-mobile-wizard.c
+++ b/src/libnm-gtk/nm-mobile-wizard.c
@@ -256,6 +256,7 @@ confirm_setup (NMAMobileWizard *self)
                gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
                gtk_misc_set_padding (GTK_MISC (label), 0, 6);
                gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+               gtk_label_set_max_width_chars (GTK_LABEL (label), 60);
                gtk_container_add (GTK_CONTAINER (alignment), label);
                gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 6);
        }
@@ -505,6 +506,7 @@ plan_setup (NMAMobileWizard *self)
        label = gtk_label_new (_("Warning: Selecting an incorrect plan may result in billing issues for your 
broadband account or may prevent connectivity.\n\nIf you are unsure of your plan please ask your provider for 
your plan's APN."));
        gtk_widget_set_size_request (label, 500, -1);
        gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+       gtk_label_set_max_width_chars (GTK_LABEL (label), 60);
        gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
@@ -1358,6 +1360,7 @@ intro_setup (NMAMobileWizard *self)
        label = gtk_label_new (_("This assistant helps you easily set up a mobile broadband connection to a 
cellular (3G) network."));
        gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
        gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+       gtk_label_set_max_width_chars (GTK_LABEL (label), 60);
        gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 6);
 
        label = gtk_label_new (_("You will need the following information:"));


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