[PATCH] openvpn plugin: move cipher option to new tab in advanced dialog box



Hello,

here's my patch for the openvpn plugin, to move the cipher option to
a new tab named "security".  This tab is independent of the selected
"connection type".

The name of the "Certificates (TLS)" tab is changed to
"TLS authentication", because it handles just that.  This tab is moved
to the third position, to the right of the new "security" tab.

Patch is against NetworkManager-openvpn-0.7.0-16.svn4326.fc9.

	Robert
diff -u NetworkManager-openvpn-0.7.0/properties/auth-helpers.c.sec_tab NetworkManager-openvpn-0.7.0/properties/auth-helpers.c
--- NetworkManager-openvpn-0.7.0/properties/auth-helpers.c.sec_tab	2008-10-29 11:36:20.000000000 +0100
+++ NetworkManager-openvpn-0.7.0/properties/auth-helpers.c	2009-01-04 19:14:40.000000000 +0100
@@ -959,6 +959,10 @@
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	}
 
+	widget = glade_xml_get_widget (xml, "cipher_combo");
+	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_CIPHER);
+	populate_cipher_combo (GTK_COMBO_BOX (widget), value);
+
 	if (   !strcmp (contype, NM_OPENVPN_CONTYPE_TLS)
 	    || !strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)
 	    || !strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD)) {
@@ -966,10 +970,6 @@
 		GtkTreeIter iter;
 		int direction = -1, active = -1;
 
-		widget = glade_xml_get_widget (xml, "cipher_combo");
-		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_CIPHER);
-		populate_cipher_combo (GTK_COMBO_BOX (widget), value);
-
 		widget = glade_xml_get_widget (xml, "tls_auth_checkbutton");
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TA);
 		if (value && strlen (value))
@@ -1012,7 +1012,7 @@
 		}
 	} else {
 		widget = glade_xml_get_widget (xml, "options_notebook");
-		gtk_notebook_remove_page (GTK_NOTEBOOK (widget), 1);
+		gtk_notebook_remove_page (GTK_NOTEBOOK (widget), 2);
 	}
 
 out:
diff -u NetworkManager-openvpn-0.7.0/properties/nm-openvpn-dialog.glade.sec_tab NetworkManager-openvpn-0.7.0/properties/nm-openvpn-dialog.glade
--- NetworkManager-openvpn-0.7.0/properties/nm-openvpn-dialog.glade.sec_tab	2008-10-17 13:15:24.000000000 +0200
+++ NetworkManager-openvpn-0.7.0/properties/nm-openvpn-dialog.glade	2009-01-01 18:24:59.000000000 +0100
@@ -948,17 +948,56 @@
               </packing>
             </child>
             <child>
+              <widget class="GtkTable" id="table9">
+                <property name="visible">True</property>
+                <property name="n_rows">1</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <widget class="GtkComboBox" id="cipher_combo">
+                    <property name="visible">True</property>
+                    <property name="items" translatable="yes"> </property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label19">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Cipher:</property>
+                  </widget>
+                  <packing>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label21">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Security</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
               <widget class="GtkTable" id="table7">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
-                <property name="n_rows">3</property>
+                <property name="n_rows">2</property>
                 <property name="n_columns">2</property>
                 <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <widget class="GtkTable" id="table8">
                     <property name="visible">True</property>
                     <property name="n_rows">3</property>
@@ -1034,8 +1073,8 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                   </packing>
                 </child>
                 <child>
@@ -1049,44 +1088,23 @@
                   </widget>
                   <packing>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label19">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Cipher:</property>
-                  </widget>
-                  <packing>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="cipher_combo">
-                    <property name="visible">True</property>
-                    <property name="items" translatable="yes"> </property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options"></property>
+                    <property name="top_attach">0</property>
+                    <property name="bottom_attach">1</property>
                   </packing>
                 </child>
               </widget>
               <packing>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
               <widget class="GtkLabel" id="label18">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">Certificates (TLS)</property>
+                <property name="label" translatable="yes">TLS authentication</property>
               </widget>
               <packing>
                 <property name="type">tab</property>
-                <property name="position">1</property>
+                <property name="position">2</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>


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