aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/conduit/address-conduit-config.h
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-12-19 23:16:32 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-12-19 23:16:32 +0800
commitb64f547cdd71098035e9b055ee7f0ec4de2b9e1c (patch)
tree08ca63a7b0166c5bbe565f44a55ba0aef6997fd9 /addressbook/conduit/address-conduit-config.h
parentd7e3011f5135db26ab911a65e8e5d6ad4faa45df (diff)
downloadgsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.tar
gsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.tar.gz
gsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.tar.bz2
gsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.tar.lz
gsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.tar.xz
gsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.tar.zst
gsoc2013-evolution-b64f547cdd71098035e9b055ee7f0ec4de2b9e1c.zip
go slow and clear the map if the last uri and the current uri do not match
2001-12-18 JP Rosevear <jpr@ximian.com> * conduit/address-conduit.c (check_for_slow_setting): go slow and clear the map if the last uri and the current uri do not match (post_sync): save the last uri * conduits/address-conduit-config.h: handle a last uri config option 2001-12-18 Chris Toshok <toshok@ximian.com> * gui/component/addressbook.c (addressbook_default_book_open): change this to match its e-book counterpart, and only failover to the local addressbook if the protocol wasn't supported. that way errors like "failure to connect" are still reported to the user. * backend/ebook/e-book-util.h: add prototypes for e_book_load_default_book and e_book_get_config_database. * backend/ebook/e-book-util.c (e_book_default_book_open): new function, basically cut and paste addressbook_default_book_open from addressbook.c here. (e_book_load_default_book): cut and past addressbook_load_default_book here, pretty much, except leave off the auth stuff. (e_book_get_config_database): new function, returns the Bonobo_ConfigDatabase for e_book_load_default_book to use. * conduit/address-conduit.c (start_addressbook_server): use e_book_load_default_book here. svn path=/trunk/; revision=15178
Diffstat (limited to 'addressbook/conduit/address-conduit-config.h')
-rw-r--r--addressbook/conduit/address-conduit-config.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/addressbook/conduit/address-conduit-config.h b/addressbook/conduit/address-conduit-config.h
index 4042eff423..2387f67ef3 100644
--- a/addressbook/conduit/address-conduit-config.h
+++ b/addressbook/conduit/address-conduit-config.h
@@ -32,9 +32,11 @@
/* Configuration info */
typedef struct _EAddrConduitCfg EAddrConduitCfg;
struct _EAddrConduitCfg {
- gboolean open_secret;
guint32 pilot_id;
- GnomePilotConduitSyncType sync_type; /* only used by capplet */
+ GnomePilotConduitSyncType sync_type;
+
+ gboolean open_secret;
+ gchar *last_uri;
};
#ifdef ADDR_CONFIG_LOAD
@@ -63,6 +65,7 @@ addrconduit_load_configuration (EAddrConduitCfg **c, guint32 pilot_id)
gnome_config_push_prefix (prefix);
(*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE");
+ (*c)->last_uri = gnome_config_get_string ("last_uri");
gnome_config_pop_prefix ();
}
@@ -80,6 +83,7 @@ addrconduit_save_configuration (EAddrConduitCfg *c)
gnome_config_push_prefix (prefix);
gnome_config_set_bool ("open_secret", c->open_secret);
+ gnome_config_set_string ("last_uri", c->last_uri);
gnome_config_pop_prefix ();
gnome_config_sync ();
@@ -99,7 +103,9 @@ addrconduit_dupe_configuration (EAddrConduitCfg *c)
retval = g_new0 (EAddrConduitCfg, 1);
retval->sync_type = c->sync_type;
retval->open_secret = c->open_secret;
+
retval->pilot_id = c->pilot_id;
+ retval->last_uri = g_strdup (c->last_uri);
return retval;
}
@@ -113,6 +119,7 @@ addrconduit_destroy_configuration (EAddrConduitCfg **c)
g_return_if_fail (c != NULL);
g_return_if_fail (*c != NULL);
+ g_free ((*c)->last_uri);
g_free (*c);
*c = NULL;
}