diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-12-07 02:46:31 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-12-07 02:46:31 +0800 |
commit | a8463d6703469a525fc9192af521f5048e0957ae (patch) | |
tree | 86435b79ff5ace8fc7e1e0c74e319215074c0ae8 /widgets/menus/gal-view-menus.c | |
parent | c847cac2be25b11319d615dded3f71eee46cd60f (diff) | |
download | gsoc2013-evolution-a8463d6703469a525fc9192af521f5048e0957ae.tar.gz gsoc2013-evolution-a8463d6703469a525fc9192af521f5048e0957ae.tar.zst gsoc2013-evolution-a8463d6703469a525fc9192af521f5048e0957ae.zip |
Added a GalViewCollection argument to the new function here.
2000-12-06 Christopher James Lahey <clahey@helixcode.com>
* menus/gal-view-menus.c, menus/gal-view-menus.h: Added a
GalViewCollection argument to the new function here.
From meeting-time-sel/ChangeLog:
2000-12-06 Christopher James Lahey <clahey@helixcode.com>
* e-meeting-time-sel.c: Fixed a bunch of warnings.
svn path=/trunk/; revision=6816
Diffstat (limited to 'widgets/menus/gal-view-menus.c')
-rw-r--r-- | widgets/menus/gal-view-menus.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c index 2808eff29f..377bb5918a 100644 --- a/widgets/menus/gal-view-menus.c +++ b/widgets/menus/gal-view-menus.c @@ -17,6 +17,10 @@ #include "gal-view-menus.h" #include <gal/menus/gal-define-views-dialog.h> +struct _GalViewMenusPrivate { + GalViewCollection *collection; +}; + #define PARENT_TYPE (gtk_object_get_type()) static GtkObjectClass *gvm_parent_class; @@ -24,9 +28,12 @@ static GtkObjectClass *gvm_parent_class; static void gvm_destroy (GtkObject *object) { -#if 0 GalViewMenus *gvm = GAL_VIEW_MENUS (object); -#endif + + if (gvm->priv->collection) + gtk_object_unref(GTK_OBJECT(gvm->priv->collection)); + g_free(gvm->priv); + gvm->priv = NULL; GTK_OBJECT_CLASS (gvm_parent_class)->destroy (object); } @@ -39,14 +46,33 @@ gvm_class_init (GtkObjectClass *klass) klass->destroy = gvm_destroy; } -E_MAKE_TYPE(gal_view_menus, "GalViewMenus", GalViewMenus, gvm_class_init, NULL, PARENT_TYPE); +static void +gvm_init (GalViewMenus *gvm) +{ + gvm->priv = g_new(GalViewMenusPrivate, 1); + gvm->priv->collection = NULL; +} + +E_MAKE_TYPE(gal_view_menus, "GalViewMenus", GalViewMenus, gvm_class_init, gvm_init, PARENT_TYPE); GalViewMenus * -gal_view_menus_new (void) +gal_view_menus_new (GalViewCollection *collection) { GalViewMenus *gvm = gtk_type_new (GAL_VIEW_MENUS_TYPE); - return (GalViewMenus *) gvm; + gal_view_menus_construct(gvm, collection); + + return gvm; +} + +GalViewMenus * +gal_view_menus_construct (GalViewMenus *gvm, + GalViewCollection *collection) +{ + if (collection) + gtk_object_ref(GTK_OBJECT(gvm)); + gvm->priv->collection = collection; + return gvm; } static void |