[network-manager-vpnc] ui: add "Version" GUI entry for vpnc 'Application version' option (rh #674143)
- From: JiÅÃ KlimeÅ <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc] ui: add "Version" GUI entry for vpnc 'Application version' option (rh #674143)
- Date: Tue, 17 Jul 2012 14:38:37 +0000 (UTC)
commit 383f3dc1d85c3b0cdab0e26bed92f2095743c751
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date: Thu Jul 12 16:41:38 2012 +0200
ui: add "Version" GUI entry for vpnc 'Application version' option (rh #674143)
properties/nm-vpnc-dialog.ui | 30 ++++++++++++++++++++++++++++++
properties/nm-vpnc.c | 17 +++++++++++++++++
2 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/properties/nm-vpnc-dialog.ui b/properties/nm-vpnc-dialog.ui
index 979b503..4421877 100644
--- a/properties/nm-vpnc-dialog.ui
+++ b/properties/nm-vpnc-dialog.ui
@@ -223,6 +223,36 @@ config: Vendor <cisco/netscreen></property>
<property name="bottom_attach">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Ve_rsion:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">application_version_entry</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="application_version_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="tooltip_text" translatable="yes">Application version to report.
+config: Application version <ASCII string></property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 98f8878..14d01cd 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -589,6 +589,17 @@ init_plugin_ui (VpncPluginUiWidget *self,
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? 0 : active);
g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
+ /* Application version */
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "application_version_entry"));
+ g_return_val_if_fail (widget != NULL, FALSE);
+ gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
+ if (s_vpn) {
+ value = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_APP_VERSION);
+ if (value && strlen (value))
+ gtk_entry_set_text (GTK_ENTRY (widget), value);
+ }
+ g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
+
active = -1;
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
if (s_vpn)
@@ -899,6 +910,12 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
} else
nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_VENDOR, NM_VPNC_VENDOR_CISCO);
+ /* Application version */
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "application_version_entry"));
+ str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
+ if (str && strlen (str))
+ nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_APP_VERSION, str);
+
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "encryption_combo"));
switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) {
case ENC_TYPE_WEAK:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]