aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-04-29 09:38:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-04-29 09:38:15 +0800
commit9192f0dc883acfaff0fbe3f6a7f8e49672546a02 (patch)
tree2184176417efab7fc754de058d5739bec0468fc1 /e-util
parent0b04c6cfd743afcf5a4e6a195a120776074cb2a7 (diff)
parentc868ace2e93942aef027085353bff2bd736584b3 (diff)
downloadgsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.gz
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.bz2
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.lz
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.xz
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.zst
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.zip
Merge branch 'master' into kill-bonobo
Conflicts: a11y/widgets/Makefile.am a11y/widgets/ea-widgets.c a11y/widgets/ea-widgets.h addressbook/gui/component/addressbook-component.c calendar/gui/Makefile.am calendar/gui/calendar-component.c calendar/gui/dialogs/comp-editor.c calendar/gui/dialogs/event-editor.c calendar/gui/dialogs/memo-editor.c calendar/gui/dialogs/task-editor.c calendar/gui/memos-component.c calendar/gui/tasks-component.c composer/e-composer-private.c composer/e-msg-composer.c configure.in e-util/e-plugin-ui.c e-util/e-plugin-ui.h mail/ChangeLog mail/Makefile.am mail/e-mail-attachment-bar.c mail/em-format-html-display.c mail/em-format-html-display.h mail/em-format-html.h mail/em-format.h mail/em-popup.c mail/mail-component.c plugins/external-editor/external-editor.c widgets/misc/Makefile.am widgets/misc/e-attachment-paned.c widgets/misc/e-attachment-view.c widgets/misc/e-attachment.c
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-util.c30
-rw-r--r--e-util/e-util.h5
2 files changed, 35 insertions, 0 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 071f5e58b8..04be119657 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1531,3 +1531,33 @@ e_camel_object_get_type (void)
return type;
}
+
+static gpointer
+e_camel_object_copy (gpointer camel_object)
+{
+ if (CAMEL_IS_OBJECT (camel_object))
+ camel_object_ref (camel_object);
+
+ return camel_object;
+}
+
+static void
+e_camel_object_free (gpointer camel_object)
+{
+ if (CAMEL_IS_OBJECT (camel_object))
+ camel_object_unref (camel_object);
+}
+
+GType
+e_camel_object_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ type = g_boxed_type_register_static (
+ "ECamelObject",
+ (GBoxedCopyFunc) e_camel_object_copy,
+ (GBoxedFreeFunc) e_camel_object_free);
+
+ return type;
+}
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 34ef3466d3..c748aaed8e 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -151,6 +151,11 @@ GType e_camel_object_get_type (void);
#define E_TYPE_CAMEL_OBJECT (e_camel_object_get_type ())
GType e_camel_object_get_type (void);
+/* Camel uses its own object system, so we have to box
+ * CamelObjects to safely use them as GObject properties. */
+#define E_TYPE_CAMEL_OBJECT (e_camel_object_get_type ())
+GType e_camel_object_get_type (void);
+
G_END_DECLS
#endif /* _E_UTIL_H_ */