convert to G_DEFINE_TYPE
2004-12-21 JP Rosevear <jpr@novell.com> * gui/search/e-addressbook-search-dialog.c: convert to G_DEFINE_TYPE * gui/widgets/gal-view-factory-minicard.c: ditto * gui/widgets/gal-view-factory-treeview.c: ditto svn path=/trunk/; revision=28162
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
2004-12-21 JP Rosevear <jpr@novell.com>
|
||||
|
||||
* gui/search/e-addressbook-search-dialog.c: convert to G_DEFINE_TYPE
|
||||
|
||||
* gui/widgets/gal-view-factory-minicard.c: ditto
|
||||
|
||||
* gui/widgets/gal-view-factory-treeview.c: ditto
|
||||
|
||||
2004-12-13 Vivek Jain <jvivek@novell.com>
|
||||
|
||||
* gui/component/addressbook-config.c (addressbook_config_edit_source): set the
|
||||
|
||||
@ -19,13 +19,14 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkbox.h>
|
||||
#include <gtk/gtkentry.h>
|
||||
#include <gtk/gtkstock.h>
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
#include "gal/util/e-util.h"
|
||||
|
||||
#include "e-addressbook-search-dialog.h"
|
||||
|
||||
@ -34,16 +35,7 @@ static void eab_search_dialog_init (EABSearchDialog *widget
|
||||
static void eab_search_dialog_class_init (EABSearchDialogClass *klass);
|
||||
static void eab_search_dialog_dispose (GObject *object);
|
||||
|
||||
static GtkDialog *parent_class = NULL;
|
||||
|
||||
#define PARENT_TYPE GTK_TYPE_DIALOG
|
||||
|
||||
E_MAKE_TYPE (eab_search_dialog,
|
||||
"EABSearchDialog",
|
||||
EABSearchDialog,
|
||||
eab_search_dialog_class_init,
|
||||
eab_search_dialog_init,
|
||||
PARENT_TYPE)
|
||||
G_DEFINE_TYPE (EABSearchDialog, eab_search_dialog, GTK_TYPE_DIALOG)
|
||||
|
||||
enum
|
||||
{
|
||||
@ -113,8 +105,6 @@ eab_search_dialog_class_init (EABSearchDialogClass *klass)
|
||||
|
||||
object_class = (GObjectClass*) klass;
|
||||
|
||||
parent_class = g_type_class_ref (PARENT_TYPE);
|
||||
|
||||
object_class->set_property = eab_search_dialog_set_property;
|
||||
object_class->get_property = eab_search_dialog_get_property;
|
||||
object_class->dispose = eab_search_dialog_dispose;
|
||||
@ -196,5 +186,5 @@ eab_search_dialog_dispose (GObject *object)
|
||||
|
||||
view = EAB_SEARCH_DIALOG (object);
|
||||
|
||||
G_OBJECT_CLASS(parent_class)->dispose (object);
|
||||
G_OBJECT_CLASS(eab_search_dialog_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@ -7,16 +7,17 @@
|
||||
*
|
||||
* (C) 2000, 2001 Ximian, Inc.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
#include "gal-view-factory-minicard.h"
|
||||
#include "gal-view-minicard.h"
|
||||
#include "gal/util/e-util.h"
|
||||
|
||||
#define PARENT_TYPE GAL_VIEW_FACTORY_TYPE
|
||||
|
||||
static GalViewFactoryClass *gal_view_factory_minicard_parent_class;
|
||||
G_DEFINE_TYPE (GalViewFactoryMinicard, gal_view_factory_minicard, GAL_VIEW_FACTORY_TYPE)
|
||||
|
||||
static const char *
|
||||
gal_view_factory_minicard_get_title (GalViewFactory *factory)
|
||||
@ -38,10 +39,9 @@ gal_view_factory_minicard_get_type_code (GalViewFactory *factory)
|
||||
}
|
||||
|
||||
static void
|
||||
gal_view_factory_minicard_class_init (GObjectClass *object_class)
|
||||
gal_view_factory_minicard_class_init (GalViewFactoryMinicardClass *minicard_class)
|
||||
{
|
||||
GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(object_class);
|
||||
gal_view_factory_minicard_parent_class = g_type_class_ref (PARENT_TYPE);
|
||||
GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(minicard_class);
|
||||
|
||||
view_factory_class->get_title = gal_view_factory_minicard_get_title;
|
||||
view_factory_class->new_view = gal_view_factory_minicard_new_view;
|
||||
@ -82,4 +82,4 @@ gal_view_factory_minicard_construct (GalViewFactoryMinicard *factory)
|
||||
return GAL_VIEW_FACTORY(factory);
|
||||
}
|
||||
|
||||
E_MAKE_TYPE(gal_view_factory_minicard, "GalViewFactoryMinicard", GalViewFactoryMinicard, gal_view_factory_minicard_class_init, gal_view_factory_minicard_init, PARENT_TYPE)
|
||||
|
||||
|
||||
@ -8,16 +8,17 @@
|
||||
*
|
||||
* (C) 2000, 2001 Ximian, Inc.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
#include <gal/util/e-util.h>
|
||||
#include "gal-view-factory-treeview.h"
|
||||
#include "gal-view-treeview.h"
|
||||
|
||||
#define PARENT_TYPE GAL_VIEW_FACTORY_TYPE
|
||||
|
||||
static GalViewFactoryClass *gal_view_factory_treeview_parent_class;
|
||||
G_DEFINE_TYPE(GalViewFactoryTreeView, gal_view_factory_treeview, GAL_VIEW_FACTORY_TYPE)
|
||||
|
||||
static const char *
|
||||
gal_view_factory_treeview_get_title (GalViewFactory *factory)
|
||||
@ -39,10 +40,9 @@ gal_view_factory_treeview_get_type_code (GalViewFactory *factory)
|
||||
}
|
||||
|
||||
static void
|
||||
gal_view_factory_treeview_class_init (GObjectClass *object_class)
|
||||
gal_view_factory_treeview_class_init (GalViewFactoryTreeViewClass *treeview_class)
|
||||
{
|
||||
GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(object_class);
|
||||
gal_view_factory_treeview_parent_class = g_type_class_ref (PARENT_TYPE);
|
||||
GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(treeview_class);
|
||||
|
||||
view_factory_class->get_title = gal_view_factory_treeview_get_title;
|
||||
view_factory_class->new_view = gal_view_factory_treeview_new_view;
|
||||
@ -82,5 +82,3 @@ gal_view_factory_treeview_construct (GalViewFactoryTreeView *factory)
|
||||
{
|
||||
return GAL_VIEW_FACTORY(factory);
|
||||
}
|
||||
|
||||
E_MAKE_TYPE(gal_view_factory_treeview, "GalViewFactoryTreeView", GalViewFactoryTreeView, gal_view_factory_treeview_class_init, gal_view_factory_treeview_init, PARENT_TYPE)
|
||||
|
||||
Reference in New Issue
Block a user