aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-10-14 23:02:32 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-10-14 23:02:32 +0800
commit66152fe6537418489c2186a5e5c269c6e7c81db3 (patch)
tree8e65d0de151e07adb43a67c77a4e85c15d004bab
parent979feab18eb378b4623f2edc6a357407e95e3493 (diff)
downloadgsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.tar
gsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.tar.gz
gsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.tar.bz2
gsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.tar.lz
gsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.tar.xz
gsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.tar.zst
gsoc2013-evolution-66152fe6537418489c2186a5e5c269c6e7c81db3.zip
convert to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com> * gui/calendar-view.c: convert to G_DEFINE_TYPE * gui/calendar-view-factory.c: ditto * gui/cal-search-bar.c: ditto * gui/e-cal-component-preview.c: ditto svn path=/trunk/; revision=27579
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/gui/cal-search-bar.c18
-rw-r--r--calendar/gui/calendar-view-factory.c15
-rw-r--r--calendar/gui/calendar-view.c15
-rw-r--r--calendar/gui/e-cal-component-preview.c14
5 files changed, 22 insertions, 50 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 7ae5bc8464..6332e6d2c6 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,15 @@
2004-10-14 JP Rosevear <jpr@novell.com>
+ * gui/calendar-view.c: convert to G_DEFINE_TYPE
+
+ * gui/calendar-view-factory.c: ditto
+
+ * gui/cal-search-bar.c: ditto
+
+ * gui/e-cal-component-preview.c: ditto
+
+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
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index 3bdb542516..962b7e5eca 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -30,7 +30,6 @@
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtksignal.h>
#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
#include "cal-search-bar.h"
@@ -65,16 +64,10 @@ struct CalSearchBarPrivate {
GPtrArray *categories;
};
-
-
-static void cal_search_bar_class_init (CalSearchBarClass *class);
-static void cal_search_bar_init (CalSearchBar *cal_search);
static void cal_search_bar_destroy (GtkObject *object);
static void cal_search_bar_search_activated (ESearchBar *search);
-static ESearchBarClass *parent_class = NULL;
-
/* Signal IDs */
enum {
SEXP_CHANGED,
@@ -84,10 +77,7 @@ enum {
static guint cal_search_bar_signals[LAST_SIGNAL] = { 0 };
-
-
-E_MAKE_TYPE (cal_search_bar, "CalSearchBar", CalSearchBar, cal_search_bar_class_init,
- cal_search_bar_init, E_SEARCH_BAR_TYPE);
+G_DEFINE_TYPE (CalSearchBar, cal_search_bar, E_SEARCH_BAR_TYPE);
/* Class initialization function for the calendar search bar */
static void
@@ -99,8 +89,6 @@ cal_search_bar_class_init (CalSearchBarClass *class)
e_search_bar_class = (ESearchBarClass *) class;
object_class = (GtkObjectClass *) class;
- parent_class = g_type_class_peek_parent (class);
-
cal_search_bar_signals[SEXP_CHANGED] =
gtk_signal_new ("sexp_changed",
GTK_RUN_FIRST,
@@ -177,8 +165,8 @@ cal_search_bar_destroy (GtkObject *object)
cal_search->priv = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GTK_OBJECT_CLASS (cal_search_bar_parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (cal_search_bar_parent_class)->destroy) (object);
}
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index f8d2d92ce3..2fced5476c 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -37,20 +37,13 @@ struct _CalendarViewFactoryPrivate {
-static void calendar_view_factory_class_init (CalendarViewFactoryClass *class);
-static void calendar_view_factory_init (CalendarViewFactory *cal_view_factory);
static void calendar_view_factory_finalize (GObject *object);
static const char *calendar_view_factory_get_title (GalViewFactory *factory);
static const char *calendar_view_factory_get_type_code (GalViewFactory *factory);
static GalView *calendar_view_factory_new_view (GalViewFactory *factory, const char *name);
-static GalViewFactoryClass *parent_class = NULL;
-
-
-
-E_MAKE_TYPE (calendar_view_factory, "CalendarViewFactory", CalendarViewFactory,
- calendar_view_factory_class_init, calendar_view_factory_init, GAL_VIEW_FACTORY_TYPE);
+G_DEFINE_TYPE (CalendarViewFactory, calendar_view_factory, GAL_VIEW_FACTORY_TYPE);
/* Class initialization function for the calendar view factory */
static void
@@ -59,8 +52,6 @@ calendar_view_factory_class_init (CalendarViewFactoryClass *class)
GalViewFactoryClass *gal_view_factory_class;
GObjectClass *gobject_class;
- parent_class = g_type_class_peek_parent (class);
-
gal_view_factory_class = (GalViewFactoryClass *) class;
gobject_class = (GObjectClass *) class;
@@ -97,8 +88,8 @@ calendar_view_factory_finalize (GObject *object)
g_free (priv);
cal_view_factory->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (calendar_view_factory_parent_class)->finalize)
+ (* G_OBJECT_CLASS (calendar_view_factory_parent_class)->finalize) (object);
}
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index 34fd98e676..bf199c49a0 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -37,8 +37,6 @@ struct _CalendarViewPrivate {
-static void calendar_view_class_init (CalendarViewClass *class);
-static void calendar_view_init (CalendarView *cview);
static void calendar_view_finalize (GObject *object);
static void calendar_view_edit (GalView *view, GtkWindow *parent_window);
@@ -49,12 +47,7 @@ static void calendar_view_set_title (GalView *view, const char *title);
static const char *calendar_view_get_type_code (GalView *view);
static GalView *calendar_view_clone (GalView *view);
-static GalViewClass *parent_class = NULL;
-
-
-
-E_MAKE_TYPE (calendar_view, "CalendarView", CalendarView, calendar_view_class_init,
- calendar_view_init, GAL_VIEW_TYPE);
+G_DEFINE_TYPE (CalendarView, calendar_view, GAL_VIEW_TYPE);
/* Class initialization function for the calendar view */
static void
@@ -63,8 +56,6 @@ calendar_view_class_init (CalendarViewClass *class)
GalViewClass *gal_view_class;
GObjectClass *object_class;
- parent_class = g_type_class_peek_parent (class);
-
gal_view_class = (GalViewClass *) class;
object_class = (GObjectClass *) class;
@@ -112,8 +103,8 @@ calendar_view_finalize (GObject *object)
g_free (priv);
cal_view->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (calendar_view_parent_class)->finalize)
+ (* G_OBJECT_CLASS (calendar_view_parent_class)->finalize) (object);
}
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index 91c48e1165..c85f90b526 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -30,7 +30,6 @@
#include <gtk/gtk.h>
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libecal/e-cal-time-util.h>
-#include <gal/util/e-util.h>
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/gtkhtml-stream.h>
#include <e-util/e-time-utils.h>
@@ -44,8 +43,7 @@ struct _ECalComponentPreviewPrivate {
icaltimezone *zone;
};
-static GtkTableClass *parent_class;
-
+G_DEFINE_TYPE (ECalComponentPreview, e_cal_component_preview, GTK_TYPE_TABLE);
static void
on_link_clicked (GtkHTML *html, const char *url, gpointer data)
@@ -358,8 +356,8 @@ e_cal_component_preview_destroy (GtkObject *object)
preview->priv = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GTK_OBJECT_CLASS (e_cal_component_preview_parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (e_cal_component_preview_parent_class)->destroy) (object);
}
static void
@@ -369,15 +367,9 @@ e_cal_component_preview_class_init (ECalComponentPreviewClass *klass)
object_class = (GtkObjectClass *) klass;
- parent_class = g_type_class_peek_parent (klass);
-
object_class->destroy = e_cal_component_preview_destroy;
}
-E_MAKE_TYPE (e_cal_component_preview, "ECalComponentPreview", ECalComponentPreview,
- e_cal_component_preview_class_init, e_cal_component_preview_init,
- GTK_TYPE_TABLE)
-
GtkWidget *
e_cal_component_preview_new (void)
{