[gedit/wip/configurable] Add get_page_id
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/configurable] Add get_page_id
- Date: Sat, 27 Apr 2013 13:07:03 +0000 (UTC)
commit 80f39a6c3721490f1df7892871c6c898a505f54f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 27 15:06:50 2013 +0200
Add get_page_id
gedit/gedit-configurable.c | 24 ++++++++++++++++++++++++
gedit/gedit-configurable.h | 2 ++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-configurable.c b/gedit/gedit-configurable.c
index 2a0f00d..864aa37 100644
--- a/gedit/gedit-configurable.c
+++ b/gedit/gedit-configurable.c
@@ -42,6 +42,30 @@ gedit_configurable_default_init (GeditConfigurableInterface *iface)
}
/**
+ * gedit_configurable_get_page_id:
+ * @configurable: A #GeditConfigurable.
+ *
+ * Returns: (transfer none):
+ */
+const gchar *
+gedit_configurable_get_page_id (GeditConfigurable *configurable)
+{
+ GeditConfigurableInterface *iface;
+
+ g_return_val_if_fail (GEDIT_IS_CONFIGURABLE (configurable), NULL);
+
+ iface = GEDIT_CONFIGURABLE_GET_IFACE (configurable);
+
+ if (G_LIKELY (iface->get_page_id != NULL))
+ {
+ return iface->get_page_id (configurable);
+ }
+
+ /* Default implementation */
+ return NULL;
+}
+
+/**
* gedit_configurable_get_page_name:
* @configurable: A #GeditConfigurable.
*
diff --git a/gedit/gedit-configurable.h b/gedit/gedit-configurable.h
index f93bd53..59b4290 100644
--- a/gedit/gedit-configurable.h
+++ b/gedit/gedit-configurable.h
@@ -51,12 +51,14 @@ struct _GeditConfigurableInterface
{
GTypeInterface g_iface;
+ const gchar *(*get_page_id) (GeditConfigurable *configurable);
const gchar *(*get_page_name) (GeditConfigurable *configurable);
GtkWidget *(*create_configure_widget) (GeditConfigurable *configurable);
};
GType gedit_configurable_get_type (void) G_GNUC_CONST;
+const gchar *gedit_configurable_get_page_id (GeditConfigurable *configurable);
const gchar *gedit_configurable_get_page_name (GeditConfigurable *configurable);
GtkWidget *gedit_configurable_create_configure_widget (GeditConfigurable *configurable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]