[totem] Require libpeas 0.5.4
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Require libpeas 0.5.4
- Date: Fri, 6 Aug 2010 15:40:35 +0000 (UTC)
commit 3f013e69936a13287a42339f7c1afbd2499c7af9
Author: Bastien Nocera <hadess hadess net>
Date: Fri Aug 6 16:37:45 2010 +0100
Require libpeas 0.5.4
And update the helper macros.
configure.in | 2 +-
src/plugins/totem-plugin.h | 80 ++++++++++++++++++++++++++++++++++--
src/plugins/totem-plugins-engine.c | 4 +-
3 files changed, 80 insertions(+), 6 deletions(-)
---
diff --git a/configure.in b/configure.in
index 9034177..ee391b1 100644
--- a/configure.in
+++ b/configure.in
@@ -48,7 +48,7 @@ TOTEM_PLPARSER_REQS=2.29.1
GNOMEICON_REQS=2.15.90
DBUS_REQS=0.61
VALA_REQS=0.7.5
-PEAS_REQS=0.5.3
+PEAS_REQS=0.5.4
AC_SUBST(GLIB_REQS)
AC_SUBST(GTK_REQS)
diff --git a/src/plugins/totem-plugin.h b/src/plugins/totem-plugin.h
index e2f7412..c9e1b07 100644
--- a/src/plugins/totem-plugin.h
+++ b/src/plugins/totem-plugin.h
@@ -46,10 +46,14 @@ G_BEGIN_DECLS
* deactivate functions.
**/
#define TOTEM_PLUGIN_REGISTER(TYPE_NAME, TypeName, type_name) \
- static void impl_activate (PeasActivatable *plugin, GObject *totem); \
- static void impl_deactivate (PeasActivatable *plugin, GObject *totem); \
+ static void impl_activate (PeasActivatable *plugin); \
+ static void impl_deactivate (PeasActivatable *plugin); \
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); \
static void peas_activatable_iface_init (PeasActivatableInterface *iface); \
+ enum { \
+ PROP_0, \
+ PROP_OBJECT \
+ }; \
G_DEFINE_DYNAMIC_TYPE_EXTENDED (TypeName, \
type_name, \
PEAS_TYPE_EXTENSION_BASE, \
@@ -63,6 +67,38 @@ G_BEGIN_DECLS
iface->deactivate = impl_deactivate; \
} \
static void \
+ set_property (GObject *object, \
+ guint prop_id, \
+ const GValue *value, \
+ GParamSpec *pspec) \
+ { \
+ switch (prop_id) { \
+ case PROP_OBJECT: \
+ g_object_set_data_full (object, "object", \
+ g_value_dup_object (value), \
+ g_object_unref); \
+ break; \
+ default: \
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); \
+ break; \
+ } \
+ } \
+ static void \
+ get_property (GObject *object, \
+ guint prop_id, \
+ GValue *value, \
+ GParamSpec *pspec) \
+ { \
+ switch (prop_id) { \
+ case PROP_OBJECT: \
+ g_value_set_object (value, g_object_get_data (object, "object")); \
+ break; \
+ default: \
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); \
+ break; \
+ } \
+ } \
+ static void \
type_name##_class_finalize (TypeName##Class *klass) \
{ \
} \
@@ -85,12 +121,16 @@ G_BEGIN_DECLS
* and deactivate and widget creation functions.
**/
#define TOTEM_PLUGIN_REGISTER_CONFIGURABLE(TYPE_NAME, TypeName, type_name) \
- static void impl_activate (PeasActivatable *plugin, GObject *totem); \
- static void impl_deactivate (PeasActivatable *plugin, GObject *totem); \
+ static void impl_activate (PeasActivatable *plugin); \
+ static void impl_deactivate (PeasActivatable *plugin); \
static GtkWidget *impl_create_configure_widget (PeasUIConfigurable *configurable); \
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); \
static void peas_activatable_iface_init (PeasActivatableInterface *iface); \
static void peas_ui_configurable_iface_init (PeasUIConfigurableInterface *iface); \
+ enum { \
+ PROP_0, \
+ PROP_OBJECT \
+ }; \
G_DEFINE_DYNAMIC_TYPE_EXTENDED (TypeName, \
type_name, \
PEAS_TYPE_EXTENSION_BASE, \
@@ -111,6 +151,38 @@ G_BEGIN_DECLS
iface->create_configure_widget = impl_create_configure_widget; \
} \
static void \
+ set_property (GObject *object, \
+ guint prop_id, \
+ const GValue *value, \
+ GParamSpec *pspec) \
+ { \
+ switch (prop_id) { \
+ case PROP_OBJECT: \
+ g_object_set_data_full (object, "object", \
+ g_value_dup_object (value), \
+ g_object_unref); \
+ break; \
+ default: \
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); \
+ break; \
+ } \
+ } \
+ static void \
+ get_property (GObject *object, \
+ guint prop_id, \
+ GValue *value, \
+ GParamSpec *pspec) \
+ { \
+ switch (prop_id) { \
+ case PROP_OBJECT: \
+ g_value_set_object (value, g_object_get_data (object, "object")); \
+ break; \
+ default: \
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); \
+ break; \
+ } \
+ } \
+ static void \
type_name##_class_finalize (TypeName##Class *klass) \
{ \
} \
diff --git a/src/plugins/totem-plugins-engine.c b/src/plugins/totem-plugins-engine.c
index 4cd9f47..14f178d 100644
--- a/src/plugins/totem-plugins-engine.c
+++ b/src/plugins/totem-plugins-engine.c
@@ -208,7 +208,9 @@ totem_plugins_engine_get_default (TotemObject *totem)
engine->priv->totem = g_object_ref (totem);
engine->priv->activatable_extensions = peas_extension_set_new (PEAS_ENGINE (engine),
- PEAS_TYPE_ACTIVATABLE);
+ PEAS_TYPE_ACTIVATABLE,
+ "object", totem,
+ NULL);
totem_plugins_engine_load_all (engine);
totem_plugins_engine_monitor (engine);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]