aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/cal-prefs-dialog.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-06-20 10:45:03 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-06-20 10:45:03 +0800
commitc9e9b9a7bd01883daf4ac57e83233aae40bf1439 (patch)
tree0b643f97f41de9355181a2382766597affba8069 /calendar/gui/dialogs/cal-prefs-dialog.c
parent9a4a29271b96abd78516fde1c5dda1eea8552251 (diff)
downloadgsoc2013-evolution-c9e9b9a7bd01883daf4ac57e83233aae40bf1439.tar.gz
gsoc2013-evolution-c9e9b9a7bd01883daf4ac57e83233aae40bf1439.tar.zst
gsoc2013-evolution-c9e9b9a7bd01883daf4ac57e83233aae40bf1439.zip
added a 'Time zone' setting. Also rearranged a little, adding a new
2001-06-19 Damon Chaplin <damon@ximian.com> * gui/dialogs/cal-prefs-dialog.c: added a 'Time zone' setting. Also rearranged a little, adding a new 'General' page, since we had too many settings on the 'Calendar' page. * gui/e-timezone-entry.[hc]: * gui/dialogs/e-timezone-dialog.[hc]: * gui/dialogs/comp-editor.c: * gui/dialogs/comp-editor-page.[hc]: * gui/dialogs/event-page.c: * gui/dialogs/task-details-page.c: * gui/dialogs/task-page.c: removed CalClient stuff. The timezone dialog now uses the timezone data directly from the client's libical library. svn path=/trunk/; revision=10321
Diffstat (limited to 'calendar/gui/dialogs/cal-prefs-dialog.c')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 9839318e8e..df030eddd6 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -33,18 +33,20 @@
#include <gal/util/e-util.h>
#include <e-util/e-dialog-widgets.h>
#include <widgets/misc/e-dateedit.h>
+#include "../e-timezone-entry.h"
#include "cal-prefs-dialog.h"
#include "../calendar-config.h"
#include "../calendar-commands.h"
#include "../e-tasks.h"
-typedef struct {
+struct _CalPrefsDialogPrivate {
/* Glade XML data */
GladeXML *xml;
GtkWidget *dialog;
+ GtkWidget *timezone;
GtkWidget *working_days[7];
GtkWidget *week_start_day;
GtkWidget *start_of_day;
@@ -55,7 +57,7 @@ typedef struct {
GtkWidget *show_end_times;
GtkWidget *compress_weekend;
GtkWidget *dnav_show_week_no;
-} CalPrefsDialogPrivate;
+};
static const int week_start_day_map[] = {
1, 2, 3, 4, 5, 6, 0, -1
@@ -196,6 +198,7 @@ get_widgets (CalPrefsDialog *prefs)
priv->working_days[5] = GW ("fri_button");
priv->working_days[6] = GW ("sat_button");
+ priv->timezone = GW ("timezone");
priv->week_start_day = GW ("first_day_of_week");
priv->start_of_day = GW ("start_of_day");
priv->end_of_day = GW ("end_of_day");
@@ -209,6 +212,7 @@ get_widgets (CalPrefsDialog *prefs)
#undef GW
return (priv->dialog
+ && priv->timezone
&& priv->working_days[0]
&& priv->working_days[1]
&& priv->working_days[2]
@@ -347,9 +351,15 @@ cal_prefs_dialog_show_config (CalPrefsDialog *prefs)
CalPrefsDialogPrivate *priv;
CalWeekdays working_days;
gint mask, day, week_start_day, time_divisions;
+ char *zone;
priv = prefs->priv;
+ /* Timezone. */
+ zone = calendar_config_get_timezone ();
+ e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->timezone),
+ zone ? zone : "");
+
/* Working Days. */
working_days = calendar_config_get_working_days ();
mask = 1 << 0;
@@ -403,9 +413,14 @@ cal_prefs_dialog_update_config (CalPrefsDialog *prefs)
CalPrefsDialogPrivate *priv;
CalWeekdays working_days;
gint mask, day, week_start_day, time_divisions, hour, minute;
+ char *zone;
priv = prefs->priv;
+ /* Timezone. */
+ zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->timezone));
+ calendar_config_set_timezone (zone);
+
/* Working Days. */
working_days = 0;
mask = 1 << 0;