[glade] o Added glade_editable_loading().
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] o Added glade_editable_loading().
- Date: Mon, 7 Mar 2011 20:22:48 +0000 (UTC)
commit 57fbb453476defd25d80be85b8cab4a570f753f1
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Mar 7 16:39:17 2011 +0900
o Added glade_editable_loading().
ChangeLog | 4 +++-
gladeui/glade-editable.c | 12 ++++++++++++
gladeui/glade-editable.h | 1 +
3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5a6cbfd..ae74da6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2011-03-07 Tristan Van Berkom <tristanvb openismus com>
- * gladeui/glade-editable.[ch]: Added glade_editable_loaded_widget().
+ * gladeui/glade-editable.[ch]:
+ o Added glade_editable_loaded_widget().
+ o Added glade_editable_loading().
* gladeui/glade-editor-property.c: Fixed glade_editor_property_commit() to
use glade_editor_property_load() instead of the vfunc directly.
diff --git a/gladeui/glade-editable.c b/gladeui/glade-editable.c
index 7bcaa17..33c37cf 100644
--- a/gladeui/glade-editable.c
+++ b/gladeui/glade-editable.c
@@ -36,6 +36,7 @@
static GQuark glade_editable_project_quark = 0;
static GQuark glade_editable_widget_quark = 0;
+static GQuark glade_editable_loading_quark = 0;
static void
project_changed (GladeProject *project,
@@ -98,6 +99,7 @@ glade_editable_class_init (GladeEditableIface *iface)
{
glade_editable_project_quark = g_quark_from_static_string ("glade-editable-project-quark");
glade_editable_widget_quark = g_quark_from_static_string ("glade-editable-widget-quark");
+ glade_editable_loading_quark = g_quark_from_static_string ("glade-editable-loading-quark");
iface->load = glade_editable_load_default;
}
@@ -139,11 +141,15 @@ glade_editable_load (GladeEditable * editable, GladeWidget * widget)
iface = GLADE_EDITABLE_GET_IFACE (editable);
+ g_object_set_qdata (G_OBJECT (editable), glade_editable_loading_quark, GINT_TO_POINTER (TRUE));
+
if (iface->load)
iface->load (editable, widget);
else
g_critical ("No GladeEditable::load() support on type %s",
G_OBJECT_TYPE_NAME (editable));
+
+ g_object_set_qdata (G_OBJECT (editable), glade_editable_loading_quark, GINT_TO_POINTER (FALSE));
}
@@ -175,6 +181,12 @@ glade_editable_loaded_widget (GladeEditable *editable)
return g_object_get_qdata (G_OBJECT (editable), glade_editable_widget_quark);
}
+gboolean
+glade_editable_loading (GladeEditable *editable)
+{
+ return GPOINTER_TO_INT (g_object_get_qdata (G_OBJECT (editable), glade_editable_loading_quark));
+}
+
void
glade_editable_block (GladeEditable *editable)
{
diff --git a/gladeui/glade-editable.h b/gladeui/glade-editable.h
index db80d44..6317e92 100644
--- a/gladeui/glade-editable.h
+++ b/gladeui/glade-editable.h
@@ -44,6 +44,7 @@ void glade_editable_load (GladeEditable *editable,
void glade_editable_set_show_name (GladeEditable *editable,
gboolean show_name);
GladeWidget *glade_editable_loaded_widget (GladeEditable *editable);
+gboolean glade_editable_loading (GladeEditable *editable);
void glade_editable_block (GladeEditable *editable);
void glade_editable_unblock (GladeEditable *editable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]