[network-manager-applet/jk/editor-vlan: 1/3] editor: add MVRP flag to VLAN editor page



commit 2664c48001c1fc39b3f615113d959d0276f88412
Author: Jiří Klimeš <jklimes redhat com>
Date:   Tue Dec 15 10:40:54 2015 +0100

    editor: add MVRP flag to VLAN editor page
    
    It has been added to daemon by
    
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=689de5c94ad64a6461fbc24823a9bf31aa9e8442

 src/connection-editor/ce-page-vlan.ui |   15 +++++++++++++++
 src/connection-editor/page-vlan.c     |    7 ++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/ce-page-vlan.ui b/src/connection-editor/ce-page-vlan.ui
index 9542716..d40d058 100644
--- a/src/connection-editor/ce-page-vlan.ui
+++ b/src/connection-editor/ce-page-vlan.ui
@@ -263,6 +263,21 @@
             <property name="top_attach">0</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkCheckButton" id="mvrp_flag">
+            <property name="label" translatable="yes">M_VRP</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+            <property name="use_underline">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
       </object>
       <packing>
         <property name="left_attach">1</property>
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index ea2891c..4485022 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -57,7 +57,7 @@ typedef struct {
        GtkEntry *name_entry;
        GtkEntry *cloned_mac;
        GtkSpinButton *mtu;
-       GtkToggleButton *flag_reorder_hdr, *flag_gvrp, *flag_loose_binding;
+       GtkToggleButton *flag_reorder_hdr, *flag_gvrp, *flag_loose_binding, *flag_mvrp;
 
        char *last_parent;
        int last_id;
@@ -92,6 +92,7 @@ vlan_private_init (CEPageVlan *self)
        priv->flag_reorder_hdr = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "reorder_hdr_flag"));
        priv->flag_gvrp = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "gvrp_flag"));
        priv->flag_loose_binding = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "loose_binding_flag"));
+       priv->flag_mvrp = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "mvrp_flag"));
 
        priv->toplevel = GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (priv->mtu),
                                                              GTK_TYPE_WINDOW));
@@ -557,6 +558,8 @@ populate_ui (CEPageVlan *self)
                gtk_toggle_button_set_active (priv->flag_gvrp, TRUE);
        if (flags & NM_VLAN_FLAG_LOOSE_BINDING)
                gtk_toggle_button_set_active (priv->flag_loose_binding, TRUE);
+       if (flags & NM_VLAN_FLAG_MVRP)
+               gtk_toggle_button_set_active (priv->flag_mvrp, TRUE);
 
        g_slist_free (devices);
 }
@@ -680,6 +683,8 @@ ui_to_setting (CEPageVlan *self)
                flags |= NM_VLAN_FLAG_GVRP;
        if (gtk_toggle_button_get_active (priv->flag_loose_binding))
                flags |= NM_VLAN_FLAG_LOOSE_BINDING;
+       if (gtk_toggle_button_get_active (priv->flag_mvrp))
+               flags |= NM_VLAN_FLAG_MVRP;
 
        g_object_set (s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, *iface ? iface : NULL, NULL);
        g_object_set (priv->setting,


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