Commit 394bc10e authored by Christian Hergert's avatar Christian Hergert

buildconfig: fix environment duplication

parent 2f0b24b9
......@@ -613,6 +613,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;
......@@ -638,12 +639,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,
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++)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment