[network-manager-applet/lr/ui-improvements: 12/20] editor: add the WirelessSecurity to a size group



commit 8c4d15eaf843902f14bff4dbfb05e0a46b38ea0e
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Jun 26 18:27:19 2017 +0200

    editor: add the WirelessSecurity to a size group
    
    Otherwise the labels are messy.

 src/connection-editor/page-8021x-security.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/connection-editor/page-8021x-security.c b/src/connection-editor/page-8021x-security.c
index 643600e..0348f9c 100644
--- a/src/connection-editor/page-8021x-security.c
+++ b/src/connection-editor/page-8021x-security.c
@@ -37,6 +37,7 @@ typedef struct {
        GtkToggleButton *enabled;
        GtkWidget *security_widget;
        WirelessSecurity *security;
+       GtkSizeGroup *group;
 
        gboolean initial_have_8021x;
 } CEPage8021xSecurityPrivate;
@@ -76,6 +77,8 @@ finish_setup (CEPage8021xSecurity *self, gpointer unused, GError *error, gpointe
                return;
        }
 
+       wireless_security_add_to_size_group (priv->security, priv->group);
+
        wireless_security_set_changed_notify (priv->security, stuff_changed, self);
        priv->security_widget = wireless_security_get_widget (priv->security);
        parent_container = gtk_widget_get_parent (priv->security_widget);
@@ -128,6 +131,8 @@ ce_page_8021x_security_new (NMConnectionEditor *editor,
 
        priv->enabled = GTK_TOGGLE_BUTTON (gtk_check_button_new_with_mnemonic (_("Use 802.1_X security for 
this connection")));
 
+       priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+
        g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL);
 
        if (priv->initial_have_8021x)
@@ -223,6 +228,8 @@ dispose (GObject *object)
        CEPage *parent = CE_PAGE (object);
        CEPage8021xSecurityPrivate *priv = CE_PAGE_8021X_SECURITY_GET_PRIVATE (object);
 
+       g_clear_object (&priv->group);
+
        if (priv->security_widget) {
                gtk_container_remove (GTK_CONTAINER (parent->page), priv->security_widget);
                priv->security_widget = NULL;


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