diff options
author | JP Rosevear <jpr@ximian.com> | 2004-01-17 00:29:21 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-01-17 00:29:21 +0800 |
commit | 9b9570bd65b6ff0b6015380beec2a40a4c486156 (patch) | |
tree | ad9a9ac8801b54aae1517998b798c7d05f3c71e9 /calendar/gui/e-comp-editor-registry.h | |
parent | 3889b52931d894b52a0a734306b91ea60f693fb4 (diff) | |
download | gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.tar gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.tar.gz gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.tar.bz2 gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.tar.lz gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.tar.xz gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.tar.zst gsoc2013-evolution-9b9570bd65b6ff0b6015380beec2a40a4c486156.zip |
convert to GObject
2004-01-16 JP Rosevear <jpr@ximian.com>
* 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
Diffstat (limited to 'calendar/gui/e-comp-editor-registry.h')
-rw-r--r-- | calendar/gui/e-comp-editor-registry.h | 29 |
1 files changed, 12 insertions, 17 deletions
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 <config.h> #endif -#include <gtk/gtk.h> +#include <glib-object.h> #include <dialogs/comp-editor.h> -#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_ */ |