buildconfig: fix environment duplication
Christian Hergert
5 years ago
615 | 615 | g_autofree gchar *new_config_id = NULL; |
616 | 616 | g_autofree gchar *new_name = NULL; |
617 | 617 | IdeConfigurationManager *manager; |
618 | IdeEnvironment *env; | |
618 | 619 | const gchar *config_id; |
619 | 620 | const gchar *name; |
620 | 621 | IdeContext *context; |
639 | 640 | name = ide_configuration_get_display_name (config); |
640 | 641 | /* translators: %s is replaced with the name of the configuration */ |
641 | 642 | new_name = g_strdup_printf (_("%s (Copy)"), name); |
643 | ||
644 | env = ide_configuration_get_environment (config); | |
642 | 645 | |
643 | 646 | new_config = g_object_new (IDE_TYPE_BUILDCONFIG_CONFIGURATION, |
644 | 647 | "id", new_config_id, |
645 | 648 | "context", context, |
646 | 649 | "display-name", new_name, |
647 | 650 | NULL); |
651 | ||
652 | ide_environment_copy_into (env, ide_configuration_get_environment (new_config), TRUE); | |
648 | 653 | |
649 | 654 | pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (new_config), &n_pspecs); |
650 | 655 |