From 9b9570bd65b6ff0b6015380beec2a40a4c486156 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Fri, 16 Jan 2004 16:29:21 +0000 Subject: convert to GObject 2004-01-16 JP Rosevear * gui/e-comp-editor-registry.h: convert to GObject * gui/e-comp-editor-registry.c (registry_data_free): routine to free the registry data (dispose): destroy the registry data (finalize): finalize it (class_init): setup above (init): create full hash table (e_comp_editor_registry_add): weak ref the editor and strdup the hash table key (editor_destroy_cb): we get the registry data now, just remove it * gui/dialogs/comp-editor.c (close_dialog): disconnect the signal handlers, its a bit of a hack but it is a simple fix svn path=/trunk/; revision=24277 --- calendar/gui/e-comp-editor-registry.h | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'calendar/gui/e-comp-editor-registry.h') diff --git a/calendar/gui/e-comp-editor-registry.h b/calendar/gui/e-comp-editor-registry.h index dfcc1b21bc..6ddf2f34e5 100644 --- a/calendar/gui/e-comp-editor-registry.h +++ b/calendar/gui/e-comp-editor-registry.h @@ -27,19 +27,16 @@ #include #endif -#include +#include #include -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ +G_BEGIN_DECLS -#define E_TYPE_COMP_EDITOR_REGISTRY (e_comp_editor_registry_get_type ()) -#define E_COMP_EDITOR_REGISTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_COMP_EDITOR_REGISTRY, ECompEditorRegistry)) -#define E_COMP_EDITOR_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_COMP_EDITOR_REGISTRY, ECompEditorRegistryClass)) -#define E_IS_COMP_EDITOR_REGISTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_COMP_EDITOR_REGISTRY)) -#define E_IS_COMP_EDITOR_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_COMP_EDITOR_REGISTRY)) +#define E_TYPE_COMP_EDITOR_REGISTRY (e_comp_editor_registry_get_type ()) +#define E_COMP_EDITOR_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_COMP_EDITOR_REGISTRY, ECompEditorRegistry)) +#define E_COMP_EDITOR_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_COMP_EDITOR_REGISTRY, ECompEditorRegistryClass)) +#define E_IS_COMP_EDITOR_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_COMP_EDITOR_REGISTRY)) +#define E_IS_COMP_EDITOR_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_COMP_EDITOR_REGISTRY)) typedef struct _ECompEditorRegistry ECompEditorRegistry; @@ -47,13 +44,13 @@ typedef struct _ECompEditorRegistryPrivate ECompEditorRegistryPrivate; typedef struct _ECompEditorRegistryClass ECompEditorRegistryClass; struct _ECompEditorRegistry { - GtkObject parent; + GObject parent; ECompEditorRegistryPrivate *priv; }; struct _ECompEditorRegistryClass { - GtkObjectClass parent_class; + GObjectClass parent_class; }; typedef void (* ECompEditorRegistryForeachFn) (CompEditor *editor, gpointer data); @@ -61,8 +58,8 @@ typedef void (* ECompEditorRegistryForeachFn) (CompEditor *editor, gpointer data -GtkType e_comp_editor_registry_get_type (void); -GtkObject *e_comp_editor_registry_new (void); +GType e_comp_editor_registry_get_type (void); +GObject *e_comp_editor_registry_new (void); void e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboolean remote); @@ -70,9 +67,7 @@ CompEditor *e_comp_editor_registry_find (ECompEditorRegistry *reg, const char *uid); gboolean e_comp_editor_registry_close_all (ECompEditorRegistry *reg); -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif /* _E_COMP_EDITOR_REGISTRY_H_ */ -- cgit v1.2.3