[gnome-todo/wip/gbsneto/plugins: 3/10] activatable: readd ::panels property
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/gbsneto/plugins: 3/10] activatable: readd ::panels property
- Date: Mon, 28 Dec 2015 01:58:20 +0000 (UTC)
commit 956ab92221bb41c8ce54caf0d85f2d843dfb4af1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Dec 27 16:10:38 2015 -0200
activatable: readd ::panels property
This reverts commit 1bd97bc15e59f724e1b816257356e66e068fe681.
src/interfaces/gtd-activatable.c | 47 ++++++++++++++++++++++++++++++++++---
src/interfaces/gtd-activatable.h | 4 +++
2 files changed, 47 insertions(+), 4 deletions(-)
---
diff --git a/src/interfaces/gtd-activatable.c b/src/interfaces/gtd-activatable.c
index 139464b..995092c 100644
--- a/src/interfaces/gtd-activatable.c
+++ b/src/interfaces/gtd-activatable.c
@@ -35,15 +35,28 @@ static void
gtd_activatable_default_init (GtdActivatableInterface *iface)
{
/**
+ * GtdActivatable::panels:
+ *
+ * A list of #GtdPanel this plugin carries.
+ */
+ g_object_interface_install_property (iface,
+ g_param_spec_boxed ("panels",
+ "Panels this widget has",
+ "A list of panel this widget has",
+ G_TYPE_POINTER,
+ G_PARAM_READABLE));
+
+ /**
* GtdActivatable::providers:
*
* A list of #GtdProvider this plugin carries.
*/
g_object_interface_install_property (iface,
- g_param_spec_pointer ("providers",
- "Providers this widget has",
- "A list of providers this widget has",
- G_PARAM_READABLE));
+ g_param_spec_boxed ("providers",
+ "Providers this widget has",
+ "A list of providers this widget has",
+ G_TYPE_POINTER,
+ G_PARAM_READABLE));
/**
* GtdActivatable::provider-added:
@@ -63,6 +76,23 @@ gtd_activatable_default_init (GtdActivatableInterface *iface)
GTD_TYPE_PROVIDER);
/**
+ * GtdActivatable::provider-changed:
+ *
+ * The ::provider-changed signal is emmited after a #GtdProvider
+ * has any of it's properties changed.
+ */
+ signals[PROVIDER_CHANGED] = g_signal_new ("provider-changed",
+ GTD_TYPE_ACTIVATABLE,
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 1,
+ GTD_TYPE_PROVIDER);
+
+ /**
* GtdActivatable::provider-removed:
*
* The ::provider-removed signal is emmited after a #GtdProvider
@@ -81,6 +111,15 @@ gtd_activatable_default_init (GtdActivatableInterface *iface)
}
GList*
+gtd_activatable_get_panels (GtdActivatable *activatable)
+{
+ g_return_val_if_fail (GTD_IS_ACTIVATABLE (activatable), NULL);
+ g_return_val_if_fail (GTD_ACTIVATABLE_GET_IFACE (activatable)->get_panels, NULL);
+
+ return GTD_ACTIVATABLE_GET_IFACE (activatable)->get_panels (activatable);
+}
+
+GList*
gtd_activatable_get_providers (GtdActivatable *activatable)
{
g_return_val_if_fail (GTD_IS_ACTIVATABLE (activatable), NULL);
diff --git a/src/interfaces/gtd-activatable.h b/src/interfaces/gtd-activatable.h
index a5f7df2..4a14807 100644
--- a/src/interfaces/gtd-activatable.h
+++ b/src/interfaces/gtd-activatable.h
@@ -32,9 +32,13 @@ struct _GtdActivatableInterface
{
PeasActivatableInterface parent;
+ GList* (*get_panels) (GtdActivatable *activatable);
+
GList* (*get_providers) (GtdActivatable *activatable);
};
+GList* gtd_activatable_get_panels (GtdActivatable *activatable);
+
GList* gtd_activatable_get_providers (GtdActivatable *activatable);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]