diff options
author | JP Rosevear <jpr@ximian.com> | 2002-01-22 02:02:31 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-01-22 02:02:31 +0800 |
commit | b7866694995d70a27360a2c17aac8541d2db5ecb (patch) | |
tree | 31030e91a9f13945cc01c1acf9884de74d14636b /calendar | |
parent | a10b9d3aa15f17e0693345979a2d219220761eb3 (diff) | |
download | gsoc2013-evolution-b7866694995d70a27360a2c17aac8541d2db5ecb.tar.gz gsoc2013-evolution-b7866694995d70a27360a2c17aac8541d2db5ecb.tar.zst gsoc2013-evolution-b7866694995d70a27360a2c17aac8541d2db5ecb.zip |
Buffers Files Tools Edit Search Mule Help
2002-01-21 JP Rosevear <jpr@ximian.com>
* conduits/todo/todo-conduit.c (todoconduit_load_configuration):
return a new configuration struct, load default priority setting
(todoconduit_save_configuration): save default priority setting
(e_todo_context_new): dupe configuration
* conduits/calendar/calendar-conduit.c (e_calendar_context_new):
set ps to NULL
svn path=/trunk/; revision=15419
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 10 | ||||
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 1 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 31 |
3 files changed, 31 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index caa3696be7..03234ffad4 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2002-01-21 JP Rosevear <jpr@ximian.com> + + * conduits/todo/todo-conduit.c (todoconduit_load_configuration): + return a new configuration struct, load default priority setting + (todoconduit_save_configuration): save default priority setting + (e_todo_context_new): dupe configuration + + * conduits/calendar/calendar-conduit.c (e_calendar_context_new): + set ps to NULL + 2002-01-17 Damon Chaplin <damon@ximian.com> * gui/dialogs/alarm-page.c (get_alarm_string): save the alarm string diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index ec6a752b86..f86e753232 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -207,6 +207,7 @@ e_calendar_context_new (guint32 pilot_id) ctxt->cfg = calconduit_load_configuration (pilot_id); ctxt->new_cfg = calconduit_dupe_configuration (ctxt->cfg); + ctxt->ps = NULL; ctxt->dbi = NULL; ctxt->client = NULL; ctxt->timezone = NULL; diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index ec24707596..0363a4e3ce 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -97,37 +97,43 @@ struct _EToDoConduitCfg { GnomePilotConduitSyncType sync_type; gboolean secret; + gint priority; + gchar *last_uri; }; -static void -todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilot_id) +static EToDoConduitCfg * +todoconduit_load_configuration (guint32 pilot_id) { + EToDoConduitCfg *c; GnomePilotConduitManagement *management; GnomePilotConduitConfig *config; gchar prefix[256]; g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", pilot_id); - *c = g_new0 (EToDoConduitCfg,1); - g_assert (*c != NULL); + c = g_new0 (EToDoConduitCfg,1); + g_assert (c != NULL); - (*c)->pilot_id = pilot_id; + c->pilot_id = pilot_id; management = gnome_pilot_conduit_management_new ("e_todo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); config = gnome_pilot_conduit_config_new (management, pilot_id); - if (!gnome_pilot_conduit_config_is_enabled (config, &(*c)->sync_type)) - (*c)->sync_type = GnomePilotConduitSyncTypeNotSet; + if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type)) + c->sync_type = GnomePilotConduitSyncTypeNotSet; gtk_object_unref (GTK_OBJECT (config)); gtk_object_unref (GTK_OBJECT (management)); /* Custom settings */ gnome_config_push_prefix (prefix); - (*c)->secret = gnome_config_get_bool ("secret=FALSE"); - (*c)->last_uri = gnome_config_get_string ("last_uri"); + c->secret = gnome_config_get_bool ("secret=FALSE"); + c->priority = gnome_config_get_int ("priority=1"); + c->last_uri = gnome_config_get_string ("last_uri"); gnome_config_pop_prefix (); + + return c; } static void @@ -140,6 +146,7 @@ todoconduit_save_configuration (EToDoConduitCfg *c) gnome_config_push_prefix (prefix); gnome_config_set_bool ("secret", c->secret); + gnome_config_set_int ("priority", c->priority); gnome_config_set_string ("last_uri", c->last_uri); gnome_config_pop_prefix (); @@ -159,6 +166,7 @@ todoconduit_dupe_configuration (EToDoConduitCfg *c) retval->pilot_id = c->pilot_id; retval->secret = c->secret; + retval->priority = c->priority; retval->last_uri = g_strdup (c->last_uri); return retval; @@ -199,8 +207,9 @@ e_todo_context_new (guint32 pilot_id) { EToDoConduitContext *ctxt = g_new0 (EToDoConduitContext, 1); - todoconduit_load_configuration (&ctxt->cfg, pilot_id); - + ctxt->cfg = todoconduit_load_configuration (pilot_id); + ctxt->new_cfg = todoconduit_dupe_configuration (ctxt->cfg); + ctxt->ps = NULL; ctxt->client = NULL; ctxt->uids = NULL; ctxt->changed_hash = NULL; |