diff options
author | JP Rosevear <jpr@novell.com> | 2004-10-14 22:56:18 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-10-14 22:56:18 +0800 |
commit | 979feab18eb378b4623f2edc6a357407e95e3493 (patch) | |
tree | 7435a2f2555cba759b1cdd2a0685b51c34679f2e /calendar/gui/e-week-view.c | |
parent | 05b60f793cc6d7dff47b5980487f7ee1248d8f08 (diff) | |
download | gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.tar gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.tar.gz gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.tar.bz2 gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.tar.lz gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.tar.xz gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.tar.zst gsoc2013-evolution-979feab18eb378b4623f2edc6a357407e95e3493.zip |
convert to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com>
* gui/e-week-view-config.c: convert to G_DEFINE_TYPE
* gui/e-week-view-event-item.c: ditto
* gui/e-week-view-main-item.c: ditto
* gui/e-week-view-titles-item.c: ditto
* gui/e-week-view.c: ditto
svn path=/trunk/; revision=27578
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index bd22b7f61e..1deeb228ca 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -94,8 +94,6 @@ typedef struct { ECalModelComponent *comp_data; } AddEventData; -static void e_week_view_class_init (EWeekViewClass *class); -static void e_week_view_init (EWeekView *week_view); static void e_week_view_destroy (GtkObject *object); static void e_week_view_realize (GtkWidget *widget); static void e_week_view_unrealize (GtkWidget *widget); @@ -157,8 +155,6 @@ static void e_week_view_reshape_event_span (EWeekView *week_view, gint span_num); static void e_week_view_recalc_day_starts (EWeekView *week_view, time_t lower); -static void e_week_view_on_adjustment_changed (GtkAdjustment *adjustment, - EWeekView *week_view); static void e_week_view_on_editing_started (EWeekView *week_view, GnomeCanvasItem *item); static void e_week_view_on_editing_stopped (EWeekView *week_view, @@ -209,10 +205,7 @@ static void e_week_view_queue_layout (EWeekView *week_view); static void e_week_view_cancel_layout (EWeekView *week_view); static gboolean e_week_view_layout_timeout_cb (gpointer data); -static ECalendarViewClass *parent_class; - -E_MAKE_TYPE (e_week_view, "EWeekView", EWeekView, e_week_view_class_init, - e_week_view_init, e_calendar_view_get_type ()); +G_DEFINE_TYPE (EWeekView, e_week_view, E_TYPE_CALENDAR_VIEW); static void e_week_view_class_init (EWeekViewClass *class) @@ -221,7 +214,6 @@ e_week_view_class_init (EWeekViewClass *class) GtkWidgetClass *widget_class; ECalendarViewClass *view_class; - parent_class = g_type_class_peek_parent (class); object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; view_class = (ECalendarViewClass *) class; @@ -741,7 +733,7 @@ e_week_view_destroy (GtkObject *object) week_view->resize_width_cursor = NULL; } - GTK_OBJECT_CLASS (parent_class)->destroy (object); + GTK_OBJECT_CLASS (e_week_view_parent_class)->destroy (object); } @@ -753,8 +745,8 @@ e_week_view_realize (GtkWidget *widget) gboolean success[E_WEEK_VIEW_COLOR_LAST]; gint nfailed; - if (GTK_WIDGET_CLASS (parent_class)->realize) - (*GTK_WIDGET_CLASS (parent_class)->realize)(widget); + if (GTK_WIDGET_CLASS (e_week_view_parent_class)->realize) + (*GTK_WIDGET_CLASS (e_week_view_parent_class)->realize)(widget); week_view = E_WEEK_VIEW (widget); week_view->main_gc = gdk_gc_new (widget->window); @@ -842,8 +834,8 @@ e_week_view_unrealize (GtkWidget *widget) g_object_unref (week_view->timezone_icon); week_view->timezone_icon = NULL; - if (GTK_WIDGET_CLASS (parent_class)->unrealize) - (*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget); + if (GTK_WIDGET_CLASS (e_week_view_parent_class)->unrealize) + (*GTK_WIDGET_CLASS (e_week_view_parent_class)->unrealize)(widget); } static gint @@ -895,8 +887,8 @@ e_week_view_style_set (GtkWidget *widget, PangoFontMetrics *font_metrics; PangoLayout *layout; - if (GTK_WIDGET_CLASS (parent_class)->style_set) - (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style); + if (GTK_WIDGET_CLASS (e_week_view_parent_class)->style_set) + (*GTK_WIDGET_CLASS (e_week_view_parent_class)->style_set)(widget, previous_style); week_view = E_WEEK_VIEW (widget); style = gtk_widget_get_style (widget); @@ -998,7 +990,7 @@ e_week_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation) week_view = E_WEEK_VIEW (widget); - (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); + (*GTK_WIDGET_CLASS (e_week_view_parent_class)->size_allocate) (widget, allocation); e_week_view_recalc_cell_sizes (week_view); @@ -1200,8 +1192,8 @@ e_week_view_expose_event (GtkWidget *widget, e_week_view_draw_shadow (week_view); - if (GTK_WIDGET_CLASS (parent_class)->expose_event) - (*GTK_WIDGET_CLASS (parent_class)->expose_event)(widget, event); + if (GTK_WIDGET_CLASS (e_week_view_parent_class)->expose_event) + (*GTK_WIDGET_CLASS (e_week_view_parent_class)->expose_event)(widget, event); return FALSE; } @@ -3913,7 +3905,7 @@ e_week_view_key_press (GtkWidget *widget, GdkEventKey *event) /* if not handled, try key bindings */ if (!handled) - handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event); + handled = GTK_WIDGET_CLASS (e_week_view_parent_class)->key_press_event (widget, event); return handled; } |