[glade] Make GladeEditable implement GladePropertyEditor implicitly.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Make GladeEditable implement GladePropertyEditor implicitly.
- Date: Sat, 13 Apr 2013 17:50:37 +0000 (UTC)
commit 0b4064434538e7b16ec130452578dfaaf5cb645c
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sat Apr 13 18:06:37 2013 +0900
Make GladeEditable implement GladePropertyEditor implicitly.
GladeEditable is a superset of GladePropertyEditor, implementing
GladeEditable is an implicit implementation of GladePropertyEditor.
gladeui/glade-editable.c | 24 +++++++++++++++++++++++-
gladeui/glade-editable.h | 1 -
2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/gladeui/glade-editable.c b/gladeui/glade-editable.c
index d205c39..2adc96d 100644
--- a/gladeui/glade-editable.c
+++ b/gladeui/glade-editable.c
@@ -33,8 +33,30 @@
#include "glade-project.h"
#include "glade-widget.h"
#include "glade-editable.h"
+#include "glade-property-editor.h"
-G_DEFINE_INTERFACE (GladeEditable, glade_editable, GTK_TYPE_WIDGET);
+
+static void glade_editable_property_editor_init (GladePropertyEditorInterface *iface);
+
+G_DEFINE_INTERFACE_WITH_CODE (GladeEditable, glade_editable, GTK_TYPE_WIDGET,
+ G_IMPLEMENT_INTERFACE (GLADE_TYPE_PROPERTY_EDITOR,
+ glade_editable_property_editor_init));
+
+/*******************************************************************************
+ * GladePropertyEditorInterface *
+ *******************************************************************************/
+static void
+glade_editable_property_editor_load (GladePropertyEditor *editor,
+ GladeWidget *widget)
+{
+ glade_editable_load (GLADE_EDITABLE (editor), widget);
+}
+
+static void
+glade_editable_property_editor_init (GladePropertyEditorInterface *iface)
+{
+ iface->load = glade_editable_property_editor_load;
+}
static GQuark glade_editable_project_quark = 0;
static GQuark glade_editable_widget_quark = 0;
diff --git a/gladeui/glade-editable.h b/gladeui/glade-editable.h
index 279c9d4..1175810 100644
--- a/gladeui/glade-editable.h
+++ b/gladeui/glade-editable.h
@@ -51,7 +51,6 @@ gboolean glade_editable_loading (GladeEditable *editable);
void glade_editable_block (GladeEditable *editable);
void glade_editable_unblock (GladeEditable *editable);
-
G_END_DECLS
#endif /* __GLADE_EDITABLE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]