aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-11 11:56:03 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-11 11:56:03 +0800
commit0e6d346872289d1ee71cb7b1092b5229b11dab3e (patch)
tree588b9cbac780c577af5c56d020c98f2f3822b38f /calendar/gui/dialogs
parent552d3501e9bf05d42ce6f342e85a526a1cea702c (diff)
downloadgsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar
gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.gz
gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.bz2
gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.lz
gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.xz
gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.zst
gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.zip
more timezone updates. I'm pretty much done with the calendar code now,
2001-07-10 Damon Chaplin <damon@ximian.com> * gui/calendar-model.c: * gui/e-calendar-table.c: * gui/e-day-view-main-item.c: * gui/e-day-view-top-item.c: * gui/e-day-view.[hc]: * gui/e-week-view.c: * gui/gnome-cal.c: * gui/print.c: * gui/dialogs/cal-prefs-dialog.c: * gui/dialogs/comp-editor-util.c: * gui/dialogs/event-page.c: * pcs/cal-backend-file.c: * pcs/query.c: * cal-util/cal-component.[hc]: * cal-util/cal-recur.c: * cal-util/timeutil.[hc]: * cal-client/cal-client.[hc]: more timezone updates. I'm pretty much done with the calendar code now, except for alarms and conduits, which Federico and JP know more about. And there are a couple of other minor things to fix. But it is still pretty buggy. svn path=/trunk/; revision=10984
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c2
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c5
-rw-r--r--calendar/gui/dialogs/event-page.c7
3 files changed, 10 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 59acefc263..7176354a73 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -194,7 +194,7 @@ get_widgets (CalPrefsDialog *prefs)
priv->dialog = GW ("cal-prefs-dialog");
- /* The indices must match the mktime() values. */
+ /* The indices must be 0 (Sun) to 6 (Sat). */
priv->working_days[0] = GW ("sun_button");
priv->working_days[1] = GW ("mon_button");
priv->working_days[2] = GW ("tue_button");
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index dcad6a44cf..63dd407677 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -29,6 +29,7 @@
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <e-util/e-time-utils.h>
+#include <cal-util/timeutil.h>
#include "../calendar-config.h"
#include "comp-editor-util.h"
@@ -109,9 +110,7 @@ write_label_piece (struct icaltimetype *tt, char *buffer, int size,
tmp_tm.tm_sec = tt->second;
tmp_tm.tm_isdst = -1;
- /* Call mktime() to set the weekday. FIXME: Don't do this. mktime()
- could in theory adjust the time if it thought it was invalid. */
- mktime (&tmp_tm);
+ tmp_tm.tm_wday = time_day_of_week (tt->day, tt->month - 1, tt->year);
len = strlen (buffer);
e_time_format_date_and_time (&tmp_tm,
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 6b6736f041..5d0249bbd0 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -698,6 +698,7 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
&end_tt.minute);
g_assert (date_set);
+ /* FIXME: TIMEZONES. */
cmp = icaltime_compare (start_tt, end_tt);
if (cmp >= 0) {
if (cmp == 0 && start_tt.hour == 0
@@ -711,6 +712,9 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
} else if (GTK_WIDGET (dedit) == priv->start_time) {
/* Modify the end time, to be the start + 1 hour. */
+ /* FIXME: TIMEZONES - Probably want to leave the
+ timezone as it is, so we need to convert the time.*/
+
end_tt = start_tt;
icaltime_adjust (&end_tt, 0, 1, 0, 0);
@@ -728,6 +732,9 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
} else if (GTK_WIDGET (dedit) == priv->end_time) {
/* Modify the start time, to be the end - 1 hour. */
+ /* FIXME: TIMEZONES - Probably want to leave the
+ timezone as it is, so we need to convert the time.*/
+
start_tt = end_tt;
icaltime_adjust (&start_tt, 0, -1, 0, 0);