[glade/wip/support-no-ids] GladeWidget: Added glade_widget_has_prop_refs()
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/wip/support-no-ids] GladeWidget: Added glade_widget_has_prop_refs()
- Date: Wed, 27 Jan 2016 16:47:26 +0000 (UTC)
commit a784c69aa6da2ac1bb22dc788a7e8bfb951fbf8b
Author: Tristan Van Berkom <tristan upstairslabs com>
Date: Wed Jan 27 17:32:26 2016 +0100
GladeWidget: Added glade_widget_has_prop_refs()
Check if there are property references to a widget without duplicating the list.
gladeui/glade-widget.c | 7 +++++++
gladeui/glade-widget.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index de383f2..a3c2e8a 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -2189,6 +2189,13 @@ glade_widget_list_prop_refs (GladeWidget *widget)
return g_list_copy (widget->priv->prop_refs);
}
+gboolean
+glade_widget_has_prop_refs (GladeWidget *widget)
+{
+ g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
+
+ return widget->priv->prop_refs != NULL;
+}
GladeProperty *
glade_widget_get_parentless_widget_ref (GladeWidget *widget)
diff --git a/gladeui/glade-widget.h b/gladeui/glade-widget.h
index 4561200..e4d258a 100644
--- a/gladeui/glade-widget.h
+++ b/gladeui/glade-widget.h
@@ -240,6 +240,7 @@ void glade_widget_remove_prop_ref (GladeWidget *w
GladeProperty *property);
GList *glade_widget_list_prop_refs (GladeWidget *widget);
+gboolean glade_widget_has_prop_refs (GladeWidget *widget);
GladeProperty *glade_widget_get_parentless_widget_ref (GladeWidget *widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]