[PATCH] Porting NetworkManager-PPTP to GtkBuilder
- From: Mathieu Trudel-Lapierre <mathieu tl gmail com>
- To: ML NetworkManager <networkmanager-list gnome org>
- Subject: [PATCH] Porting NetworkManager-PPTP to GtkBuilder
- Date: Thu, 3 Feb 2011 17:40:43 -0500
Hi,
Here's another patch porting UI to GtkBuilder. This time, I've looked
at the PPTP plugin.
Patch is attached :)
Mathieu Trudel-Lapierre <mathieu tl gmail com>
Freenode: cyphermox, Jabber: mathieu tl gmail com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre <mathieu trudel-lapierre canonical com>
Subject: Porting network-manager-pptp UI to GtkBuilder.
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/auth-dialog/Makefile.am
===================================================================
--- network-manager-pptp-0.8.1+git.20110127t021142.5118124.orig/auth-dialog/Makefile.am 2011-02-03 14:44:11.000000000 -0500
+++ network-manager-pptp-0.8.1+git.20110127t021142.5118124/auth-dialog/Makefile.am 2011-02-03 17:25:32.481902701 -0500
@@ -9,7 +9,7 @@
$(GCONF_CFLAGS) \
$(GNOMEKEYRING_CFLAGS) \
-DICONDIR=\""$(datadir)/pixmaps"\" \
- -DGLADEDIR=\""$(gladedir)"\" \
+ -DUIDIR=\""$(uidir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/configure.ac
===================================================================
--- network-manager-pptp-0.8.1+git.20110127t021142.5118124.orig/configure.ac 2011-02-03 14:44:11.000000000 -0500
+++ network-manager-pptp-0.8.1+git.20110127t021142.5118124/configure.ac 2011-02-03 17:25:32.481902701 -0500
@@ -86,10 +86,6 @@
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
- PKG_CHECK_MODULES(GLADE, libglade-2.0)
- AC_SUBST(GLADE_CFLAGS)
- AC_SUBST(GLADE_LIBS)
-
PKG_CHECK_MODULES(GCONF, gconf-2.0)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/Makefile.am
===================================================================
--- network-manager-pptp-0.8.1+git.20110127t021142.5118124.orig/properties/Makefile.am 2011-02-03 14:44:11.000000000 -0500
+++ network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/Makefile.am 2011-02-03 17:25:32.491902625 -0500
@@ -9,18 +9,17 @@
import-export.c \
import-export.h
-gladedir = $(datadir)/gnome-vpn-properties/pptp
-glade_DATA = nm-pptp-dialog.glade
+uidir = $(datadir)/gnome-vpn-properties/pptp
+ui_DATA = nm-pptp-dialog.ui
libnm_pptp_properties_la_CFLAGS = \
- $(GLADE_CFLAGS) \
$(GTK_CFLAGS) \
$(GCONF_CFLAGS) \
$(LIBGNOMEUI_CFLAGS) \
$(GNOMEKEYRING_CFLAGS) \
$(NETWORKMANAGER_CFLAGS) \
-DICONDIR=\""$(datadir)/pixmaps"\" \
- -DGLADEDIR=\""$(gladedir)"\" \
+ -DUIDIR=\""$(uidir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
@@ -28,7 +27,6 @@
-DVERSION=\"$(VERSION)\"
libnm_pptp_properties_la_LIBADD = \
- $(GLADE_LIBS) \
$(GTK_LIBS) \
$(GCONF_LIBS) \
$(LIBGNOMEUI_LIBS) \
@@ -38,7 +36,7 @@
libnm_pptp_properties_la_LDFLAGS = \
-avoid-version
-CLEANFILES = *.bak *.gladep *~
+CLEANFILES = *.bak *~
EXTRA_DIST = \
- $(glade_DATA)
+ $(ui_DATA)
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/advanced-dialog.c
===================================================================
--- network-manager-pptp-0.8.1+git.20110127t021142.5118124.orig/properties/advanced-dialog.c 2011-02-03 14:44:11.000000000 -0500
+++ network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/advanced-dialog.c 2011-02-03 17:25:44.271814672 -0500
@@ -33,7 +33,6 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <glade/glade.h>
#include <nm-connection.h>
#include <nm-setting-vpn.h>
@@ -99,7 +98,7 @@
}
static void
-handle_mppe_changed (GtkWidget *check, gboolean is_init, GladeXML *xml)
+handle_mppe_changed (GtkWidget *check, gboolean is_init, GtkBuilder *xml)
{
GtkWidget *widget;
gboolean use_mppe;
@@ -120,7 +119,7 @@
/* If MPPE is active, PAP, CHAP, and EAP aren't allowed by the MPPE specs;
* likewise, if MPPE is inactive, sensitize the PAP, CHAP, and EAP checkboxes.
*/
- widget = glade_xml_get_widget (xml, "ppp_auth_methods");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_auth_methods"));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
valid = gtk_tree_model_get_iter_first (model, &iter);
while (valid) {
@@ -141,15 +140,15 @@
valid = gtk_tree_model_iter_next (model, &iter);
}
- widget = glade_xml_get_widget (xml, "ppp_mppe_security_label");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_mppe_security_label"));
gtk_widget_set_sensitive (widget, use_mppe);
- widget = glade_xml_get_widget (xml, "ppp_mppe_security_combo");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_mppe_security_combo"));
if (!use_mppe)
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); /* default */
gtk_widget_set_sensitive (widget, use_mppe);
- widget = glade_xml_get_widget (xml, "ppp_allow_stateful_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_stateful_mppe"));
if (!use_mppe)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_widget_set_sensitive (widget, use_mppe);
@@ -158,7 +157,7 @@
static void
mppe_toggled_cb (GtkWidget *check, gpointer user_data)
{
- handle_mppe_changed (check, FALSE, (GladeXML *) user_data);
+ handle_mppe_changed (check, FALSE, (GtkBuilder *) user_data);
}
#define SEC_INDEX_DEFAULT 0
@@ -166,7 +165,7 @@
#define SEC_INDEX_MPPE_40 2
static void
-setup_security_combo (GladeXML *xml, GHashTable *hash)
+setup_security_combo (GtkBuilder *xml, GHashTable *hash)
{
GtkWidget *widget;
GtkListStore *store;
@@ -177,7 +176,7 @@
g_return_if_fail (xml != NULL);
g_return_if_fail (hash != NULL);
- widget = glade_xml_get_widget (xml, "ppp_mppe_security_combo");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_mppe_security_combo"));
store = gtk_list_store_new (1, G_TYPE_STRING);
@@ -211,7 +210,7 @@
static void
check_toggled_cb (GtkCellRendererToggle *cell, gchar *path_str, gpointer user_data)
{
- GladeXML *xml = GLADE_XML (user_data);
+ GtkBuilder *xml = (GtkBuilder *) user_data;
GtkWidget *widget;
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
GtkTreeModel *model;
@@ -221,7 +220,7 @@
gboolean mschap_state = TRUE;
gboolean mschap2_state = TRUE;
- widget = glade_xml_get_widget (xml, "ppp_auth_methods");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_auth_methods"));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
gtk_tree_model_get_iter (model, &iter, path);
@@ -254,7 +253,7 @@
valid = gtk_tree_model_iter_next (model, &iter);
}
- widget = glade_xml_get_widget (xml, "ppp_use_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_use_mppe"));
if (!mschap_state && !mschap2_state) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_widget_set_sensitive (widget, FALSE);
@@ -263,7 +262,7 @@
}
static void
-auth_methods_setup (GladeXML *xml, GHashTable *hash)
+auth_methods_setup (GtkBuilder *xml, GHashTable *hash)
{
GtkWidget *widget;
GtkListStore *store;
@@ -359,7 +358,7 @@
-1);
/* Set up the tree view */
- widget = glade_xml_get_widget (xml, "ppp_auth_methods");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_auth_methods"));
gtk_tree_view_set_model (GTK_TREE_VIEW (widget), GTK_TREE_MODEL (store));
check_renderer = GTK_CELL_RENDERER_TOGGLE (gtk_cell_renderer_toggle_new ());
@@ -386,7 +385,7 @@
gtk_tree_view_column_set_expand (GTK_TREE_VIEW_COLUMN (column), TRUE);
/* Make sure MPPE is non-sensitive if MSCHAP and MSCHAPv2 are disabled */
- widget = glade_xml_get_widget (xml, "ppp_use_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_use_mppe"));
if (!mschap_state && !mschap2_state) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_widget_set_sensitive (widget, FALSE);
@@ -397,28 +396,29 @@
GtkWidget *
advanced_dialog_new (GHashTable *hash)
{
- GladeXML *xml;
+ GtkBuilder *xml;
GtkWidget *dialog = NULL;
- char *glade_file = NULL;
+ char *gtkbuilder_file = NULL;
GtkWidget *widget;
const char *value;
gboolean mppe = FALSE;
g_return_val_if_fail (hash != NULL, NULL);
- glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-pptp-dialog.glade");
- xml = glade_xml_new (glade_file, "pptp-advanced-dialog", GETTEXT_PACKAGE);
+ gtkbuilder_file = g_strdup_printf ("%s/%s", UIDIR, "nm-pptp-dialog.ui");
+ xml = gtk_builder_new ();
+ gtk_builder_add_from_file (xml, gtkbuilder_file, NULL);
if (xml == NULL)
goto out;
- dialog = glade_xml_get_widget (xml, "pptp-advanced-dialog");
+ dialog = GTK_WIDGET (gtk_builder_get_object (xml, "pptp-advanced-dialog"));
if (!dialog) {
g_object_unref (G_OBJECT (xml));
goto out;
}
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- g_object_set_data_full (G_OBJECT (dialog), "glade-xml",
+ g_object_set_data_full (G_OBJECT (dialog), "gtkbuilder-xml",
xml, (GDestroyNotify) g_object_unref);
setup_security_combo (xml, hash);
@@ -435,34 +435,34 @@
if (value && !strcmp (value, "yes"))
mppe = TRUE;
- widget = glade_xml_get_widget (xml, "ppp_use_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_use_mppe"));
if (mppe)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
- widget = glade_xml_get_widget (xml, "ppp_allow_stateful_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_stateful_mppe"));
value = g_hash_table_lookup (hash, NM_PPTP_KEY_MPPE_STATEFUL);
if (value && !strcmp (value, "yes"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
- widget = glade_xml_get_widget (xml, "ppp_allow_bsdcomp");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_bsdcomp"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
value = g_hash_table_lookup (hash, NM_PPTP_KEY_NOBSDCOMP);
if (value && !strcmp (value, "yes"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
- widget = glade_xml_get_widget (xml, "ppp_allow_deflate");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_deflate"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
value = g_hash_table_lookup (hash, NM_PPTP_KEY_NODEFLATE);
if (value && !strcmp (value, "yes"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
- widget = glade_xml_get_widget (xml, "ppp_usevj");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_usevj"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
value = g_hash_table_lookup (hash, NM_PPTP_KEY_NO_VJ_COMP);
if (value && !strcmp (value, "yes"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
- widget = glade_xml_get_widget (xml, "ppp_send_echo_packets");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_send_echo_packets"));
value = g_hash_table_lookup (hash, NM_PPTP_KEY_LCP_ECHO_INTERVAL);
if (value && strlen (value)) {
long int tmp_int;
@@ -475,12 +475,12 @@
auth_methods_setup (xml, hash);
- widget = glade_xml_get_widget (xml, "ppp_use_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_use_mppe"));
handle_mppe_changed (widget, TRUE, xml);
g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (mppe_toggled_cb), xml);
out:
- g_free (glade_file);
+ g_free (gtkbuilder_file);
return dialog;
}
@@ -489,7 +489,7 @@
{
GHashTable *hash;
GtkWidget *widget;
- GladeXML *xml;
+ GtkBuilder *xml;
GtkTreeModel *model;
GtkTreeIter iter;
gboolean valid;
@@ -498,15 +498,15 @@
if (error)
g_return_val_if_fail (*error == NULL, NULL);
- xml = g_object_get_data (G_OBJECT (dialog), "glade-xml");
+ xml = g_object_get_data (G_OBJECT (dialog), "gtkbuilder-xml");
g_return_val_if_fail (xml != NULL, NULL);
hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
- widget = glade_xml_get_widget (xml, "ppp_use_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_use_mppe"));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
- widget = glade_xml_get_widget (xml, "ppp_mppe_security_combo");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_mppe_security_combo"));
switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) {
case SEC_INDEX_MPPE_128:
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_REQUIRE_MPPE_128), g_strdup ("yes"));
@@ -519,30 +519,30 @@
break;
}
- widget = glade_xml_get_widget (xml, "ppp_allow_stateful_mppe");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_stateful_mppe"));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_MPPE_STATEFUL), g_strdup ("yes"));
}
- widget = glade_xml_get_widget (xml, "ppp_allow_bsdcomp");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_bsdcomp"));
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_NOBSDCOMP), g_strdup ("yes"));
- widget = glade_xml_get_widget (xml, "ppp_allow_deflate");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_allow_deflate"));
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_NODEFLATE), g_strdup ("yes"));
- widget = glade_xml_get_widget (xml, "ppp_usevj");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_usevj"));
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_NO_VJ_COMP), g_strdup ("yes"));
- widget = glade_xml_get_widget (xml, "ppp_send_echo_packets");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_send_echo_packets"));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_LCP_ECHO_FAILURE), g_strdup_printf ("%d", 5));
g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_LCP_ECHO_INTERVAL), g_strdup_printf ("%d", 30));
}
- widget = glade_xml_get_widget (xml, "ppp_auth_methods");
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, "ppp_auth_methods"));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
valid = gtk_tree_model_get_iter_first (model, &iter);
while (valid) {
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/nm-pptp-dialog.glade
===================================================================
--- network-manager-pptp-0.8.1+git.20110127t021142.5118124.orig/properties/nm-pptp-dialog.glade 2011-02-03 14:44:11.000000000 -0500
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,588 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.4 on Sun Oct 12 10:59:11 2008 -->
-<glade-interface>
- <widget class="GtkWindow" id="pptp-widget">
- <property name="title" translatable="yes">window1</property>
- <child>
- <widget class="GtkVBox" id="pptp-vbox">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="spacing">16</property>
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>General</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
- <child>
- <widget class="GtkEntry" id="gateway_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</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="label23">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Gateway:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">gateway_entry</property>
- </widget>
- <packing>
- <property name="x_options">GTK_SHRINK | GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox11">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Optional</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="n_rows">4</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="GtkEntry" id="domain_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- <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>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label27">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">NT Domain:</property>
- </widget>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_SHRINK | GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="show_passwords_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Show password</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <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="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="user_password_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Password:</property>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_SHRINK | GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="user_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</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="label26">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">User name:</property>
- </widget>
- <packing>
- <property name="x_options">GTK_SHRINK | GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="xscale">0</property>
- <child>
- <widget class="GtkButton" id="advanced_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-preferences</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Ad_vanced...</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <widget class="GtkDialog" id="pptp-advanced-dialog">
- <property name="border_width">5</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
- <property name="title" translatable="yes">PPTP Advanced Options</property>
- <property name="destroy_with_parent">True</property>
- <property name="icon_name">stock-preferences</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="skip_pager_hint">True</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <widget class="GtkVBox" id="PppPage">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="spacing">18</property>
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Authentication</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="auth_methods_label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Allow the following authentication methods:</property>
- </widget>
- </child>
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <widget class="GtkTreeView" id="ppp_auth_methods">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Security and Compression</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkCheckButton" id="ppp_use_mppe">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use _Point-to-Point encryption (MPPE)</property>
- <property name="tooltip" translatable="yes">Note: MPPE encryption is only available with MSCHAP authentication methods. To enable this checkbox, select one or more of the MSCHAP authentication methods: MSCHAP or MSCHAPv2.</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkLabel" id="ppp_mppe_security_label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Security:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">ppp_mppe_security_combo</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkComboBox" id="ppp_mppe_security_combo">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Default</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkCheckButton" id="ppp_allow_stateful_mppe">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Allow st_ateful encryption</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="ppp_allow_bsdcomp">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Allow _BSD data compression</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="ppp_allow_deflate">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Allow _Deflate data compression</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="ppp_usevj">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use TCP _header compression</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Echo</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkCheckButton" id="ppp_send_echo_packets">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Send PPP _echo packets</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="response_id">-5</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
-</glade-interface>
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/nm-pptp-dialog.ui
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/nm-pptp-dialog.ui 2011-02-03 17:25:32.000000000 -0500
@@ -0,0 +1,708 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 2.6 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name item text -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Default</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkDialog" id="pptp-advanced-dialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">PPTP Advanced Options</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="icon_name">stock-preferences</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_pager_hint">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok_button">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="PppPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Authentication</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="auth_methods_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Allow the following authentication methods:</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="ppp_auth_methods">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <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"><b>Security and Compression</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="ppp_use_mppe">
+ <property name="label" translatable="yes">Use _Point-to-Point encryption (MPPE)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Note: MPPE encryption is only available with MSCHAP authentication methods. To enable this checkbox, select one or more of the MSCHAP authentication methods: MSCHAP or MSCHAPv2.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="ppp_mppe_security_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Security:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">ppp_mppe_security_combo</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="ppp_mppe_security_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststore1</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="ppp_allow_stateful_mppe">
+ <property name="label" translatable="yes">Allow st_ateful encryption</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="ppp_allow_bsdcomp">
+ <property name="label" translatable="yes">Allow _BSD data compression</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="ppp_allow_deflate">
+ <property name="label" translatable="yes">Allow _Deflate data compression</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="ppp_usevj">
+ <property name="label" translatable="yes">Use TCP _header compression</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Echo</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="ppp_send_echo_packets">
+ <property name="label" translatable="yes">Send PPP _echo packets</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancel_button</action-widget>
+ <action-widget response="-5">ok_button</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkWindow" id="pptp-widget">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">window1</property>
+ <child>
+ <object class="GtkVBox" id="pptp-vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">16</property>
+ <child>
+ <object class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>General</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="gateway_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Gateway:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">gateway_entry</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Optional</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="domain_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">NT Domain:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="show_passwords_checkbutton">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <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="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="user_password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="user_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">User name:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xscale">0</property>
+ <child>
+ <object class="GtkButton" id="advanced_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-preferences</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Ad_vanced...</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
Index: network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/nm-pptp.c
===================================================================
--- network-manager-pptp-0.8.1+git.20110127t021142.5118124.orig/properties/nm-pptp.c 2011-02-03 14:44:11.000000000 -0500
+++ network-manager-pptp-0.8.1+git.20110127t021142.5118124/properties/nm-pptp.c 2011-02-03 17:25:32.501902549 -0500
@@ -32,7 +32,6 @@
#include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h>
-#include <glade/glade.h>
#define NM_VPN_API_SUBJECT_TO_CHANGE
@@ -73,7 +72,7 @@
#define PPTP_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PPTP_TYPE_PLUGIN_UI_WIDGET, PptpPluginUiWidgetPrivate))
typedef struct {
- GladeXML *xml;
+ GtkBuilder *xml;
GtkWidget *widget;
GtkSizeGroup *group;
GtkWindowGroup *window_group;
@@ -129,7 +128,7 @@
GtkWidget *widget;
const char *str;
- widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "gateway_entry"));
str = gtk_entry_get_text (GTK_ENTRY (widget));
if (!str || !strlen (str)) {
g_set_error (error,
@@ -218,13 +217,13 @@
visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
- widget = glade_xml_get_widget (priv->xml, "user_password_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_password_entry"));
g_assert (widget);
gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
}
static GtkWidget *
-fill_password (GladeXML *xml,
+fill_password (GtkBuilder *xml,
const char *widget_name,
NMConnection *connection,
const char *password_type)
@@ -232,7 +231,7 @@
GtkWidget *widget = NULL;
gchar *password = NULL;
- widget = glade_xml_get_widget (xml, widget_name);
+ widget = GTK_WIDGET (gtk_builder_get_object (xml, widget_name));
g_assert (widget);
if (!connection)
@@ -272,7 +271,7 @@
}
static void
-fill_vpn_passwords (GladeXML *xml,
+fill_vpn_passwords (GtkBuilder *xml,
GtkSizeGroup *group,
NMConnection *connection,
ChangedCallback changed_cb,
@@ -285,7 +284,7 @@
gtk_size_group_add_widget (group, w);
g_signal_connect (w, "changed", G_CALLBACK (changed_cb), user_data);
} else {
- g_error ("No user_password_entry in glade file!");
+ g_error ("No user_password_entry in GtkBuilder file!");
}
}
@@ -301,7 +300,7 @@
priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "gateway_entry"));
if (!widget)
return FALSE;
gtk_size_group_add_widget (priv->group, widget);
@@ -312,7 +311,7 @@
}
g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
- widget = glade_xml_get_widget (priv->xml, "user_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_entry"));
if (!widget)
return FALSE;
gtk_size_group_add_widget (priv->group, widget);
@@ -323,7 +322,7 @@
}
g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
- widget = glade_xml_get_widget (priv->xml, "domain_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "domain_entry"));
if (!widget)
return FALSE;
gtk_size_group_add_widget (priv->group, widget);
@@ -334,10 +333,10 @@
}
g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
- widget = glade_xml_get_widget (priv->xml, "advanced_button");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "advanced_button"));
g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (advanced_button_clicked_cb), self);
- widget = glade_xml_get_widget (priv->xml, "show_passwords_checkbutton");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "show_passwords_checkbutton"));
g_return_val_if_fail (widget != NULL, FALSE);
g_signal_connect (G_OBJECT (widget), "toggled",
(GCallback) show_toggled_cb,
@@ -384,19 +383,19 @@
g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_PPTP, NULL);
/* Gateway */
- widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "gateway_entry"));
str = gtk_entry_get_text (GTK_ENTRY (widget));
if (str && strlen (str))
nm_setting_vpn_add_data_item (s_vpn, NM_PPTP_KEY_GATEWAY, str);
/* Username */
- widget = glade_xml_get_widget (priv->xml, "user_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_entry"));
str = gtk_entry_get_text (GTK_ENTRY (widget));
if (str && strlen (str))
nm_setting_vpn_add_data_item (s_vpn, NM_PPTP_KEY_USER, str);
/* Domain */
- widget = glade_xml_get_widget (priv->xml, "domain_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "domain_entry"));
str = gtk_entry_get_text (GTK_ENTRY (widget));
if (str && strlen (str))
nm_setting_vpn_add_data_item (s_vpn, NM_PPTP_KEY_DOMAIN, str);
@@ -434,7 +433,7 @@
id = nm_setting_connection_get_id (s_con);
uuid = nm_setting_connection_get_uuid (s_con);
- widget = glade_xml_get_widget (priv->xml, "user_password_entry");
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_password_entry"));
g_assert (widget);
str = gtk_entry_get_text (GTK_ENTRY (widget));
if (str && strlen (str)) {
@@ -452,7 +451,7 @@
{
NMVpnPluginUiWidgetInterface *object;
PptpPluginUiWidgetPrivate *priv;
- char *glade_file;
+ char *gtkbuilder_file;
if (error)
g_return_val_if_fail (*error == NULL, NULL);
@@ -465,18 +464,19 @@
priv = PPTP_PLUGIN_UI_WIDGET_GET_PRIVATE (object);
- glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-pptp-dialog.glade");
- priv->xml = glade_xml_new (glade_file, "pptp-vbox", GETTEXT_PACKAGE);
+ gtkbuilder_file = g_strdup_printf ("%s/%s", UIDIR, "nm-pptp-dialog.ui");
+ priv->xml = gtk_builder_new ();
+ gtk_builder_add_from_file (priv->xml, gtkbuilder_file, NULL);
if (priv->xml == NULL) {
g_set_error (error, PPTP_PLUGIN_UI_ERROR, 0,
- "could not load required resources at %s", glade_file);
- g_free (glade_file);
+ "could not load required resources at %s", gtkbuilder_file);
+ g_free (gtkbuilder_file);
g_object_unref (object);
return NULL;
}
- g_free (glade_file);
+ g_free (gtkbuilder_file);
- priv->widget = glade_xml_get_widget (priv->xml, "pptp-vbox");
+ priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "pptp-vbox"));
if (!priv->widget) {
g_set_error (error, PPTP_PLUGIN_UI_ERROR, 0, "could not load UI widget");
g_object_unref (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]