Files
evolution/calendar/gui/e-timezone-entry.h
Hans Petter Jansson 7bb980e76d Create a non-abstract enumeration type derived from GEnum.
2002-12-06  Hans Petter Jansson  <hpj@ximian.com>

	* cal-client/cal-client.c (cal_client_open_status_enum_get_type):
	Create a non-abstract enumeration type derived from GEnum.
	(cal_client_set_mode_status_enum_get_type): Ditto.
	(cal_mode_enum_get_type): Ditto.
	(cal_client_class_init): Use our enumerations and not the abstract
	one.
	(cal_client_finalize): Don't destroy factories, since the CalClient
	doesn't own them anymore. They're shared between CalClients now.
	(get_factories): Implement. Move the factory setup code here from
	cal_client_construct (), and cache the factories. This is hopefully
	temporary, until wombat goes away or is fixed.
	(cal_client_construct): Most of the code moved to get_factories ().

	* cal-client/cal-client.h: Add enumeration type macros and protos.

	* gui/cal-search-bar.c (cal_search_bar_get_type): Removed in favour
	of E_MAKE_TYPE, which uses GObject calls.
	(cal_search_bar_class_init): Use g_type_class_peek_parent ().

	* gui/calendar-model.c (calendar_model_get_type):
	(calendar_model_class_init): Ditto, like above file.
	* gui/calendar-view.c (calendar_view_get_type):
	(calendar_view_class_init): Ditto.
	* gui/e-calendar-table.c (e_calendar_table_get_type):
	(e_calendar_table_class_init): Ditto.
	* gui/e-comp-editor-registry.c (e_comp_editor_registry_get_type):
	(class_init): Ditto.
	* gui/e-day-view-main-item.c (e_day_view_main_item_get_type):
	(e_day_view_main_item_class_init): Ditto.
	* gui/e-day-view-time-item.c (e_day_view_time_item_get_type):
	(e_day_view_time_item_class_init): Ditto.
	* gui/e-day-view-top-item.c (e_day_view_top_item_get_type):
	(e_day_view_top_item_class_init): Ditto.
	* gui/e-day-view.c (e_day_view_get_type):
	(e_day_view_class_init): Ditto.
	* gui/e-itip-control.c (e_itip_control_get_type):
	(class_init): Ditto.
	* gui/e-meeting-attendee.c (e_meeting_attendee_get_type):
	(class_init): Ditto.
	* gui/e-meeting-model.c (e_meeting_model_get_type):
	(class_init): Ditto.
	* gui/e-meeting-time-sel-item.c
	(e_meeting_time_selector_item_get_type):
	(e_meeting_time_selector_item_class_init): Ditto.
	* gui/e-meeting-time-sel.c
	(e_meeting_time_selector_get_type):
	(e_meeting_time_selector_class_init): Ditto.
	* gui/e-timezone-entry.c (e_timezone_entry_get_type):
	(e_timezone_entry_class_init): Ditto.
	* gui/e-week-view-event-item.c (e_week_view_event_item_get_type):
	(e_week_view_event_item_class_init): Ditto.
	* gui/e-week-view-main-item.c (e_week_view_main_item_get_type):
	(e_week_view_main_item_class_init): Ditto.
	* gui/e-week-view-titles-item.c (e_week_view_titles_item_get_type):
	(e_week_view_titles_item_class_init): Ditto.
	* gui/gnome-cal.c (gnome_calendar_get_type):
	(gnome_calendar_class_init): Ditto.
	* gui/weekday-picker.c (weekday_picker_get_type):
	(weekday_picker_class_init): Ditto.

	* gui/e-week-view.c (e_week_view_get_type):
	(e_week_view_class_init): Ditto, but parent_class init was moved
	from get_type() to class_init().

	* gui/calendar-view-factory.c (calendar_view_factory_get_type):
	(calendar_view_factory_class_init): Ditto, and set up finalize
	callback instead of destroy.
	(calendar_view_factory_finalize): It's a GObject, so implement this.
	(celendar_view_factory_destroy): Move code to _finalize() and remove.

	* gui/main.c (init_bonobo): Remove extraneous bonobo_activation_init().

svn path=/trunk/; revision=19043
2002-12-06 19:38:26 +00:00

81 lines
2.7 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 version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* 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 <cal-client/cal-client.h>
G_BEGIN_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);
};
GType 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);
G_END_DECLS
#endif /* __E_TIMEZONE_ENTRY_H_ */