diff options
author | JP Rosevear <jpr@novell.com> | 2004-10-14 23:53:29 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-10-14 23:53:29 +0800 |
commit | dce3735025a16ac72151b751a061120fe4209648 (patch) | |
tree | f3c60bed93fe807fbeccbbde1cce6c2599852610 /calendar/gui/weekday-picker.c | |
parent | 086338bb035c96491b792bd93f65a94d1f236916 (diff) | |
download | gsoc2013-evolution-dce3735025a16ac72151b751a061120fe4209648.tar.gz gsoc2013-evolution-dce3735025a16ac72151b751a061120fe4209648.tar.zst gsoc2013-evolution-dce3735025a16ac72151b751a061120fe4209648.zip |
convert to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com>
* gui/e-meeting-attendee.c: convert to G_DEFINE_TYPE
* gui/e-meeting-list-view.c: ditto
* gui/e-meeting-time-sel.c: ditto
* gui/e-meeting-time-sel-item.c: ditto
* gui/e-select-names-renderer.c: ditto
* gui/e-timezone-entry.c: ditto
* gui/e-tasks.c: ditto
* gui/gnome-cal.c: ditto
* gui/weekday-picker.c: ditto
svn path=/trunk/; revision=27584
Diffstat (limited to 'calendar/gui/weekday-picker.c')
-rw-r--r-- | calendar/gui/weekday-picker.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c index 3e49119528..dc795c545d 100644 --- a/calendar/gui/weekday-picker.c +++ b/calendar/gui/weekday-picker.c @@ -28,7 +28,6 @@ #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" @@ -77,14 +76,9 @@ static void weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_styl static gboolean weekday_picker_focus (GtkWidget *widget, GtkDirectionType direction); static void colorize_items (WeekdayPicker *wp); -static GnomeCanvasClass *parent_class; - static guint wp_signals[LAST_SIGNAL]; - - -E_MAKE_TYPE (weekday_picker, "WeekdayPicker", WeekdayPicker, - weekday_picker_class_init, weekday_picker_init, GNOME_TYPE_CANVAS); +G_DEFINE_TYPE (WeekdayPicker, weekday_picker, GNOME_TYPE_CANVAS); /* Class initialization function for the weekday picker */ static void @@ -96,8 +90,6 @@ weekday_picker_class_init (WeekdayPickerClass *class) object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; - parent_class = g_type_class_peek_parent (class); - wp_signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, @@ -263,8 +255,8 @@ weekday_picker_destroy (GtkObject *object) g_free (priv); wp->priv = NULL; - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + if (GTK_OBJECT_CLASS (weekday_picker_parent_class)->destroy) + (* GTK_OBJECT_CLASS (weekday_picker_parent_class)->destroy) (object); } static void @@ -393,8 +385,8 @@ weekday_picker_realize (GtkWidget *widget) wp = WEEKDAY_PICKER (widget); - if (GTK_WIDGET_CLASS (parent_class)->realize) - (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); + if (GTK_WIDGET_CLASS (weekday_picker_parent_class)->realize) + (* GTK_WIDGET_CLASS (weekday_picker_parent_class)->realize) (widget); configure_items (wp); } @@ -421,8 +413,8 @@ weekday_picker_size_allocate (GtkWidget *widget, GtkAllocation *allocation) wp = WEEKDAY_PICKER (widget); - if (GTK_WIDGET_CLASS (parent_class)->size_allocate) - (* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); + if (GTK_WIDGET_CLASS (weekday_picker_parent_class)->size_allocate) + (* GTK_WIDGET_CLASS (weekday_picker_parent_class)->size_allocate) (widget, allocation); gnome_canvas_set_scroll_region (GNOME_CANVAS (wp), 0, 0, allocation->width, allocation->height); @@ -477,8 +469,8 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) g_object_unref (layout); pango_font_metrics_unref (font_metrics); - if (GTK_WIDGET_CLASS (parent_class)->style_set) - (* GTK_WIDGET_CLASS (parent_class)->style_set) (widget, previous_style); + if (GTK_WIDGET_CLASS (weekday_picker_parent_class)->style_set) + (* GTK_WIDGET_CLASS (weekday_picker_parent_class)->style_set) (widget, previous_style); } |