diff options
author | Damon Chaplin <damon@ximian.com> | 2001-06-19 13:23:16 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-06-19 13:23:16 +0800 |
commit | 84dc93b8de0c5944982f66559bfc1cc74edb19db (patch) | |
tree | 92a9e795070ea5eec32eed0bae87020c98f85245 /calendar/gui/calendar-config.c | |
parent | 15d3afd9d6efcc62264d8de14f2272b41c1f6891 (diff) | |
download | gsoc2013-evolution-84dc93b8de0c5944982f66559bfc1cc74edb19db.tar.gz gsoc2013-evolution-84dc93b8de0c5944982f66559bfc1cc74edb19db.tar.zst gsoc2013-evolution-84dc93b8de0c5944982f66559bfc1cc74edb19db.zip |
added timezone fields. Also moved the 'All Day' flag into an alignment so
2001-06-19 Damon Chaplin <damon@ximian.com>
* gui/dialogs/task-details-page.glade:
* gui/dialogs/task-page.glade:
* gui/dialogs/event-page.glade: added timezone fields. Also moved the
'All Day' flag into an alignment so it doesn't mess up the height of
the other widgets.
* gui/dialogs/task-details-page.c:
* gui/dialogs/task-page.c:
* gui/dialogs/event-page.c: added code to handle the timezone fields.
This still needs to be hooked up when the libical code is finished.
* gui/dialogs/e-timezone-dialog.c (on_map_leave): new function to
clear the preview label and turn off the highlighted point on the
map when you move the mouse outside it.
(find_selected_point): new function to try to find the point
corresponding to the text in the combo.
(on_combo_changed): call the above function to update the selected
point.
(on_map_leave): turn off the preview point & label when the mouse
leaves the map.
(e_timezone_dialog_set_cal_client): changed it so that selecting "None"
clears the entry.
* gui/dialogs/comp-editor-page.[hc]: added set_cal_client() virtual
method since some pages need to access the CalClient to get timezone
information. Also added comp_editor_page_set_cal_client() to call
the virtual method.
* gui/dialogs/comp-editor.c (comp_editor_set_cal_client): called
comp_editor_page_set_cal_client() on each page.
* gui/calendar-config.c: added functions to get & set the timezone.
svn path=/trunk/; revision=10285
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r-- | calendar/gui/calendar-config.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 1446783c3c..a11e0d32b7 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -36,6 +36,7 @@ typedef struct { + gchar *timezone; CalWeekdays working_days; gboolean use_24_hour_format; gint week_start_day; @@ -84,6 +85,7 @@ config_read (void) gnome_config_push_prefix (prefix); g_free (prefix); + config->timezone = gnome_config_get_string ("Timezone"); config->working_days = gnome_config_get_int_with_default ("WorkingDays", &is_default); if (is_default) { config->working_days = CAL_MONDAY | CAL_TUESDAY @@ -133,6 +135,8 @@ calendar_config_write (void) gnome_config_push_prefix (prefix); g_free (prefix); + if (config->timezone) + gnome_config_set_string ("Timezone", config->timezone); gnome_config_set_int ("WorkingDays", config->working_days); gnome_config_set_bool ("Use24HourFormat", config->use_24_hour_format); gnome_config_set_int ("WeekStartDay", config->week_start_day); @@ -190,6 +194,29 @@ calendar_config_write_on_exit (void) * Calendar Settings. */ +/* 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) +{ + return config->timezone; +} + + +/* Sets the timezone. You shouldn't really set it to the empty string or NULL, + as this means that Evolution will show the timezone-setting dialog to ask + the user for the timezone. */ +void +calendar_config_set_timezone (gchar *timezone) +{ + if (timezone && timezone[0]) + config->timezone = timezone; + else + config->timezone = NULL; +} + + /* Whether we use 24-hour format or 12-hour format (AM/PM). */ gboolean calendar_config_get_24_hour_format (void) |