diff options
author | Chris Toshok <toshok@ximian.com> | 2001-09-07 10:02:06 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-09-07 10:02:06 +0800 |
commit | 88ab05172828d622055931aca8dd19aaf3d77072 (patch) | |
tree | dd0a33c09c277c9ae7ab3b1d1cfefe1154035dd5 /addressbook/gui/component/addressbook-component.c | |
parent | 38353e7c0379625454b02138160314a22ee5c102 (diff) | |
download | gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.tar gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.tar.gz gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.tar.bz2 gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.tar.lz gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.tar.xz gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.tar.zst gsoc2013-evolution-88ab05172828d622055931aca8dd19aaf3d77072.zip |
new function, notify the bonobo listener. (remove_ldap_folder): track
2001-09-06 Chris Toshok <toshok@ximian.com>
* gui/component/addressbook-storage.c (notify_listener): new
function, notify the bonobo listener.
(remove_ldap_folder): track change to EvolutionStorage signal.
(create_ldap_folder): same, and make sure the type is
"ldap-contacts".
(load_source_data): folders that we create should have
"ldap-contacts" as their type.
(addressbook_storage_add_source): same.
* gui/component/addressbook-component.c: (folder_types): add
"ldap-contacts", for display of ldap servers (they get their own
icon, and their own name in the Create New Folder dialog.
(create_view): use IS_CONTACT_TYPE since we support two folder
types now.
(create_folder): same.
(remove_folder): same.
(xfer_folder): same.
svn path=/trunk/; revision=12668
Diffstat (limited to 'addressbook/gui/component/addressbook-component.c')
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 961f706620..0e304e2604 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -67,9 +67,12 @@ static char *accepted_dnd_types[] = { static const EvolutionShellComponentFolderType folder_types[] = { { "contacts", "evolution-contacts.png", N_("Contacts"), N_("Folder containing contact information"), TRUE, accepted_dnd_types, NULL }, + { "ldap-contacts", "ldap-16.png", N_("LDAP Server"), N_("LDAP server containing contact information"), + TRUE, accepted_dnd_types, NULL }, { NULL } }; +#define IS_CONTACT_TYPE(x) (g_strcasecmp((x), "contacts") == 0 || g_strcasecmp ((x), "ldap-contacts") == 0) /* EvolutionShellComponent methods and signals. */ @@ -82,7 +85,7 @@ create_view (EvolutionShellComponent *shell_component, { BonoboControl *control; - if (g_strcasecmp (type, "contacts") != 0) + if (!IS_CONTACT_TYPE (type)) return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; control = addressbook_factory_new_control (); @@ -103,7 +106,7 @@ create_folder (EvolutionShellComponent *shell_component, CORBA_Environment ev; GNOME_Evolution_ShellComponentListener_Result result; - if (g_strcasecmp (type, "contacts") != 0) + if (!IS_CONTACT_TYPE (type)) result = GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE; else result = GNOME_Evolution_ShellComponentListener_OK; @@ -127,7 +130,7 @@ remove_folder (EvolutionShellComponent *shell_component, CORBA_exception_init(&ev); - if (strcmp (type, "contacts") != 0) { + if (!IS_CONTACT_TYPE (type)) { GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev); @@ -195,7 +198,7 @@ xfer_folder (EvolutionShellComponent *shell_component, char *source_path; char *destination_path; - if (strcmp (type, "contacts") != 0) { + if (!IS_CONTACT_TYPE (type)) { GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev); |