From 28aef9afc71eb2d2606171bbc94d72dfa325ed07 Mon Sep 17 00:00:00 2001 From: 8 Date: Wed, 19 Nov 2003 03:55:31 +0000 Subject: add protos 2003-11-18 * gui/calendar-config.h: add protos * gui/calendar-config.c (calendar_config_get_primary_calendar): get the primary calendar (calendar_config_set_primary_calendar): set it (calendar_config_add_notification_primary_calendar): set notifications for it (calendar_config_get_primary_tasks): get the primary task list (calendar_config_set_primary_tasks): set it (calendar_config_add_notification_primary_tasks): set notifications for it * gui/calendar-config-keys.h: add primary keys * gui/calendar-component.c (find_first_source): find any source (update_uri_for_primary_selection): set the default uri and save the source uid (update_primary_selection): set the primary selection (primary_source_selection_changed_cb): use above (impl_createControls): set the primary selection * gui/tasks-component.c: as above svn path=/trunk/; revision=23434 --- calendar/gui/calendar-config.c | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'calendar/gui/calendar-config.c') diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 913af4acbc..3c12c381ac 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -119,6 +119,7 @@ units_to_string (CalUnits units) * Calendar Settings. */ +/* The current list of calendars selected */ GSList * calendar_config_get_calendars_selected (void) { @@ -141,6 +142,31 @@ calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func, return id; } +/* The primary calendar */ +char * +calendar_config_get_primary_calendar (void) +{ + return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, NULL); +} + +void +calendar_config_set_primary_calendar (const char *primary_uid) +{ + gconf_client_set_string (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, primary_uid, NULL); +} + + +guint +calendar_config_add_notification_primary_calendar (GConfClientNotifyFunc func, gpointer data) +{ + guint id; + + id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, func, data, NULL, NULL); + + return id; +} + + /* The current timezone, e.g. "Europe/London". It may be NULL, in which case you should assume UTC (though Evolution will show the timezone-setting dialog the next time a calendar or task folder is selected). */ @@ -463,6 +489,30 @@ calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpo return id; } +/* The primary task list */ +char * +calendar_config_get_primary_tasks (void) +{ + return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_TASKS, NULL); +} + +void +calendar_config_set_primary_tasks (const char *primary_uid) +{ + gconf_client_set_string (config, CALENDAR_CONFIG_PRIMARY_TASKS, primary_uid, NULL); +} + + +guint +calendar_config_add_notification_primary_tasks (GConfClientNotifyFunc func, gpointer data) +{ + guint id; + + id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_TASKS, func, data, NULL, NULL); + + return id; +} + gint calendar_config_get_task_vpane_pos (void) { -- cgit v1.2.3