diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2002-12-07 03:38:26 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2002-12-07 03:38:26 +0800 |
commit | 7bb980e76d7207855e87ffefbffaa304dd779372 (patch) | |
tree | ff1524650853ff2749729a8edf5bf9f20c75a3a5 /calendar/gui/weekday-picker.c | |
parent | 4b1cfd51be51cc0ff40a5439ea9bf008f71405e8 (diff) | |
download | gsoc2013-evolution-7bb980e76d7207855e87ffefbffaa304dd779372.tar.gz gsoc2013-evolution-7bb980e76d7207855e87ffefbffaa304dd779372.tar.zst gsoc2013-evolution-7bb980e76d7207855e87ffefbffaa304dd779372.zip |
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
Diffstat (limited to 'calendar/gui/weekday-picker.c')
-rw-r--r-- | calendar/gui/weekday-picker.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c index 087c7000da..f4311574fd 100644 --- a/calendar/gui/weekday-picker.c +++ b/calendar/gui/weekday-picker.c @@ -27,6 +27,7 @@ #include <libgnome/gnome-i18n.h> #include <libgnomecanvas/gnome-canvas-rect-ellipse.h> #include <libgnomecanvas/gnome-canvas-text.h> +#include <gal/util/e-util.h> #include "weekday-picker.h" @@ -76,36 +77,8 @@ static guint wp_signals[LAST_SIGNAL]; -/** - * weekday_picker_get_type: - * - * Registers the #WeekdayPicker class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #WeekdayPicker class. - **/ -GtkType -weekday_picker_get_type (void) -{ - static GtkType weekday_picker_type = 0; - - if (!weekday_picker_type) { - static const GtkTypeInfo weekday_picker_info = { - "WeekdayPicker", - sizeof (WeekdayPicker), - sizeof (WeekdayPickerClass), - (GtkClassInitFunc) weekday_picker_class_init, - (GtkObjectInitFunc) weekday_picker_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - weekday_picker_type = gtk_type_unique (GNOME_TYPE_CANVAS, &weekday_picker_info); - } - - return weekday_picker_type; -} +E_MAKE_TYPE (weekday_picker, "WeekdayPicker", WeekdayPicker, + weekday_picker_class_init, weekday_picker_init, GNOME_TYPE_CANVAS); /* Class initialization function for the weekday picker */ static void @@ -117,7 +90,7 @@ weekday_picker_class_init (WeekdayPickerClass *class) object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; - parent_class = gtk_type_class (GNOME_TYPE_CANVAS); + parent_class = g_type_class_peek_parent (class); wp_signals[CHANGED] = gtk_signal_new ("changed", |