diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-07-06 04:07:46 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-07-06 04:07:46 +0800 |
commit | 2ca2244e6b47fa020ba10bcfb6836033ddfc3cc8 (patch) | |
tree | a5f1c34e58dee9beb85aedf093422cf1d4c716c5 /addressbook/gui/component/e-ldap-server-dialog.c | |
parent | bc4c507c9ef59d92272fccef9cda4994ce507e0a (diff) | |
download | gsoc2013-evolution-2ca2244e6b47fa020ba10bcfb6836033ddfc3cc8.tar.gz gsoc2013-evolution-2ca2244e6b47fa020ba10bcfb6836033ddfc3cc8.tar.zst gsoc2013-evolution-2ca2244e6b47fa020ba10bcfb6836033ddfc3cc8.zip |
call e_ldap_storage_add_server call.
2000-07-05 Chris Toshok <toshok@helixcode.com>
* gui/component/addressbook.c (new_server_cb): call
e_ldap_storage_add_server call.
* gui/component/ldap-server-dialog.glade: add name row.
* gui/component/e-ldap-server-dialog.h: remove the ELDAPServer type.
* gui/component/e-ldap-server-dialog.c (extract_server_info): add
support for the name-entry.
* gui/component/e-ldap-server-dialog.c (fill_in_server_info): same.
* gui/component/e-ldap-storage.h: add ELDAPServer type, and add
prototypes for e_ldap_storage_add_server and
e_ldap_storage_remove_server.
* gui/component/e-ldap-storage.c (e_ldap_storage_add_server): new
function, add it to our hash table, add a shell folder, and save
out the metadata.
(ldap_server_foreach): add the ldap server info under a
"contactserver" node.
(setup_ldap_storage): create our hashtable.
svn path=/trunk/; revision=3895
Diffstat (limited to 'addressbook/gui/component/e-ldap-server-dialog.c')
-rw-r--r-- | addressbook/gui/component/e-ldap-server-dialog.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/addressbook/gui/component/e-ldap-server-dialog.c b/addressbook/gui/component/e-ldap-server-dialog.c index d64549cc2d..2242282f3f 100644 --- a/addressbook/gui/component/e-ldap-server-dialog.c +++ b/addressbook/gui/component/e-ldap-server-dialog.c @@ -39,6 +39,12 @@ fill_in_server_info (ELDAPServerDialog *dialog) int position; char buf[128]; + /* the name */ + position = 0; + editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "name-entry")); + gtk_editable_delete_text (editable, 0, -1); + gtk_editable_insert_text (editable, ldap_server->name, strlen (ldap_server->name), &position); + /* the server description */ position = 0; editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "description-entry")); @@ -70,7 +76,16 @@ extract_server_info (ELDAPServerDialog *dialog) { ELDAPServer *ldap_server = dialog->server; GtkEditable *editable; - char *description, *server, *port, *rootdn; + char *description, *server, *port, *rootdn, *name; + + /* the server name */ + editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "name-entry")); + name = gtk_editable_get_chars(editable, 0, -1); + if (name && *name) { + if (ldap_server->name) + g_free(ldap_server->name); + ldap_server->name = name; + } /* the server description */ editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "description-entry")); @@ -111,7 +126,7 @@ extract_server_info (ELDAPServerDialog *dialog) void e_ldap_server_editor_show(ELDAPServer *server) { - ELDAPServerDialog *dialog = g_new0(ELDAPServerDialog, 1); + ELDAPServerDialog *dialog = g_new0 (ELDAPServerDialog, 1); dialog->server = server; dialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/ldap-server-dialog.glade", NULL); |