Files
evolution/calendar/gui/e-timezone-entry.h
Damon Chaplin b9b5aa0a0e hide the timezone fields for all-day events. We will use DATE values for
2001-08-16  Damon Chaplin  <damon@ximian.com>

	* gui/dialogs/event-page.c: hide the timezone fields for all-day
	events. We will use DATE values for these eventually, and these
	don't have timezones associated with them. Currently we just use the
	default timezone for all-day events, as a workaround until we have
	DATE values working.

	* gui/dialogs/comp-editor-util.c (comp_editor_new_date_edit): added
	make_time_insensitive flag. Though we may not use it.

	* gui/dialogs/event-page.glade: made the 'All day event' toggle
	right-aligned, so it doesn't move when the other widgets are shown
	and hidden.

	* gui/e-timezone-entry.c (e_timezone_entry_set_default_timezone): new
	function to set the default timezone of the widget. If the current
	timezone setting matches the default then the entry field is hidden.
	Most people won't use timezones so this makes the GUI simpler.

	* gui/dialogs/event-page.c (init_widgets):
	* gui/dialogs/task-page.c (init_widgets): set the default timezone
	using the above function.

	* gui/dialogs/task-page.c (task_page_fill_widgets): if the start date
	or due date is not set, we use the default timezone, so the user
	doesn't have to set this each time they set the date.

svn path=/trunk/; revision=12137
2001-08-16 23:37:38 +00:00

83 lines
2.8 KiB
C

/* -*- 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
*/
/*
* ETimezoneEntry - a field for setting a timezone. It shows the timezone in
* a GtkEntry with a '...' button beside it which shows a dialog for changing
* the timezone. The dialog contains a map of the world with a point for each
* timezone, and an option menu as an alternative way of selecting the
* timezone.
*/
#ifndef __E_TIMEZONE_ENTRY_H_
#define __E_TIMEZONE_ENTRY_H_
#include <gtk/gtkhbox.h>
#include <libgnome/gnome-defs.h>
#include <cal-client/cal-client.h>
BEGIN_GNOME_DECLS
#define E_TYPE_TIMEZONE_ENTRY (e_timezone_entry_get_type ())
#define E_TIMEZONE_ENTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntry))
#define E_TIMEZONE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryClass))
#define E_IS_TIMEZONE_ENTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TIMEZONE_ENTRY))
#define E_IS_TIMEZONE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_TIMEZONE_ENTRY))
typedef struct _ETimezoneEntry ETimezoneEntry;
typedef struct _ETimezoneEntryPrivate ETimezoneEntryPrivate;
typedef struct _ETimezoneEntryClass ETimezoneEntryClass;
struct _ETimezoneEntry {
GtkHBox hbox;
/*< private >*/
ETimezoneEntryPrivate *priv;
};
struct _ETimezoneEntryClass {
GtkHBoxClass parent_class;
void (* changed) (ETimezoneEntry *tentry);
};
guint e_timezone_entry_get_type (void);
GtkWidget* e_timezone_entry_new (void);
icaltimezone* e_timezone_entry_get_timezone (ETimezoneEntry *tentry);
void e_timezone_entry_set_timezone (ETimezoneEntry *tentry,
icaltimezone *zone);
/* Sets the default timezone. If the current timezone matches this, then the
entry field is hidden. This is useful since most people do not use timezones
so it makes the user interface simpler. */
void e_timezone_entry_set_default_timezone(ETimezoneEntry *tentry,
icaltimezone *zone);
END_GNOME_DECLS
#endif /* __E_TIMEZONE_ENTRY_H_ */