aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:37:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:40:49 +0800
commitcfb9c32b6657165e4d5e11aa7b47804f679a61f8 (patch)
tree1f9c8954df7a357b5dc20a13ac82bf31c1112083 /calendar/gui/calendar-config.c
parentfefeb30f58447f2fa7bcbee16dbe68a9333ce89d (diff)
parent0f7f4cfe38b3c4cd83efbe9922ae15c5aee00317 (diff)
downloadgsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.gz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.bz2
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.lz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.xz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.zst
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.zip
Merge commit 'origin/kill-bonobo'
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c810
1 files changed, 17 insertions, 793 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 9262836d32..3208fb5f5b 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -29,12 +29,13 @@
#include <config.h>
#endif
-#include <string.h>
#include <time.h>
-#include <libedataserver/e-data-server-util.h>
+#include <string.h>
#include <e-util/e-util.h>
-#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
#include <libecal/e-cal-time-util.h>
+#include <libedataserver/e-data-server-util.h>
+#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
+#include <shell/e-shell.h>
#include "calendar-config-keys.h"
#include "calendar-config.h"
@@ -155,85 +156,33 @@ calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func,
return id;
}
-/* The primary calendar */
-gchar *
-calendar_config_get_primary_calendar (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, NULL);
-}
-
-void
-calendar_config_set_primary_calendar (const gchar *primary_uid)
-{
- calendar_config_init ();
-
- 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;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, func, data, NULL, NULL);
-
- return id;
-}
-
-gboolean
-calendar_config_get_use_system_timezone (void)
+static gchar *
+calendar_config_get_timezone_stored (void)
{
calendar_config_init ();
- return gconf_client_get_bool (config, CALENDAR_CONFIG_USE_SYSTEM_TIMEZONE, NULL);
+ return gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
}
-void
-calendar_config_set_use_system_timezone (gboolean use)
+static gchar *
+calendar_config_get_timezone (void)
{
- calendar_config_init ();
-
- if (calendar_config_get_use_system_timezone () != use) {
- gconf_client_set_bool (config, CALENDAR_CONFIG_USE_SYSTEM_TIMEZONE, use, NULL);
- gconf_client_notify (config, CALENDAR_CONFIG_TIMEZONE);
+ EShell *shell;
+ EShellSettings *shell_settings;
+ gboolean use_system_timezone;
- /* FIXME: notify CALENDAR_CONFIG_TIMEZONE change on system timezone change
- itself too, when using system timezone. How to receive such change? */
- }
-}
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
-guint
-calendar_config_add_notification_use_system_timezone (GConfClientNotifyFunc func, gpointer data)
-{
- calendar_config_init ();
+ use_system_timezone = e_shell_settings_get_boolean (
+ shell_settings, "cal-use-system-timezone");
- return gconf_client_notify_add (config, CALENDAR_CONFIG_USE_SYSTEM_TIMEZONE, func, data, NULL, NULL);
-}
-
-/* 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). */
-gchar *
-calendar_config_get_timezone (void)
-{
- if (calendar_config_get_use_system_timezone ())
+ if (use_system_timezone)
return e_cal_util_get_system_timezone_location ();
return calendar_config_get_timezone_stored ();
}
-gchar *
-calendar_config_get_timezone_stored (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
-}
-
icaltimezone *
calendar_config_get_icaltimezone (void)
{
@@ -251,31 +200,6 @@ calendar_config_get_icaltimezone (void)
return zone;
}
-/* Sets the timezone. If set to NULL it defaults to UTC.
- FIXME: Should check it is being set to a valid timezone. */
-void
-calendar_config_set_timezone (const gchar *timezone)
-{
- calendar_config_init ();
-
- if (timezone && timezone[0])
- gconf_client_set_string (config, CALENDAR_CONFIG_TIMEZONE, timezone, NULL);
- else
- gconf_client_set_string (config, CALENDAR_CONFIG_TIMEZONE, "UTC", NULL);
-}
-
-guint
-calendar_config_add_notification_timezone (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TIMEZONE, func, data, NULL, NULL);
-
- return id;
-}
-
/* Whether we use 24-hour format or 12-hour format (AM/PM). */
gboolean
calendar_config_get_24_hour_format (void)
@@ -292,126 +216,6 @@ calendar_config_get_24_hour_format (void)
return TRUE;
}
-void
-calendar_config_set_24_hour_format (gboolean use_24_hour)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_24HOUR, use_24_hour, NULL);
-}
-
-guint
-calendar_config_add_notification_24_hour_format (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_24HOUR, func, data, NULL, NULL);
-
- return id;
-}
-
-/* Show RSVP*/
-gboolean
-calendar_config_get_show_rsvp (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_RSVP, NULL);
-}
-
-void
-calendar_config_set_show_rsvp (gboolean state)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_RSVP, state, NULL);
-}
-
-/* Show Role*/
-gboolean
-calendar_config_get_show_role (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_ROLE, NULL);
-}
-
-void
-calendar_config_set_show_role (gboolean state)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_ROLE, state, NULL);
-}
-
-/* Show Type*/
-gboolean
-calendar_config_get_show_type (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_TYPE, NULL);
-}
-
-void
-calendar_config_set_show_type (gboolean state)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_TYPE, state, NULL);
-}
-
-/* Show status */
-gboolean
-calendar_config_get_show_status (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_STATUS, NULL);
-}
-
-void
-calendar_config_set_show_status (gboolean state)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_STATUS, state, NULL);
-}
-
-/* Show timezone */
-gboolean
-calendar_config_get_show_timezone (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_TIMEZONE, NULL);
-}
-
-void
-calendar_config_set_show_timezone (gboolean status)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_TIMEZONE, status, NULL);
-}
-
-gboolean
-calendar_config_get_show_categories (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_CATEGORIES, NULL);
-}
-void
-calendar_config_set_show_categories (gboolean status)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_CATEGORIES, status, NULL);
-}
-
/* The start day of the week (0 = Sun to 6 = Mon). */
gint
calendar_config_get_week_start_day (void)
@@ -421,26 +225,6 @@ calendar_config_get_week_start_day (void)
return gconf_client_get_int (config, CALENDAR_CONFIG_WEEK_START, NULL);
}
-void
-calendar_config_set_week_start_day (gint week_start_day)
-{
- calendar_config_init ();
-
- gconf_client_set_int (config, CALENDAR_CONFIG_WEEK_START, week_start_day, NULL);
-}
-
-guint
-calendar_config_add_notification_week_start_day (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_WEEK_START, func, data, NULL, NULL);
-
- return id;
-}
-
/* The start and end times of the work-day. */
gint
calendar_config_get_day_start_hour (void)
@@ -458,18 +242,6 @@ calendar_config_set_day_start_hour (gint day_start_hour)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_START_HOUR, day_start_hour, NULL);
}
-guint
-calendar_config_add_notification_day_start_hour (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_START_HOUR, func, data, NULL, NULL);
-
- return id;
-}
-
gint
calendar_config_get_day_start_minute (void)
{
@@ -486,18 +258,6 @@ calendar_config_set_day_start_minute (gint day_start_min)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_START_MINUTE, day_start_min, NULL);
}
-guint
-calendar_config_add_notification_day_start_minute (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_START_MINUTE, func, data, NULL, NULL);
-
- return id;
-}
-
gint
calendar_config_get_day_end_hour (void)
{
@@ -514,18 +274,6 @@ calendar_config_set_day_end_hour (gint day_end_hour)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_END_HOUR, day_end_hour, NULL);
}
-guint
-calendar_config_add_notification_day_end_hour (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_END_HOUR, func, data, NULL, NULL);
-
- return id;
-}
-
gint
calendar_config_get_day_end_minute (void)
{
@@ -542,18 +290,6 @@ calendar_config_set_day_end_minute (gint day_end_min)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_END_MINUTE, day_end_min, NULL);
}
-guint
-calendar_config_add_notification_day_end_minute (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_END_MINUTE, func, data, NULL, NULL);
-
- return id;
-}
-
/* The time divisions in the Day/Work-Week view in minutes (5/10/15/30/60). */
gint
calendar_config_get_time_divisions (void)
@@ -612,66 +348,6 @@ calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc fun
return id;
}
-/* Whether we show the Marcus Bains Line (current time), and in what colors. */
-void
-calendar_config_get_marcus_bains (gboolean *show_line, const gchar **dayview_color, const gchar **timebar_color)
-{
- static gchar *dcolor = NULL, *tcolor = NULL;
-
- calendar_config_init ();
-
- if (dcolor)
- g_free (dcolor);
- if (tcolor)
- g_free (tcolor);
-
- dcolor = gconf_client_get_string (config, CALENDAR_CONFIG_MARCUS_BAINS_COLOR_DAYVIEW, NULL);
- tcolor = gconf_client_get_string (config, CALENDAR_CONFIG_MARCUS_BAINS_COLOR_TIMEBAR, NULL);
-
- *show_line = gconf_client_get_bool (config, CALENDAR_CONFIG_MARCUS_BAINS_LINE, NULL);
- *dayview_color = dcolor;
- *timebar_color = tcolor;
-}
-
-void
-calendar_config_add_notification_marcus_bains (GConfClientNotifyFunc func, gpointer data, gint *not_show, gint *not_dcolor, gint *not_tcolor)
-{
- calendar_config_init ();
-
- *not_show = gconf_client_notify_add (config, CALENDAR_CONFIG_MARCUS_BAINS_LINE, func, data, NULL, NULL);
- *not_dcolor = gconf_client_notify_add (config, CALENDAR_CONFIG_MARCUS_BAINS_COLOR_DAYVIEW, func, data, NULL, NULL);
- *not_tcolor = gconf_client_notify_add (config, CALENDAR_CONFIG_MARCUS_BAINS_COLOR_TIMEBAR, func, data, NULL, NULL);
-}
-
-/* Whether we show week number in the Day View. */
-gboolean
-calendar_config_get_dview_show_week_no (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_DV_WEEK_NUMBER, NULL);
-}
-
-void
-calendar_config_set_dview_show_week_no (gboolean show_week_no)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_DV_WEEK_NUMBER, show_week_no, NULL);
-}
-
-guint
-calendar_config_add_notification_dview_show_week_no (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DV_WEEK_NUMBER, func, data, NULL, NULL);
-
- return id;
-}
-
/* Whether we show week numbers in the Date Navigator. */
gboolean
calendar_config_get_dnav_show_week_no (void)
@@ -681,14 +357,6 @@ calendar_config_get_dnav_show_week_no (void)
return gconf_client_get_bool (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, NULL);
}
-void
-calendar_config_set_dnav_show_week_no (gboolean show_week_no)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, show_week_no, NULL);
-}
-
guint
calendar_config_add_notification_dnav_show_week_no (GConfClientNotifyFunc func, gpointer data)
{
@@ -702,14 +370,6 @@ calendar_config_add_notification_dnav_show_week_no (GConfClientNotifyFunc func,
}
/* The positions of the panes in the normal and month views. */
-gint
-calendar_config_get_hpane_pos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_int (config, CALENDAR_CONFIG_HPANE_POS, NULL);
-}
-
void
calendar_config_set_hpane_pos (gint hpane_pos)
{
@@ -718,58 +378,6 @@ calendar_config_set_hpane_pos (gint hpane_pos)
gconf_client_set_int (config, CALENDAR_CONFIG_HPANE_POS, hpane_pos, NULL);
}
-gint
-calendar_config_get_vpane_pos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_int (config, CALENDAR_CONFIG_VPANE_POS, NULL);
-}
-
-void
-calendar_config_set_vpane_pos (gint vpane_pos)
-{
- calendar_config_init ();
-
- gconf_client_set_int (config, CALENDAR_CONFIG_VPANE_POS, vpane_pos, NULL);
-}
-
-gboolean
-calendar_config_get_preview_state (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_TASK_PREVIEW, NULL);
-}
-
-void
-calendar_config_set_preview_state (gboolean state)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_TASK_PREVIEW, state, NULL);
-}
-
-guint
-calendar_config_add_notification_preview_state (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASK_PREVIEW, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-calendar_config_get_month_hpane_pos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_int (config, CALENDAR_CONFIG_MONTH_HPANE_POS, NULL);
-}
-
void
calendar_config_set_month_hpane_pos (gint hpane_pos)
{
@@ -778,38 +386,6 @@ calendar_config_set_month_hpane_pos (gint hpane_pos)
gconf_client_set_int (config, CALENDAR_CONFIG_MONTH_HPANE_POS, hpane_pos, NULL);
}
-gint
-calendar_config_get_month_vpane_pos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_int (config, CALENDAR_CONFIG_MONTH_VPANE_POS, NULL);
-}
-
-void
-calendar_config_set_month_vpane_pos (gint vpane_pos)
-{
- calendar_config_init ();
-
- gconf_client_set_int (config, CALENDAR_CONFIG_MONTH_VPANE_POS, vpane_pos, NULL);
-}
-
-gfloat
-calendar_config_get_tag_vpane_pos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_float (config, CALENDAR_CONFIG_TAG_VPANE_POS, NULL);
-}
-
-void
-calendar_config_set_tag_vpane_pos (gfloat vpane_pos)
-{
- calendar_config_init ();
-
- gconf_client_set_float (config, CALENDAR_CONFIG_TAG_VPANE_POS, vpane_pos, NULL);
-}
-
/* The current list of task lists selected */
GSList *
calendar_config_get_tasks_selected (void)
@@ -839,51 +415,6 @@ calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpo
return id;
}
-/* The primary task list */
-gchar *
-calendar_config_get_primary_tasks (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_TASKS, NULL);
-}
-
-void
-calendar_config_set_primary_tasks (const gchar *primary_uid)
-{
- calendar_config_init ();
-
- 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;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_TASKS, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-calendar_config_get_task_vpane_pos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_int (config, CALENDAR_CONFIG_TASK_VPANE_POS, NULL);
-}
-
-void
-calendar_config_set_task_vpane_pos (gint vpane_pos)
-{
- calendar_config_init ();
-
- gconf_client_set_int (config, CALENDAR_CONFIG_TASK_VPANE_POS, vpane_pos, NULL);
-}
-
/***************************************/
/* The current list of memo lists selected */
@@ -915,34 +446,6 @@ calendar_config_add_notification_memos_selected (GConfClientNotifyFunc func, gpo
return id;
}
-/* The primary memo list */
-gchar *
-calendar_config_get_primary_memos (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_MEMOS, NULL);
-}
-
-void
-calendar_config_set_primary_memos (const gchar *primary_uid)
-{
- calendar_config_init ();
-
- gconf_client_set_string (config, CALENDAR_CONFIG_PRIMARY_MEMOS, primary_uid, NULL);
-}
-
-guint
-calendar_config_add_notification_primary_memos (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_MEMOS, func, data, NULL, NULL);
-
- return id;
-}
/***************************************/
/* Whether we compress the weekend in the week/month views. */
@@ -954,55 +457,6 @@ calendar_config_get_compress_weekend (void)
return gconf_client_get_bool (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, NULL);
}
-void
-calendar_config_set_compress_weekend (gboolean compress)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, compress, NULL);
-}
-
-guint
-calendar_config_add_notification_compress_weekend (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, func, data, NULL, NULL);
-
- return id;
-}
-
-/* Whether we show event end times. */
-gboolean
-calendar_config_get_show_event_end (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_EVENT_END, NULL);
-}
-
-void
-calendar_config_set_show_event_end (gboolean show_end)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_EVENT_END, show_end, NULL);
-}
-
-guint
-calendar_config_add_notification_show_event_end (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_SHOW_EVENT_END, func, data, NULL, NULL);
-
- return id;
-}
-
/* The working days of the week, a bit-wise combination of flags. */
CalWeekdays
calendar_config_get_working_days (void)
@@ -1012,14 +466,6 @@ calendar_config_get_working_days (void)
return gconf_client_get_int (config, CALENDAR_CONFIG_WORKING_DAYS, NULL);
}
-void
-calendar_config_set_working_days (CalWeekdays days)
-{
- calendar_config_init ();
-
- gconf_client_set_int (config, CALENDAR_CONFIG_WORKING_DAYS, days, NULL);
-}
-
guint
calendar_config_add_notification_working_days (GConfClientNotifyFunc func, gpointer data)
{
@@ -1049,18 +495,6 @@ calendar_config_set_hide_completed_tasks (gboolean hide)
gconf_client_set_bool (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED, hide, NULL);
}
-guint
-calendar_config_add_notification_hide_completed_tasks (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED , func, data, NULL, NULL);
-
- return id;
-}
-
CalUnits
calendar_config_get_hide_completed_tasks_units (void)
{
@@ -1106,18 +540,6 @@ calendar_config_set_hide_completed_tasks_units (CalUnits cu)
g_free (units);
}
-guint
-calendar_config_add_notification_hide_completed_tasks_units (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS , func, data, NULL, NULL);
-
- return id;
-}
-
gint
calendar_config_get_hide_completed_tasks_value (void)
{
@@ -1134,18 +556,6 @@ calendar_config_set_hide_completed_tasks_value (gint value)
gconf_client_set_int (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE, value, NULL);
}
-guint
-calendar_config_add_notification_hide_completed_tasks_value (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE , func, data, NULL, NULL);
-
- return id;
-}
-
/**
* calendar_config_get_confirm_delete:
*
@@ -1163,162 +573,6 @@ calendar_config_get_confirm_delete (void)
}
/**
- * calendar_config_set_confirm_delete:
- * @confirm: Whether confirmation is required when deleting items.
- *
- * Sets the configuration value for whether a confirmation dialog is presented
- * when deleting calendar/tasks items.
- **/
-void
-calendar_config_set_confirm_delete (gboolean confirm)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_PROMPT_DELETE, confirm, NULL);
-}
-
-/**
- * calendar_config_get_confirm_purge:
- *
- * Queries the configuration value for whether a confirmation dialog is
- * presented when purging calendar/tasks items.
- *
- * Return value: Whether confirmation is required when purging items.
- **/
-gboolean
-calendar_config_get_confirm_purge (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_bool (config, CALENDAR_CONFIG_PROMPT_PURGE, NULL);
-}
-
-/**
- * calendar_config_set_confirm_purge:
- * @confirm: Whether confirmation is required when purging items.
- *
- * Sets the configuration value for whether a confirmation dialog is presented
- * when purging calendar/tasks items.
- **/
-void
-calendar_config_set_confirm_purge (gboolean confirm)
-{
- calendar_config_init ();
-
- gconf_client_set_bool (config, CALENDAR_CONFIG_PROMPT_PURGE, confirm, NULL);
-}
-
-/**
- * calendar_config_get_tasks_due_today_color:
- * @color: the location to store the color
- *
- * Queries the color to be used to display tasks that are due today.
- **/
-void
-calendar_config_get_tasks_due_today_color (GdkColor *color)
-{
- const gchar *key = CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR;
- GError *error = NULL;
- gchar *color_spec;
-
- g_return_if_fail (color != NULL);
-
- calendar_config_init ();
-
- color_spec = gconf_client_get_string (config, key, &error);
-
- if (color_spec != NULL && !gdk_color_parse (color_spec, color))
- g_warning ("Unknown color \"%s\"", color_spec);
- else if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-
- g_free (color_spec);
-}
-
-/**
- * calendar_config_set_tasks_due_today_color:
- * @color: a #GdkColor
- *
- * Sets the color to be used to display tasks that are due today.
- **/
-void
-calendar_config_set_tasks_due_today_color (GdkColor *color)
-{
- const gchar *key = CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR;
- GError *error = NULL;
- gchar color_spec[16];
-
- g_return_if_fail (color != NULL);
-
- g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
- color->red, color->green, color->blue);
-
- calendar_config_init ();
-
- if (!gconf_client_set_string (config, key, color_spec, &error)) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-}
-
-/**
- * calendar_config_get_tasks_overdue_color:
- * @color: the location to store the color
- *
- * Queries the color to be used to display overdue tasks.
- **/
-void
-calendar_config_get_tasks_overdue_color (GdkColor *color)
-{
- const gchar *key = CALENDAR_CONFIG_TASKS_OVERDUE_COLOR;
- GError *error = NULL;
- gchar *color_spec;
-
- g_return_if_fail (color != NULL);
-
- calendar_config_init ();
-
- color_spec = gconf_client_get_string (config, key, &error);
-
- if (color_spec != NULL && !gdk_color_parse (color_spec, color))
- g_warning ("Unknown color \"%s\"", color_spec);
- else if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-
- g_free (color_spec);
-}
-
-/**
- * calendar_config_set_tasks_overdue_color:
- * @color: a #GdkColor
- *
- * Sets the color to be used to display overdue tasks.
- **/
-void
-calendar_config_set_tasks_overdue_color (GdkColor *color)
-{
- const gchar *key = CALENDAR_CONFIG_TASKS_OVERDUE_COLOR;
- GError *error = NULL;
- gchar color_spec[16];
-
- g_return_if_fail (color != NULL);
-
- g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
- color->red, color->green, color->blue);
-
- calendar_config_init ();
-
- if (!gconf_client_set_string (config, key, color_spec, &error)) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-}
-
-/**
* calendar_config_get_use_default_reminder:
*
* Queries whether new appointments should be created with a default reminder.
@@ -1540,36 +794,6 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
return sexp;
}
-gchar *
-calendar_config_get_free_busy_template (void)
-{
- calendar_config_init ();
-
- return gconf_client_get_string (config, CALENDAR_CONFIG_TEMPLATE, NULL);
-}
-
-void
-calendar_config_set_free_busy_template (const gchar *template)
-{
- calendar_config_init ();
-
- gconf_client_set_string (config, CALENDAR_CONFIG_TEMPLATE, template, NULL);
-}
-
-guint
-calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc func,
- gpointer data)
-{
- guint id;
-
- calendar_config_init ();
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TEMPLATE, func, data,
- NULL, NULL);
-
- return id;
-}
-
void
calendar_config_set_dir_path (const gchar *path)
{