diff options
author | Damon Chaplin <damon@ximian.com> | 2001-10-23 08:23:42 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-10-23 08:23:42 +0800 |
commit | 04bda8ad1e0cb676d711dbf0f22ff9f4fb615891 (patch) | |
tree | 7f1ff1303c52e9b48a0006c500b204902b9d77c5 /calendar/gui/e-cell-date-edit-text.h | |
parent | 68de308a89a844dcc579e1d9f24d7813d645c956 (diff) | |
download | gsoc2013-evolution-04bda8ad1e0cb676d711dbf0f22ff9f4fb615891.tar.gz gsoc2013-evolution-04bda8ad1e0cb676d711dbf0f22ff9f4fb615891.tar.zst gsoc2013-evolution-04bda8ad1e0cb676d711dbf0f22ff9f4fb615891.zip |
added setDefaultTimezone() method.
2001-10-22 Damon Chaplin <damon@ximian.com>
* idl/evolution-calendar.idl: added setDefaultTimezone() method.
* pcs/cal-backend.c (cal_backend_get_default_timezone):
(cal_backend_set_default_timezone): new functions to call class
methods.
* pcs/cal-backend-file.c: lots of changes to handle the default
timezone and use it.
* pcs/query.c: use the default timezone.
* gui/dialogs/task-details-page.c (date_changed_cb): initialized
completed_tt.
* gui/dialogs/event-page.c: changed it to handle DATE values. The
'All Day Event' checkbox is only set now when the DTSTART and DTEND
are DATE values.
* gui/dialogs/comp-editor-util.c (comp_editor_free_dates): free the
CalComponentDateTime structs as well.
* gui/e-tasks.c: set the default timezone on the server.
* gui/tag-calendar.c:
* gui/gnome-cal.c:
* gui/e-week-view.c:
* gui/e-day-view.c: updates to handle DATE values.
* gui/e-calendar-table.c (date_compare_cb): updated to use the new
ECellDateEditValue values, so it now works.
(percent_compare_cb): updated to use GPOINTER_TO_INT values.
(e_calendar_table_init): use an ECellPercent for the percent field
and an ECellDateEditText for the date fields.
* gui/comp-util.c (cal_comp_util_compare_event_timezones): return TRUE
if the DTSTART or DTEND is a DATE value. We don't want to show the
timezone icons for DATE values.
* gui/comp-editor-factory.c (resolve_pending_requests): set the default
timezone on the server.
* gui/calendar-model.c: major changes to support sorting properly.
For date and percent fields we now use subclasses of ECellText, so
we don't use a char* as the model value. For the percent field we now
use a GINT_TO_POINTER. For the date fields we now use a
ECellDateEditValue* as the value.
* gui/calendar-config.c (calendar_config_configure_e_cell_date_edit):
set the timezone and use_24_hour flags of the new ECellDateEditText.
* conduits/todo/todo-conduit.c (pre_sync):
* conduits/calendar/calendar-conduit.c (pre_sync): set the default
timezone on the server.
* cal-util/timeutil.c (time_days_in_month): removed debug message.
* cal-util/test-recur.c: try to handle timezones in the iCalendar
file properly, and updated to pass default timezone.
* cal-util/cal-util.c (cal_util_generate_alarms_for_comp):
(cal_util_generate_alarms_for_list): added default timezone argument.
* cal-util/cal-recur.c: changed many of the functions to take a default
timezone, to use to resolve DATE and floating DATE-TIME values.
* cal-client/cal-client.c (cal_client_set_default_timezone): new
function to set the default timezone.
(cal_client_ensure_timezone_on_server): new function to ensure that
a given timezone is on the server.
* gui/e-cell-date-edit-text.c: new subclass of ECellText to display
and edit a date value.
* cal-util/cal-recur.c (cal_obj_byday_expand_monthly): changed week_num
to -week_num when calculating the weeks to go back from the end of the
month for things like BYDAY=-2WE. Fixes bug #11525.
(cal_recur_generate_instances_of_rule): only go up to MAX_YEAR (2037).
We can't really handle anything past that anyway.
(cal_recur_ensure_rule_end_date): initialize cb_date.end_date to 0,
so if the RULE doesn't generate COUNT instances we save 0 as the
time_t.
svn path=/trunk/; revision=13920
Diffstat (limited to 'calendar/gui/e-cell-date-edit-text.h')
-rw-r--r-- | calendar/gui/e-cell-date-edit-text.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h new file mode 100644 index 0000000000..527f75b16e --- /dev/null +++ b/calendar/gui/e-cell-date-edit-text.h @@ -0,0 +1,75 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * Author : + * Damon Chaplin <damon@ximian.com> + * + * Copyright 2001, Ximian, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +/* + * ECellDateEditText - a subclass of ECellText used to show and edit the text + * representation of the date, from a CalComponentDateTime* model value. + */ + +#ifndef _E_CELL_DATE_EDIT_TEXT_H_ +#define _E_CELL_DATE_EDIT_TEXT_H_ + +#include <ical.h> +#include <gal/e-table/e-cell-text.h> + +BEGIN_GNOME_DECLS + +#define E_CELL_DATE_EDIT_TEXT_TYPE (e_cell_date_edit_text_get_type ()) +#define E_CELL_DATE_EDIT_TEXT(o) (GTK_CHECK_CAST ((o), E_CELL_DATE_EDIT_TEXT_TYPE, ECellDateEditText)) +#define E_CELL_DATE_EDIT_TEXT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_DATE_EDIT_TEXT_TYPE, ECellDateEditTextClass)) +#define E_IS_CELL_DATE_EDIT_TEXT(o) (GTK_CHECK_TYPE ((o), E_CELL_DATE_EDIT_TEXT_TYPE)) +#define E_IS_CELL_DATE_EDIT_TEXT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_DATE_EDIT_TEXT_TYPE)) + +typedef struct _ECellDateEditValue ECellDateEditValue; +struct _ECellDateEditValue { + struct icaltimetype tt; + icaltimezone *zone; +}; + +typedef struct { + ECellText base; + + /* The timezone to display the date in. */ + icaltimezone *zone; + + /* Whether to display in 24-hour format. */ + gboolean use_24_hour_format; +} ECellDateEditText; + +typedef struct { + ECellTextClass parent_class; +} ECellDateEditTextClass; + +GtkType e_cell_date_edit_text_get_type (void); +ECell *e_cell_date_edit_text_new (const char *fontname, + GtkJustification justify); + + +void e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd, + icaltimezone *zone); +void e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd, + gboolean use_24_hour); +END_GNOME_DECLS + +#endif /* _E_CELL_DATE_EDIT_TEXT_H_ */ |