* name of the connection
*/
GtkEntry *name;
+
+ /**
+ * gateway address
+ */
+ GtkEntry *gateway;
+
+ /**
+ * username
+ */
+ GtkEntry *user;
};
static const char *get_display_name(private_nm_applet_gui_t *this)
GSList *i;
gtk_entry_set_text(this->name, "");
- /*gtk_entry_set_text(this->gateway, "");*/
+ gtk_entry_set_text(this->gateway, "");
+ gtk_entry_set_text(this->user, "");
if (connection_name)
{
if (properties)
{
value = properties->data;
- /*
if (strcmp(key, "gateway") == 0)
{
gtk_entry_set_text(this->gateway, value);
- }*/
+ }
+ if (strcmp(key, "user") == 0)
+ {
+ gtk_entry_set_text(this->user, value);
+ }
properties = g_slist_next(properties);
}
}
-
return this->widget;
}
{
GSList *props = NULL;
- /*props = g_slist_append(props, g_strdup("gateway"));
- props = g_slist_append(props, g_strdup(gtk_entry_get_text(this->gateway)));*/
+ props = g_slist_append(props, g_strdup("gateway"));
+ props = g_slist_append(props, g_strdup(gtk_entry_get_text(this->gateway)));
+ props = g_slist_append(props, g_strdup("user"));
+ props = g_slist_append(props, g_strdup(gtk_entry_get_text(this->user)));
return props;
}
this->public.data = NULL;
this->callback = NULL;
- this->xml = glade_xml_new("/home/martin/strongswan/trunk/src/networkmanager/nm_applet_gui.xml", NULL, NULL);
+ this->xml = glade_xml_new("/home/martin/strongswan/trunk/src/charon/plugins/dbus/nm_applet_gui.xml", NULL, NULL);
if (this->xml != NULL)
{
this->widget = glade_xml_get_widget(this->xml, "main");
this->name = GTK_ENTRY(glade_xml_get_widget(this->xml, "name"));
+ this->gateway = GTK_ENTRY(glade_xml_get_widget(this->xml, "gateway"));
+ this->user = GTK_ENTRY(glade_xml_get_widget(this->xml, "user"));
- if (this->widget && this->name)
+ if (this->widget && this->name && this->gateway && this->user)
{
return &this->public;
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.0 on Mon Apr 30 15:31:54 2007 by martin@martin-->
+<!--Generated with glade3 3.4.0 on Sat Mar 15 17:12:28 2008 -->
<glade-interface>
<widget class="GtkWindow" id="window1">
<child>
<widget class="GtkTable" id="main">
<property name="visible">True</property>
- <property name="n_rows">1</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
+ <property name="column_spacing">5</property>
+ <property name="row_spacing">5</property>
<child>
- <widget class="GtkLabel" id="label1">
+ <widget class="GtkEntry" id="user">
<property name="visible">True</property>
- <property name="label" translatable="yes">Connection _name</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="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Username</property>
+ <property name="use_underline">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="gateway">
+ <property name="visible">True</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="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Gateway</property>
<property name="use_underline">True</property>
+ <property name="justify">GTK_JUSTIFY_RIGHT</property>
</widget>
<packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
- <property name="x_padding">5</property>
- <property name="y_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Connection _name</property>
+ <property name="use_underline">True</property>
+ <property name="justify">GTK_JUSTIFY_FILL</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>