aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2003-02-24 10:59:24 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-02-24 10:59:24 +0800
commitee568bb74f887c3322f0729dedb81a1abdd6c025 (patch)
treeaba309254a92c141b1c66070313b197e7cacc338 /calendar/gui/calendar-config.c
parentff5e6a90aae6652a188903d589395775d79b11b4 (diff)
downloadgsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.tar
gsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.tar.gz
gsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.tar.bz2
gsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.tar.lz
gsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.tar.xz
gsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.tar.zst
gsoc2013-evolution-ee568bb74f887c3322f0729dedb81a1abdd6c025.zip
gconf settings upgrades
svn path=/trunk/; revision=20018
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c123
1 files changed, 57 insertions, 66 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 0b3d5377d0..9147ef8f16 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -118,7 +118,7 @@ calendar_config_get_timezone (void)
g_free (timezone);
timezone = e_config_listener_get_string_with_default (config,
- "/apps/Evolution/Calendar/Display/Timezone",
+ "/apps/evolution/calendar/display/timezone",
"UTC", NULL);
if (!timezone)
timezone = g_strdup ("UTC");
@@ -133,9 +133,9 @@ void
calendar_config_set_timezone (gchar *timezone)
{
if (timezone && timezone[0])
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Display/Timezone", timezone);
+ e_config_listener_set_string (config, "/apps/evolution/calendar/display/timezone", timezone);
else
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Display/Timezone", "UTC");
+ e_config_listener_set_string (config, "/apps/evolution/calendar/display/timezone", "UTC");
}
@@ -149,7 +149,7 @@ calendar_config_get_24_hour_format (void)
to use 24-hour format, or strftime()/strptime() won't work. */
if (calendar_config_locale_supports_12_hour_format ()) {
return e_config_listener_get_boolean_with_default (
- config, "/apps/Evolution/Calendar/Display/Use24HourFormat", FALSE, NULL);
+ config, "/apps/evolution/calendar/display/use_24hour_format", FALSE, NULL);
}
return TRUE;
@@ -159,7 +159,7 @@ calendar_config_get_24_hour_format (void)
void
calendar_config_set_24_hour_format (gboolean use_24_hour)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Display/Use24HourFormat", use_24_hour);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/display/use_24hour_format", use_24_hour);
}
@@ -167,14 +167,14 @@ calendar_config_set_24_hour_format (gboolean use_24_hour)
gint
calendar_config_get_week_start_day (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Display/WeekStartDay", 1, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/week_start_day", 1, NULL);
}
void
calendar_config_set_week_start_day (gint week_start_day)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/WeekStartDay", week_start_day);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/week_start_day", week_start_day);
}
@@ -182,56 +182,56 @@ calendar_config_set_week_start_day (gint week_start_day)
gint
calendar_config_get_day_start_hour (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Display/DayStartHour", 9, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/day_start_hour", 9, NULL);
}
void
calendar_config_set_day_start_hour (gint day_start_hour)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/DayStartHour", day_start_hour);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/day_start_hour", day_start_hour);
}
gint
calendar_config_get_day_start_minute (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Display/DayStartMinute", 0, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/day_start_minute", 0, NULL);
}
void
calendar_config_set_day_start_minute (gint day_start_min)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/DayStartMinute", day_start_min);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/day_start_minute", day_start_min);
}
gint
calendar_config_get_day_end_hour (void)
{
- return e_config_listener_get_long_with_default (config, "/Calendar/Display/DayEndHour", 17, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/day_end_hour", 17, NULL);
}
void
calendar_config_set_day_end_hour (gint day_end_hour)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/DayEndHour", day_end_hour);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/day_end_hour", day_end_hour);
}
gint
calendar_config_get_day_end_minute (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Display/DayEndMinute", 0, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/day_end_minute", 0, NULL);
}
void
calendar_config_set_day_end_minute (gint day_end_min)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/DayEndMinute", day_end_min);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/day_end_minute", day_end_min);
}
@@ -239,14 +239,14 @@ calendar_config_set_day_end_minute (gint day_end_min)
gint
calendar_config_get_time_divisions (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Display/TimeDivisions", 30, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/time_divisions", 30, NULL);
}
void
calendar_config_set_time_divisions (gint divisions)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/TimeDivisions", divisions);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/time_divisions", divisions);
}
@@ -254,14 +254,14 @@ calendar_config_set_time_divisions (gint divisions)
gboolean
calendar_config_get_dnav_show_week_no (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/DateNavigator/ShowWeekNumbers", FALSE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/date_navigator/show_week_numbers", FALSE, NULL);
}
void
calendar_config_set_dnav_show_week_no (gboolean show_week_no)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/DateNavigator/ShowWeekNumbers", show_week_no);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/date_navigator/show_week_numbers", show_week_no);
}
@@ -269,14 +269,14 @@ calendar_config_set_dnav_show_week_no (gboolean show_week_no)
gint
calendar_config_get_default_view (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Display/View", 0, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/display/view", 0, NULL);
}
void
calendar_config_set_default_view (gint view)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/View", view);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/default_view", view);
}
@@ -285,7 +285,7 @@ gfloat
calendar_config_get_hpane_pos (void)
{
return e_config_listener_get_float_with_default (config,
- "/apps/Evolution/Calendar/Display/HPanePosition",
+ "/apps/evolution/calendar/display/hpane_position",
1.0, NULL);
}
@@ -293,49 +293,49 @@ calendar_config_get_hpane_pos (void)
void
calendar_config_set_hpane_pos (gfloat hpane_pos)
{
- e_config_listener_set_float (config, "/apps/Evolution/Calendar/Display/HPanePosition", hpane_pos);
+ e_config_listener_set_float (config, "/apps/evolution/calendar/display/hpane_position", hpane_pos);
}
gfloat
calendar_config_get_vpane_pos (void)
{
- return e_config_listener_get_float_with_default (config, "/apps/Evolution/Calendar/Display/VPanePosition", 1.0, NULL);
+ return e_config_listener_get_float_with_default (config, "/apps/evolution/calendar/display/vpane_position", 1.0, NULL);
}
void
calendar_config_set_vpane_pos (gfloat vpane_pos)
{
- e_config_listener_set_float (config, "/apps/Evolution/Calendar/Display/VPanePosition", vpane_pos);
+ e_config_listener_set_float (config, "/apps/evolution/calendar/display/vpane_position", vpane_pos);
}
gfloat
calendar_config_get_month_hpane_pos (void)
{
- return e_config_listener_get_float_with_default (config, "/apps/Evolution/Calendar/Display/MonthHPanePosition", 0.0, NULL);
+ return e_config_listener_get_float_with_default (config, "/apps/evolution/calendar/display/month_hpane_position", 0.0, NULL);
}
void
calendar_config_set_month_hpane_pos (gfloat hpane_pos)
{
- e_config_listener_set_float (config, "/apps/Evolution/Calendar/Display/MonthHPanePosition", hpane_pos);
+ e_config_listener_set_float (config, "/apps/evolution/calendar/display/month_hpane_position", hpane_pos);
}
gfloat
calendar_config_get_month_vpane_pos (void)
{
- return e_config_listener_get_float_with_default (config, "/apps/Evolution/Calendar/Display/MonthVPanePosition", 1.0, NULL);
+ return e_config_listener_get_float_with_default (config, "/apps/evolution/calendar/display/month_vpane_position", 1.0, NULL);
}
void
calendar_config_set_month_vpane_pos (gfloat vpane_pos)
{
- e_config_listener_set_float (config, "/apps/Evolution/Calendar/Display/MonthVPanePosition", vpane_pos);
+ e_config_listener_set_float (config, "/apps/evolution/calendar/display/month_vpane_position", vpane_pos);
}
@@ -343,14 +343,14 @@ calendar_config_set_month_vpane_pos (gfloat vpane_pos)
gboolean
calendar_config_get_compress_weekend (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/Display/CompressWeekend", TRUE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/display/compress_weekend", TRUE, NULL);
}
void
calendar_config_set_compress_weekend (gboolean compress)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Display/CompressWeekend", compress);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/display/compress_weekend", compress);
}
@@ -358,14 +358,14 @@ calendar_config_set_compress_weekend (gboolean compress)
gboolean
calendar_config_get_show_event_end (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/Display/ShowEventEndTime", TRUE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/display/show_event_end", TRUE, NULL);
}
void
calendar_config_set_show_event_end (gboolean show_end)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Display/ShowEventEndTime", show_end);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/display/show_event_end", show_end);
}
@@ -374,7 +374,7 @@ CalWeekdays
calendar_config_get_working_days (void)
{
return e_config_listener_get_long_with_default (config,
- "/Calendar/Display/WorkingDays", CAL_MONDAY | CAL_TUESDAY |
+ "/apps/evolution/calendar/display/working_days", CAL_MONDAY | CAL_TUESDAY |
CAL_WEDNESDAY | CAL_THURSDAY | CAL_FRIDAY, NULL);
}
@@ -382,7 +382,7 @@ calendar_config_get_working_days (void)
void
calendar_config_set_working_days (CalWeekdays days)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Display/WorkingDays", days);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/display/working_days", days);
}
@@ -390,14 +390,14 @@ calendar_config_set_working_days (CalWeekdays days)
gboolean
calendar_config_get_hide_completed_tasks (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/Tasks/HideCompletedTasks", FALSE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/tasks/hide_completed", FALSE, NULL);
}
void
calendar_config_set_hide_completed_tasks (gboolean hide)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Tasks/HideCompletedTasks", hide);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/tasks/hide_completed", hide);
}
@@ -407,7 +407,7 @@ calendar_config_get_hide_completed_tasks_units (void)
char *units;
CalUnits cu;
- units = e_config_listener_get_string_with_default (config, "/apps/Evolution/Calendar/Tasks/HideCompletedTasksUnits", "days", NULL);
+ units = e_config_listener_get_string_with_default (config, "/apps/evolution/calendar/tasks/hide_completed_units", "days", NULL);
if (!strcmp (units, "minutes"))
cu = CAL_MINUTES;
@@ -438,7 +438,7 @@ calendar_config_set_hide_completed_tasks_units (CalUnits cu)
units = g_strdup ("days");
}
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Tasks/HideCompletedTasksUnits", units);
+ e_config_listener_set_string (config, "/apps/evolution/calendar/tasks/hide_completed_sunits", units);
g_free (units);
}
@@ -447,14 +447,14 @@ calendar_config_set_hide_completed_tasks_units (CalUnits cu)
gint
calendar_config_get_hide_completed_tasks_value (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Tasks/HideCompletedTasksValue", 1, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/tasks/hide_completed_value", 1, NULL);
}
void
calendar_config_set_hide_completed_tasks_value (gint value)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Tasks/HideCompletedTasksValue", value);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/tasks/hide_completed_value", value);
}
/**
@@ -468,7 +468,7 @@ calendar_config_set_hide_completed_tasks_value (gint value)
gboolean
calendar_config_get_confirm_delete (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/Other/ConfirmDelete", TRUE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/prompts/confirm_delete", TRUE, NULL);
}
/**
@@ -481,7 +481,7 @@ calendar_config_get_confirm_delete (void)
void
calendar_config_set_confirm_delete (gboolean confirm)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Other/ConfirmDelete", confirm);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/prompts/confirm_delete", confirm);
}
/**
@@ -495,7 +495,7 @@ calendar_config_set_confirm_delete (gboolean confirm)
gboolean
calendar_config_get_confirm_expunge (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/Other/ConfirmExpunge", TRUE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/prompts/confirm_expunge", TRUE, NULL);
}
/**
@@ -508,7 +508,7 @@ calendar_config_get_confirm_expunge (void)
void
calendar_config_set_confirm_expunge (gboolean confirm)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Other/ConfirmExpunge", confirm);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/prompts/confirm_expunge", confirm);
}
/* This sets all the common config settings for an ECalendar widget.
@@ -720,7 +720,7 @@ calendar_config_get_tasks_due_today_color (void)
if (color)
g_free (color);
- color = e_config_listener_get_string_with_default (config, "/apps/Evolution/Calendar/Tasks/Colors/TasksDueToday", "blue", NULL);
+ color = e_config_listener_get_string_with_default (config, "/apps/evolution/calendar/tasks/colors/due_today", "blue", NULL);
return color;
}
@@ -735,7 +735,7 @@ calendar_config_set_tasks_due_today_color (const char *color)
{
g_return_if_fail (color != NULL);
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Tasks/Colors/TasksDueToday", color);
+ e_config_listener_set_string (config, "/apps/evolution/calendar/tasks/colors/due_today", color);
}
/**
@@ -753,7 +753,7 @@ calendar_config_get_tasks_overdue_color (void)
if (color)
g_free (color);
- color = e_config_listener_get_string_with_default (config, "/apps/Evolution/Calendar/Tasks/Colors/TasksOverdue", "red", NULL);
+ color = e_config_listener_get_string_with_default (config, "/apps/evolution/calendar/tasks/colors/overdue", "red", NULL);
return color;
}
@@ -768,7 +768,7 @@ calendar_config_set_tasks_overdue_color (const char *color)
{
g_return_if_fail (color != NULL);
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Tasks/Colors/TasksOverdue", color);
+ e_config_listener_set_string (config, "/apps/evolution/calendar/tasks/colors/overdue", color);
}
/**
@@ -784,7 +784,7 @@ calendar_config_set_tasks_overdue_color (const char *color)
gboolean
calendar_config_get_use_default_reminder (void)
{
- return e_config_listener_get_boolean_with_default (config, "/apps/Evolution/Calendar/Other/UseDefaultReminder", FALSE, NULL);
+ return e_config_listener_get_boolean_with_default (config, "/apps/evolution/calendar/other/use_default_reminder", FALSE, NULL);
}
/**
@@ -797,7 +797,7 @@ calendar_config_get_use_default_reminder (void)
void
calendar_config_set_use_default_reminder (gboolean value)
{
- e_config_listener_set_boolean (config, "/apps/Evolution/Calendar/Other/UseDefaultReminder", value);
+ e_config_listener_set_boolean (config, "/apps/evolution/calendar/other/use_default_reminder", value);
}
/**
@@ -811,7 +811,7 @@ calendar_config_set_use_default_reminder (gboolean value)
int
calendar_config_get_default_reminder_interval (void)
{
- return e_config_listener_get_long_with_default (config, "/apps/Evolution/Calendar/Other/DefaultReminderInterval", 15, NULL);
+ return e_config_listener_get_long_with_default (config, "/apps/evolution/calendar/other/default_reminder_interval", 15, NULL);
}
/**
@@ -824,7 +824,7 @@ calendar_config_get_default_reminder_interval (void)
void
calendar_config_set_default_reminder_interval (int interval)
{
- e_config_listener_set_long (config, "/apps/Evolution/Calendar/Other/DefaultReminderInterval", interval);
+ e_config_listener_set_long (config, "/apps/evolution/calendar/other/default_reminder_interval", interval);
}
/**
@@ -841,7 +841,7 @@ calendar_config_get_default_reminder_units (void)
char *units;
CalUnits cu;
- units = e_config_listener_get_string_with_default (config, "/apps/Evolution/Calendar/Other/DefaultReminderUnits", "minutes", NULL);
+ units = e_config_listener_get_string_with_default (config, "/apps/evolution/calendar/other/default_reminder_units", "minutes", NULL);
if (!strcmp (units, "days"))
cu = CAL_DAYS;
@@ -866,16 +866,7 @@ calendar_config_get_default_reminder_units (void)
void
calendar_config_set_default_reminder_units (CalUnits units)
{
- switch (units) {
- case CAL_DAYS :
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Other/DefaultReminderUnits", "days");
- break;
- case CAL_HOURS :
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Other/DefaultReminderUnits", "hours");
- break;
- default :
- e_config_listener_set_string (config, "/apps/Evolution/Calendar/Other/DefaultReminderUnits", "minutes");
- }
+ e_config_listener_set_string (config, "/apps/evolution/calendar/other/default_reminder_units", units_to_string(units));
}
/**
@@ -943,7 +934,7 @@ calendar_config_default_calendar_folder (void)
{
char *uri;
- uri = e_config_listener_get_string_with_default (config, "/apps/Evolution/DefaultFolders/calendar_uri", NULL, NULL);
+ uri = e_config_listener_get_string_with_default (config, "/apps/evolution/shell/default_folders/calendar_uri", NULL, NULL);
return uri;
}
@@ -952,7 +943,7 @@ calendar_config_default_tasks_folder (void)
{
char *uri;
- uri = e_config_listener_get_string_with_default (config, "/apps/Evolution/DefaultFolders/tasks_uri", NULL, NULL);
+ uri = e_config_listener_get_string_with_default (config, "/apps/evolution/shell/default_folders/tasks_uri", NULL, NULL);
return uri;
}