* 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;
}