aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-12-21 23:42:46 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-12-21 23:42:46 +0800
commita0da580e7e2355b6f6e084cbd968dd6176156082 (patch)
treed902eddfe5429b7d8dc2e0fa1055f136f880561f /shell
parent8cb1b7cf11da0d32a087f3f580fb76f0eb2aa212 (diff)
downloadgsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.tar.gz
gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.tar.zst
gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.zip
Convert to G_DEFINE_TYPE
2004-12-21 JP Rosevear <jpr@novell.com> * e-corba-config-page.c: Convert to G_DEFINE_TYPE * e-history.c: ditto * e-shell-folder-title-bar.c: ditto * e-shell-offline-handler.c: ditto * e-shell-settings-dialog.c: ditto * e-shell-window.c: ditto * e-sidebar.c: ditto * e-user-creatable-items-handler.c: ditto * e-component-registry.c: ditto * importer/evolution-importer-client.c: ditto svn path=/trunk/; revision=28164
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog22
-rw-r--r--shell/e-component-registry.c19
-rw-r--r--shell/e-corba-config-page.c19
-rw-r--r--shell/e-history.c21
-rw-r--r--shell/e-shell-folder-title-bar.c22
-rw-r--r--shell/e-shell-offline-handler.c19
-rw-r--r--shell/e-shell-settings-dialog.c23
-rw-r--r--shell/e-shell-window.c23
-rw-r--r--shell/e-sidebar.c29
-rw-r--r--shell/e-user-creatable-items-handler.c23
-rw-r--r--shell/importer/evolution-importer-client.c16
11 files changed, 90 insertions, 146 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index bbe6f5a1ac..91a804929d 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,25 @@
+2004-12-21 JP Rosevear <jpr@novell.com>
+
+ * e-corba-config-page.c: Convert to G_DEFINE_TYPE
+
+ * e-history.c: ditto
+
+ * e-shell-folder-title-bar.c: ditto
+
+ * e-shell-offline-handler.c: ditto
+
+ * e-shell-settings-dialog.c: ditto
+
+ * e-shell-window.c: ditto
+
+ * e-sidebar.c: ditto
+
+ * e-user-creatable-items-handler.c: ditto
+
+ * e-component-registry.c: ditto
+
+ * importer/evolution-importer-client.c: ditto
+
2004-12-09 Rodney Dawes <dobey@novell.com>
* e-shell-window-commands.c: Use stock_new-window for the New Window
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c
index d83c0ae572..a314118305 100644
--- a/shell/e-component-registry.c
+++ b/shell/e-component-registry.c
@@ -30,7 +30,6 @@
#include <e-util/e-icon-factory.h>
#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
#include <bonobo/bonobo-object.h>
#include <bonobo/bonobo-exception.h>
@@ -38,17 +37,13 @@
#include <string.h>
#include <stdlib.h>
-
-#define PARENT_TYPE G_TYPE_OBJECT
-static GObjectClass *parent_class = NULL;
-
-
struct _EComponentRegistryPrivate {
GSList *infos;
int init:1;
};
+G_DEFINE_TYPE (EComponentRegistry, e_component_registry, G_TYPE_OBJECT)
/* EComponentInfo handling. */
@@ -261,24 +256,22 @@ impl_finalize (GObject *object)
g_slist_foreach (priv->infos, (GFunc) component_info_free, NULL);
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_component_registry_parent_class)->finalize) (object);
}
static void
-class_init (EComponentRegistryClass *klass)
+e_component_registry_class_init (EComponentRegistryClass *klass)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = impl_finalize;
-
- parent_class = g_type_class_ref(PARENT_TYPE);
}
static void
-init (EComponentRegistry *registry)
+e_component_registry_init (EComponentRegistry *registry)
{
registry->priv = g_new0 (EComponentRegistryPrivate, 1);
}
@@ -354,7 +347,3 @@ e_component_registry_activate (EComponentRegistry *registry,
/* it isn't in the registry unless it is already activated */
return bonobo_object_dup_ref (info->iface, NULL);
}
-
-
-E_MAKE_TYPE (e_component_registry, "EComponentRegistry", EComponentRegistry,
- class_init, init, PARENT_TYPE)
diff --git a/shell/e-corba-config-page.c b/shell/e-corba-config-page.c
index 9e26785dac..64e79782e7 100644
--- a/shell/e-corba-config-page.c
+++ b/shell/e-corba-config-page.c
@@ -29,21 +29,19 @@
#include "Evolution.h"
#include <string.h>
-#include <gal/util/e-util.h>
#include <bonobo/bonobo-widget.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-object.h>
#include <bonobo/bonobo-listener.h>
-
-#define PARENT_TYPE e_config_page_get_type ()
-static EConfigPageClass *parent_class = NULL;
struct _ECorbaConfigPagePrivate {
GNOME_Evolution_ConfigControl config_control_interface;
};
+G_DEFINE_TYPE (ECorbaConfigPage, e_corba_config_page, E_TYPE_CONFIG_PAGE)
+
/* GObject methods. */
static void
@@ -65,7 +63,7 @@ impl_dispose (GObject *object)
CORBA_exception_free (&ev);
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ (* G_OBJECT_CLASS (e_corba_config_page_parent_class)->dispose) (object);
}
static void
@@ -79,13 +77,13 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_corba_config_page_parent_class)->finalize) (object);
}
/* GTK+ ctors. */
static void
-class_init (ECorbaConfigPageClass *class)
+e_corba_config_page_class_init (ECorbaConfigPageClass *class)
{
GObjectClass *object_class;
EConfigPageClass *config_page_class;
@@ -95,12 +93,10 @@ class_init (ECorbaConfigPageClass *class)
object_class->finalize = impl_finalize;
config_page_class = E_CONFIG_PAGE_CLASS (class);
-
- parent_class = g_type_class_ref(PARENT_TYPE);
}
static void
-init (ECorbaConfigPage *corba_config_page)
+e_corba_config_page_init (ECorbaConfigPage *corba_config_page)
{
ECorbaConfigPagePrivate *priv;
@@ -160,6 +156,3 @@ e_corba_config_page_new_from_objref (GNOME_Evolution_ConfigControl corba_object)
return GTK_WIDGET (corba_config_page);
}
-
-
-E_MAKE_TYPE (e_corba_config_page, "ECorbaConfigPgae", ECorbaConfigPage, class_init, init, PARENT_TYPE)
diff --git a/shell/e-history.c b/shell/e-history.c
index d12a933241..ff4755bb8d 100644
--- a/shell/e-history.c
+++ b/shell/e-history.c
@@ -26,12 +26,6 @@
#include "e-history.h"
-#include <gal/util/e-util.h>
-
-
-#define PARENT_TYPE gtk_object_get_type ()
-static GtkObjectClass *parent_class = NULL;
-
struct _EHistoryPrivate {
EHistoryItemFreeFunc item_free_function;
@@ -39,6 +33,8 @@ struct _EHistoryPrivate {
GList *current_item;
};
+G_DEFINE_TYPE (EHistory, e_history, GTK_TYPE_OBJECT)
+
/* GObject methods. */
@@ -59,20 +55,21 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_history_parent_class)->finalize) (object);
}
static void
-class_init (GObjectClass *object_class)
+e_history_class_init (EHistoryClass *klass)
{
- parent_class = g_type_class_ref(PARENT_TYPE);
-
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (klass);
object_class->finalize = impl_finalize;
}
static void
-init (EHistory *history)
+e_history_init (EHistory *history)
{
EHistoryPrivate *priv;
@@ -257,5 +254,3 @@ e_history_remove_matching (EHistory *history,
}
}
-
-E_MAKE_TYPE (e_history, "EHistory", EHistory, class_init, init, GTK_TYPE_OBJECT)
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index 9871a9c1d1..c0dd2f4e6a 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -34,17 +34,11 @@
#include <libgnome/gnome-i18n.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gal/util/e-util.h>
-
#include "widgets/misc/e-clipped-label.h"
#include "e-shell-constants.h"
#include "e-shell-marshal.h"
#include "e-shell-folder-title-bar.h"
-
-#define PARENT_TYPE GTK_TYPE_HBOX
-static GtkHBox *parent_class = NULL;
-
struct _EShellFolderTitleBarPrivate {
GdkPixbuf *icon;
@@ -83,6 +77,8 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE (EShellFolderTitleBar, e_shell_folder_title_bar, GTK_TYPE_HBOX)
+
/* Utility functions for managing icons and icon widgets. */
@@ -323,7 +319,7 @@ impl_dispose (GObject *object)
priv->icon = NULL;
}
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ (* G_OBJECT_CLASS (e_shell_folder_title_bar_parent_class)->dispose) (object);
}
static void
@@ -337,7 +333,7 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_shell_folder_title_bar_parent_class)->finalize) (object);
}
@@ -394,14 +390,14 @@ impl_expose_event (GtkWidget *widget,
widget->allocation.width,
widget->allocation.height);
- (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);
+ (* GTK_WIDGET_CLASS (e_shell_folder_title_bar_parent_class)->expose_event) (widget, event);
return FALSE;
}
static void
-class_init (EShellFolderTitleBarClass *klass)
+e_shell_folder_title_bar_class_init (EShellFolderTitleBarClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -414,8 +410,6 @@ class_init (EShellFolderTitleBarClass *klass)
widget_class->size_allocate = impl_size_allocate;
widget_class->expose_event = impl_expose_event;
- parent_class = g_type_class_ref(PARENT_TYPE);
-
signals[TITLE_TOGGLED]
= g_signal_new ("title_toggled",
G_OBJECT_CLASS_TYPE (object_class),
@@ -446,7 +440,7 @@ class_init (EShellFolderTitleBarClass *klass)
}
static void
-init (EShellFolderTitleBar *shell_folder_title_bar)
+e_shell_folder_title_bar_init (EShellFolderTitleBar *shell_folder_title_bar)
{
EShellFolderTitleBarPrivate *priv;
@@ -745,5 +739,3 @@ e_shell_folder_title_bar_update_navigation_buttons (EShellFolderTitleBar *folde
gtk_widget_set_sensitive (priv->forward_button, can_go_forward);
}
-
-E_MAKE_TYPE (e_shell_folder_title_bar, "EShellFolderTitleBar", EShellFolderTitleBar, class_init, init, PARENT_TYPE)
diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c
index f99edf965d..6e6350b140 100644
--- a/shell/e-shell-offline-handler.c
+++ b/shell/e-shell-offline-handler.c
@@ -41,8 +41,6 @@
#include <gtk/gtktypeutils.h>
#include <gtk/gtkwidget.h>
-#include <gal/util/e-util.h>
-
#include <libgnome/gnome-i18n.h>
#include <glade/glade-xml.h>
@@ -54,10 +52,6 @@
#define GLADE_DIALOG_FILE_NAME EVOLUTION_GLADEDIR "/e-active-connection-dialog.glade"
-#define PARENT_TYPE GTK_TYPE_OBJECT
-static GtkObjectClass *parent_class = NULL;
-
-
/* Private part. */
struct _OfflineProgressListenerServant {
@@ -114,6 +108,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE (EShellOfflineHandler, e_shell_offline_handler, GTK_TYPE_OBJECT)
/* Forward declarations for the dialog handling. */
@@ -699,7 +694,7 @@ impl_dispose (GObject *object)
priv->dialog_gui = NULL;
}
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ (* G_OBJECT_CLASS (e_shell_offline_handler_parent_class)->dispose) (object);
}
static void
@@ -713,14 +708,14 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_shell_offline_handler_parent_class)->finalize) (object);
}
/* GTK type handling. */
static void
-class_init (EShellOfflineHandlerClass *klass)
+e_shell_offline_handler_class_init (EShellOfflineHandlerClass *klass)
{
GObjectClass *object_class;
@@ -728,8 +723,6 @@ class_init (EShellOfflineHandlerClass *klass)
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
- parent_class = g_type_class_ref(gtk_object_get_type ());
-
signals[OFFLINE_PROCEDURE_STARTED]
= g_signal_new ("offline_procedure_started",
G_OBJECT_CLASS_TYPE (object_class),
@@ -752,7 +745,7 @@ class_init (EShellOfflineHandlerClass *klass)
static void
-init (EShellOfflineHandler *shell_offline_handler)
+e_shell_offline_handler_init (EShellOfflineHandler *shell_offline_handler)
{
EShellOfflineHandlerPrivate *priv;
@@ -867,5 +860,3 @@ e_shell_offline_handler_put_components_offline (EShellOfflineHandler *offline_ha
g_object_unref (offline_handler);
}
-
-E_MAKE_TYPE (e_shell_offline_handler, "EShellOfflineHandler", EShellOfflineHandler, class_init, init, PARENT_TYPE)
diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c
index 42063ccea4..0b96b2cf63 100644
--- a/shell/e-shell-settings-dialog.c
+++ b/shell/e-shell-settings-dialog.c
@@ -30,8 +30,6 @@
#include "e-corba-config-page.h"
#include <e-util/e-icon-factory.h>
-#include <gal/util/e-util.h>
-
#include <bonobo/bonobo-widget.h>
#include <bonobo/bonobo-exception.h>
@@ -39,16 +37,12 @@
#include <string.h>
-
-#define PARENT_TYPE e_multi_config_dialog_get_type ()
-static EMultiConfigDialogClass *parent_class = NULL;
-
-
-
struct _EShellSettingsDialogPrivate {
GHashTable *types;
};
+G_DEFINE_TYPE (EShellSettingsDialog, e_shell_settings_dialog, E_TYPE_MULTI_CONFIG_DIALOG)
+
/* FIXME ugly hack to work around that sizing of invisible widgets is broken
with Bonobo. */
@@ -295,23 +289,21 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_shell_settings_dialog_parent_class)->finalize) (object);
}
static void
-class_init (EShellSettingsDialog *class)
+e_shell_settings_dialog_class_init (EShellSettingsDialogClass *klass)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS (class);
+ object_class = G_OBJECT_CLASS (klass);
object_class->finalize = impl_finalize;
-
- parent_class = g_type_class_ref(PARENT_TYPE);
}
static void
-init (EShellSettingsDialog *dialog)
+e_shell_settings_dialog_init (EShellSettingsDialog *dialog)
{
EShellSettingsDialogPrivate *priv;
@@ -367,7 +359,4 @@ e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *typ
e_multi_config_dialog_show_page (E_MULTI_CONFIG_DIALOG (dialog), page);
}
-
-E_MAKE_TYPE (e_shell_settings_dialog, "EShellSettingsDialog", EShellSettingsDialog,
- class_init, init, PARENT_TYPE)
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 05e4384c95..9625139de7 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -20,7 +20,9 @@
* Author: Ettore Perazzoli <ettore@ximian.com>
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include "e-shell-window.h"
@@ -32,8 +34,6 @@
#include "e-sidebar.h"
#include "es-menu.h"
-#include <gal/util/e-util.h>
-
#include <gtk/gtkbutton.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkhpaned.h>
@@ -55,10 +55,6 @@
#include <string.h>
-#define PARENT_TYPE gtk_window_get_type ()
-static GtkWindowClass *parent_class = NULL;
-
-
/* A view for each component. These are all created when EShellWindow is
instantiated, but with the widget pointers to NULL and the page number set
to -1. When the views are created the first time, the widget pointers as
@@ -121,6 +117,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE (EShellWindow, e_shell_window, BONOBO_TYPE_WINDOW)
/* The icons for the offline/online status. */
@@ -704,7 +701,7 @@ impl_dispose (GObject *object)
priv->tooltips = NULL;
}
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ (* G_OBJECT_CLASS (e_shell_window_parent_class)->dispose) (object);
}
static void
@@ -719,22 +716,20 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_shell_window_parent_class)->finalize) (object);
}
/* Initialization. */
static void
-class_init (EShellWindowClass *class)
+e_shell_window_class_init (EShellWindowClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
- parent_class = g_type_class_peek_parent (class);
-
signals[COMPONENT_CHANGED] = g_signal_new ("component_changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
@@ -747,7 +742,7 @@ class_init (EShellWindowClass *class)
}
static void
-init (EShellWindow *shell_window)
+e_shell_window_init (EShellWindow *shell_window)
{
EShellWindowPrivate *priv = g_new0 (EShellWindowPrivate, 1);
@@ -936,5 +931,3 @@ e_shell_window_show_settings (EShellWindow *window)
e_shell_show_settings (window->priv->shell, window->priv->current_view ? window->priv->current_view->component_alias : NULL, window);
}
-
-E_MAKE_TYPE (e_shell_window, "EShellWindow", EShellWindow, class_init, init, BONOBO_TYPE_WINDOW)
diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c
index e412736b0a..fc1ca4dd90 100644
--- a/shell/e-sidebar.c
+++ b/shell/e-sidebar.c
@@ -20,24 +20,20 @@
* Author: Ettore Perazzoli <ettore@ximian.com>
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include "e-sidebar.h"
#include "e-shell-marshal.h"
-#include <gal/util/e-util.h>
-
#include <gtk/gtkhbox.h>
#include <gtk/gtkimage.h>
#include <gtk/gtklabel.h>
#include <gtk/gtktogglebutton.h>
-#define PARENT_TYPE gtk_container_get_type ()
-static GtkContainerClass *parent_class = NULL;
-
-
typedef struct {
GtkWidget *button_widget;
GtkWidget *label;
@@ -63,6 +59,7 @@ enum {
static unsigned int signals[NUM_SIGNALS] = { 0 };
+G_DEFINE_TYPE (ESidebar, e_sidebar, GTK_TYPE_CONTAINER)
#define H_PADDING 6
#define V_PADDING 6
@@ -365,7 +362,7 @@ impl_dispose (GObject *object)
g_slist_free (priv->buttons);
priv->buttons = NULL;
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ (* G_OBJECT_CLASS (e_sidebar_parent_class)->dispose) (object);
}
static void
@@ -375,18 +372,18 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_sidebar_parent_class)->finalize) (object);
}
/* Initialization. */
static void
-class_init (ESidebarClass *class)
+e_sidebar_class_init (ESidebarClass *klass)
{
- GtkContainerClass *container_class = GTK_CONTAINER_CLASS (class);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
- GObjectClass *object_class = G_OBJECT_CLASS (class);
+ GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
container_class->forall = impl_forall;
container_class->remove = impl_remove;
@@ -397,9 +394,6 @@ class_init (ESidebarClass *class)
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
- parent_class = g_type_class_peek_parent (class);
-
-
signals[BUTTON_SELECTED]
= g_signal_new ("button_selected",
G_OBJECT_CLASS_TYPE (object_class),
@@ -412,7 +406,7 @@ class_init (ESidebarClass *class)
}
static void
-init (ESidebar *sidebar)
+e_sidebar_init (ESidebar *sidebar)
{
ESidebarPrivate *priv;
@@ -530,6 +524,3 @@ e_sidebar_set_mode (ESidebar *sidebar, ESidebarMode mode)
gtk_widget_queue_resize (GTK_WIDGET (sidebar));
}
-
-
-E_MAKE_TYPE (e_sidebar, "ESidebar", ESidebar, class_init, init, PARENT_TYPE)
diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c
index e635278c68..a631304435 100644
--- a/shell/e-user-creatable-items-handler.c
+++ b/shell/e-user-creatable-items-handler.c
@@ -32,8 +32,6 @@
#include "e-util/e-corba-utils.h"
#include "widgets/misc/e-combo-button.h"
-#include <gal/util/e-util.h>
-
#include <bonobo/bonobo-ui-util.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-control.h>
@@ -52,11 +50,6 @@
#include <ctype.h>
#include <string.h>
-
-#define PARENT_TYPE G_TYPE_OBJECT
-static GObjectClass *parent_class = NULL;
-
-
struct _Component {
char *id, *alias;
GNOME_Evolution_Component component;
@@ -109,6 +102,7 @@ enum {
LAST_PROP
};
+G_DEFINE_TYPE (EUserCreatableItemsHandler, e_user_creatable_items_handler, G_TYPE_OBJECT)
/* Component struct handling. */
@@ -767,7 +761,7 @@ impl_dispose (GObject *object)
priv->accel_group = NULL;
}
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ (* G_OBJECT_CLASS (e_user_creatable_items_handler_parent_class)->dispose) (object);
}
static void
@@ -788,15 +782,16 @@ impl_finalize (GObject *object)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (e_user_creatable_items_handler_parent_class)->finalize) (object);
}
static void
-class_init (GObjectClass *object_class)
+e_user_creatable_items_handler_class_init (EUserCreatableItemsHandlerClass *klass)
{
- parent_class = g_type_class_ref(PARENT_TYPE);
-
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (klass);
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
object_class->set_property = impl_set_property;
@@ -810,7 +805,7 @@ class_init (GObjectClass *object_class)
}
static void
-init (EUserCreatableItemsHandler *handler)
+e_user_creatable_items_handler_init (EUserCreatableItemsHandler *handler)
{
EUserCreatableItemsHandlerPrivate *priv;
@@ -869,4 +864,4 @@ e_user_creatable_items_handler_activate (EUserCreatableItemsHandler *handler,
NULL);
}
-E_MAKE_TYPE (e_user_creatable_items_handler, "EUserCreatableItemsHandler", EUserCreatableItemsHandler, class_init, init, PARENT_TYPE)
+
diff --git a/shell/importer/evolution-importer-client.c b/shell/importer/evolution-importer-client.c
index 78a3e551f8..e72ae36a0a 100644
--- a/shell/importer/evolution-importer-client.c
+++ b/shell/importer/evolution-importer-client.c
@@ -32,12 +32,10 @@
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-widget.h>
#include <bonobo/bonobo-exception.h>
-#include <gal/util/e-util.h>
#include "GNOME_Evolution_Importer.h"
-
-#define PARENT_TYPE G_TYPE_OBJECT
-static GObjectClass *parent_class = NULL;
+
+G_DEFINE_TYPE (EvolutionImporterClient, evolution_importer_client, G_TYPE_OBJECT)
static void
@@ -45,22 +43,21 @@ finalise (GObject *object)
{
/* FIXME: should this unref the client->objref?? */
- parent_class->finalize(object);
+ (* G_OBJECT_CLASS (evolution_importer_client_parent_class)->finalize) (object);
}
static void
-class_init (EvolutionImporterClientClass *klass)
+evolution_importer_client_class_init (EvolutionImporterClientClass *klass)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_ref(PARENT_TYPE);
object_class->finalize = finalise;
}
static void
-init (EvolutionImporterClient *client)
+evolution_importer_client_init (EvolutionImporterClient *client)
{
}
@@ -267,6 +264,3 @@ evolution_importer_client_get_error (EvolutionImporterClient *client)
return str;
}
-
-E_MAKE_TYPE (evolution_importer_client, "EvolutionImporterClient",
- EvolutionImporterClient, class_init, init, PARENT_TYPE)