[gnome-builder/gnome-builder-3-24] file-settings: check current layer before children
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-24] file-settings: check current layer before children
- Date: Sat, 8 Jul 2017 02:25:57 +0000 (UTC)
commit aeb25b0ede7b1f7391ed4bd7ad683e0ae52edace
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 7 19:21:27 2017 -0700
file-settings: check current layer before children
Settings set in our layer take precedence over children.
libide/files/ide-file-settings.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libide/files/ide-file-settings.c b/libide/files/ide-file-settings.c
index 3273e12..a640b5e 100644
--- a/libide/files/ide-file-settings.c
+++ b/libide/files/ide-file-settings.c
@@ -77,11 +77,10 @@ static GParamSpec *properties [LAST_PROP];
ret_type ide_file_settings_get_##name (IdeFileSettings *self) \
{ \
IdeFileSettingsPrivate *priv = ide_file_settings_get_instance_private (self); \
- gsize i; \
g_return_val_if_fail (IDE_IS_FILE_SETTINGS (self), (ret_type)0); \
- if (priv->children != NULL) \
+ if (!ide_file_settings_get_##name##_set (self) && priv->children != NULL) \
{ \
- for (i = 0; i < priv->children->len; i++) \
+ for (guint i = 0; i < priv->children->len; i++) \
{ \
IdeFileSettings *child = g_ptr_array_index (priv->children, i); \
if (ide_file_settings_get_##name##_set (child)) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]