[gnome-todo/wip/gbsneto/plugins: 33/62] project: fix interfaces declarations
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/gbsneto/plugins: 33/62] project: fix interfaces declarations
- Date: Fri, 15 Jan 2016 01:05:57 +0000 (UTC)
commit 717f8a96ac93639b279daf743fe2becbc4482df6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Dec 27 23:24:35 2015 -0200
project: fix interfaces declarations
src/interfaces/gtd-activatable.c | 55 +++++++++++++++++++++++++++++++-------
src/interfaces/gtd-panel.c | 17 +++++------
src/interfaces/gtd-panel.h | 4 +-
3 files changed, 55 insertions(+), 21 deletions(-)
---
diff --git a/src/interfaces/gtd-activatable.c b/src/interfaces/gtd-activatable.c
index 995092c..9f6298d 100644
--- a/src/interfaces/gtd-activatable.c
+++ b/src/interfaces/gtd-activatable.c
@@ -17,12 +17,15 @@
*/
#include "gtd-activatable.h"
+#include "gtd-panel.h"
#include "gtd-provider.h"
G_DEFINE_INTERFACE (GtdActivatable, gtd_activatable, PEAS_TYPE_ACTIVATABLE)
enum
{
+ PANEL_ADDED,
+ PANEL_REMOVED,
PROVIDER_ADDED,
PROVIDER_CHANGED,
PROVIDER_REMOVED,
@@ -40,11 +43,10 @@ gtd_activatable_default_init (GtdActivatableInterface *iface)
* 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));
+ g_param_spec_pointer ("panels",
+ "Panels this widget has",
+ "A list of panel this widget has",
+ G_PARAM_READABLE));
/**
* GtdActivatable::providers:
@@ -52,11 +54,44 @@ gtd_activatable_default_init (GtdActivatableInterface *iface)
* A list of #GtdProvider this plugin carries.
*/
g_object_interface_install_property (iface,
- g_param_spec_boxed ("providers",
- "Providers this widget has",
- "A list of providers this widget has",
- G_TYPE_POINTER,
- G_PARAM_READABLE));
+ g_param_spec_pointer ("providers",
+ "Providers this widget has",
+ "A list of providers this widget has",
+ G_PARAM_READABLE));
+
+ /**
+ * GtdActivatable::panel-added:
+ *
+ * The ::panel-added signal is emmited after a #GtdPanel
+ * is connected.
+ */
+ signals[PANEL_ADDED] = g_signal_new ("panel-added",
+ GTD_TYPE_ACTIVATABLE,
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 1,
+ GTD_TYPE_PANEL);
+
+ /**
+ * GtdActivatable::panel-removed:
+ *
+ * The ::panel-removed signal is emmited after a #GtdPanel
+ * is removed from the list.
+ */
+ signals[PANEL_REMOVED] = g_signal_new ("panel-removed",
+ GTD_TYPE_ACTIVATABLE,
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 1,
+ GTD_TYPE_PANEL);
/**
* GtdActivatable::provider-added:
diff --git a/src/interfaces/gtd-panel.c b/src/interfaces/gtd-panel.c
index 62f7a71..c93697d 100644
--- a/src/interfaces/gtd-panel.c
+++ b/src/interfaces/gtd-panel.c
@@ -56,11 +56,10 @@ gtd_panel_default_init (GtdPanelInterface *iface)
* A #GList of widgets to be added to the headerbar.
*/
g_object_interface_install_property (iface,
- g_param_spec_boxed ("header-widgets",
- "The header widgets",
- "The widgets to be added in the headerbar",
- G_TYPE_POINTER,
- G_PARAM_READABLE));
+ g_param_spec_pointer ("header-widgets",
+ "The header widgets",
+ "The widgets to be added in the headerbar",
+ G_PARAM_READABLE));
/**
* GtdPanel::menu:
@@ -94,13 +93,13 @@ gtd_panel_get_title (GtdPanel *panel)
return GTD_PANEL_GET_IFACE (panel)->get_title (panel);
}
-const GtkWidget*
-gtd_panel_get_header_widget (GtdPanel *panel)
+GList*
+gtd_panel_get_header_widgets (GtdPanel *panel)
{
g_return_val_if_fail (GTD_IS_PANEL (panel), NULL);
- g_return_val_if_fail (GTD_PANEL_GET_IFACE (panel)->get_header_widget, NULL);
+ g_return_val_if_fail (GTD_PANEL_GET_IFACE (panel)->get_header_widgets, NULL);
- return GTD_PANEL_GET_IFACE (panel)->get_header_widget (panel);
+ return GTD_PANEL_GET_IFACE (panel)->get_header_widgets (panel);
}
const GMenu*
diff --git a/src/interfaces/gtd-panel.h b/src/interfaces/gtd-panel.h
index 55f99b8..690b85b 100644
--- a/src/interfaces/gtd-panel.h
+++ b/src/interfaces/gtd-panel.h
@@ -39,7 +39,7 @@ struct _GtdPanelInterface
const gchar* (*get_title) (GtdPanel *panel);
- const GtkWidget* (*get_header_widget) (GtdPanel *panel);
+ GList* (*get_header_widgets) (GtdPanel *panel);
const GMenu* (*get_menu) (GtdPanel *panel);
};
@@ -48,7 +48,7 @@ const gchar* gtd_panel_get_name (GtdPanel
const gchar* gtd_panel_get_title (GtdPanel *panel);
-const GtkWidget* gtd_panel_get_header_widget (GtdPanel *panel);
+GList* gtd_panel_get_header_widgets (GtdPanel *panel);
const GMenu* gtd_panel_get_menu (GtdPanel *panel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]