[gnome-builder] configuration: return default from gsettings when unset
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] configuration: return default from gsettings when unset
- Date: Thu, 5 Jan 2017 03:11:08 +0000 (UTC)
commit c647bda6d477cf91d8f8f9342293714955e378c7
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 4 19:09:50 2017 -0800
configuration: return default from gsettings when unset
If we haven't set the parallel build count manually, we want to use the
default for the system (which is defined in gsettings).
https://bugzilla.gnome.org/show_bug.cgi?id=776708
libide/buildsystem/ide-configuration.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/buildsystem/ide-configuration.c b/libide/buildsystem/ide-configuration.c
index 58d3971..1fae34c 100644
--- a/libide/buildsystem/ide-configuration.c
+++ b/libide/buildsystem/ide-configuration.c
@@ -773,6 +773,13 @@ ide_configuration_get_parallelism (IdeConfiguration *self)
{
g_return_val_if_fail (IDE_IS_CONFIGURATION (self), -1);
+ if (self->parallelism == -1)
+ {
+ g_autoptr(GSettings) settings = g_settings_new ("org.gnome.builder.build");
+
+ return g_settings_get_int (settings, "parallel");
+ }
+
return self->parallelism;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]