[gnome-builder] buildconfig: fix environment duplication
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buildconfig: fix environment duplication
- Date: Wed, 12 Sep 2018 11:55:23 +0000 (UTC)
commit d294f6685f441d19863e440931394eee1848e7e9
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 4 11:53:38 2018 -0700
buildconfig: fix environment duplication
src/libide/buildconfig/ide-buildconfig-configuration-provider.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
b/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
index d03c290e3..c02599fde 100644
--- a/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
+++ b/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
@@ -616,6 +616,7 @@ ide_buildconfig_configuration_provider_duplicate (IdeConfigurationProvider *prov
g_autofree gchar *new_config_id = NULL;
g_autofree gchar *new_name = NULL;
IdeConfigurationManager *manager;
+ IdeEnvironment *env;
const gchar *config_id;
const gchar *name;
IdeContext *context;
@@ -641,12 +642,16 @@ ide_buildconfig_configuration_provider_duplicate (IdeConfigurationProvider *prov
/* translators: %s is replaced with the name of the configuration */
new_name = g_strdup_printf (_("%s (Copy)"), name);
+ env = ide_configuration_get_environment (config);
+
new_config = g_object_new (IDE_TYPE_BUILDCONFIG_CONFIGURATION,
"id", new_config_id,
"context", context,
"display-name", new_name,
NULL);
+ ide_environment_copy_into (env, ide_configuration_get_environment (new_config), TRUE);
+
pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (new_config), &n_pspecs);
for (guint i = 0; i < n_pspecs; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]