diff options
author | JP Rosevear <jpr@novell.com> | 2004-11-12 21:52:17 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-11-12 21:52:17 +0800 |
commit | 79d6c1ff2a15947e8267b3de9816a67a08a2d63b (patch) | |
tree | 9fa5f1d2a352427be63359d2a0556b99273910ea /widgets/menus | |
parent | bfa3a0f723929a213b2dd453e91e8fd8d2dad18a (diff) | |
download | gsoc2013-evolution-79d6c1ff2a15947e8267b3de9816a67a08a2d63b.tar.gz gsoc2013-evolution-79d6c1ff2a15947e8267b3de9816a67a08a2d63b.tar.zst gsoc2013-evolution-79d6c1ff2a15947e8267b3de9816a67a08a2d63b.zip |
Convert to G_DEFINE_TYPE
2004-11-12 JP Rosevear <jpr@novell.com>
* menus/gal-view-menus.c: Convert to G_DEFINE_TYPE
svn path=/trunk/; revision=27904
Diffstat (limited to 'widgets/menus')
-rw-r--r-- | widgets/menus/gal-view-menus.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c index 128969b5b8..190514058f 100644 --- a/widgets/menus/gal-view-menus.c +++ b/widgets/menus/gal-view-menus.c @@ -7,7 +7,10 @@ * * (C) 2000, 2001 Ximian, Inc. */ + +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include "gal-view-menus.h" @@ -42,9 +45,6 @@ typedef struct { int ref_count; } ListenerClosure; -#define PARENT_TYPE G_TYPE_OBJECT - -static GObjectClass *gvm_parent_class; static void collection_changed (GalViewCollection *collection, GalViewMenus *gvm); static void instance_changed (GalViewInstance *instance, @@ -53,6 +53,8 @@ static void instance_changed (GalViewInstance *instance, #define d(x) #define CURRENT_VIEW_PATH "/menu/View/ViewBegin/CurrentView" +G_DEFINE_TYPE(GalViewMenus, gal_view_menus, G_TYPE_OBJECT); + static void closure_free (void *data, void *user_data) { @@ -142,7 +144,7 @@ clear_define_views_dialog (gpointer data, } static void -gvm_finalize (GObject *object) +gal_view_menus_finalize (GObject *object) { GalViewMenus *gvm = GAL_VIEW_MENUS (object); @@ -158,19 +160,19 @@ gvm_finalize (GObject *object) g_free(gvm->priv); - (* G_OBJECT_CLASS (gvm_parent_class)->finalize) (object); + (* G_OBJECT_CLASS (gal_view_menus_parent_class)->finalize) (object); } static void -gvm_class_init (GObjectClass *klass) +gal_view_menus_class_init (GalViewMenusClass *gvm_class) { - gvm_parent_class = gtk_type_class (PARENT_TYPE); - - klass->finalize = gvm_finalize; + GObjectClass *object_class = G_OBJECT_CLASS (gvm_class); + + object_class->finalize = gal_view_menus_finalize; } static void -gvm_init (GalViewMenus *gvm) +gal_view_menus_init (GalViewMenus *gvm) { gvm->priv = g_new(GalViewMenusPrivate, 1); gvm->priv->instance = NULL; @@ -182,8 +184,6 @@ gvm_init (GalViewMenus *gvm) gvm->priv->show_define_views = TRUE; } -E_MAKE_TYPE(gal_view_menus, "GalViewMenus", GalViewMenus, gvm_class_init, gvm_init, PARENT_TYPE); - GalViewMenus * gal_view_menus_new (GalViewInstance *instance) { |