[gnome-builder] build-stage: add various build stage names



commit b16556ff7785a75a8dc5cf30bcea50815b56215c
Author: Christian Hergert <chergert redhat com>
Date:   Mon Dec 18 20:44:19 2017 -0800

    build-stage: add various build stage names
    
    These are a bunch of pipeline addins which were not yet setting
    build stage names (and is now more necessary with the panel view).

 .../autotools/ide-autotools-pipeline-addin.c       |    7 +++++++
 src/plugins/cargo/cargo_plugin.py                  |    3 +++
 src/plugins/cmake/gbp-cmake-pipeline-addin.c       |    5 +++++
 src/plugins/make/make_plugin.py                    |    2 ++
 src/plugins/npm/npm_plugin.py                      |    1 +
 src/plugins/phpize/phpize_plugin.py                |    6 ++++++
 6 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/autotools/ide-autotools-pipeline-addin.c 
b/src/plugins/autotools/ide-autotools-pipeline-addin.c
index 166f1a9..38ea920 100644
--- a/src/plugins/autotools/ide-autotools-pipeline-addin.c
+++ b/src/plugins/autotools/ide-autotools-pipeline-addin.c
@@ -18,6 +18,8 @@
 
 #define G_LOG_DOMAIN "ide-autotools-pipeline-addin"
 
+#include <glib/gi18n.h>
+
 #include "ide-autotools-autogen-stage.h"
 #include "ide-autotools-build-system.h"
 #include "ide-autotools-make-stage.h"
@@ -45,6 +47,7 @@ register_autoreconf_stage (IdeAutotoolsPipelineAddin  *self,
   srcdir = ide_build_pipeline_get_srcdir (pipeline);
 
   stage = g_object_new (IDE_TYPE_AUTOTOOLS_AUTOGEN_STAGE,
+                        "name", _("Bootstrapping build system"),
                         "completed", completed,
                         "context", context,
                         "srcdir", srcdir,
@@ -219,6 +222,7 @@ register_configure_stage (IdeAutotoolsPipelineAddin  *self,
     }
 
   stage = g_object_new (IDE_TYPE_BUILD_STAGE_LAUNCHER,
+                        "name", _("Configuring project"),
                         "context", ide_object_get_context (IDE_OBJECT (self)),
                         "launcher", launcher,
                         NULL);
@@ -271,6 +275,7 @@ register_make_stage (IdeAutotoolsPipelineAddin  *self,
   parallel = ide_configuration_get_parallelism (config);
 
   stage = g_object_new (IDE_TYPE_AUTOTOOLS_MAKE_STAGE,
+                        "name", _("Building project"),
                         "clean-target", clean_target,
                         "context", context,
                         "parallel", parallel,
@@ -297,6 +302,8 @@ register_makecache_stage (IdeAutotoolsPipelineAddin  *self,
   if (NULL == (stage = ide_autotools_makecache_stage_new_for_pipeline (pipeline, error)))
     return FALSE;
 
+  ide_build_stage_set_name (stage, _("Caching build commands"));
+
   stage_id = ide_build_pipeline_connect (pipeline,
                                          IDE_BUILD_PHASE_CONFIGURE | IDE_BUILD_PHASE_AFTER,
                                          0,
diff --git a/src/plugins/cargo/cargo_plugin.py b/src/plugins/cargo/cargo_plugin.py
index d422d4c..be4c3c0 100644
--- a/src/plugins/cargo/cargo_plugin.py
+++ b/src/plugins/cargo/cargo_plugin.py
@@ -30,6 +30,8 @@ from gi.repository import GLib
 from gi.repository import GObject
 from gi.repository import Ide
 
+_ = Ide.gettext
+
 _CARGO = 'cargo'
 
 class CargoBuildSystem(Ide.Object, Ide.BuildSystem, Gio.AsyncInitable):
@@ -146,6 +148,7 @@ class CargoPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
         clean_launcher.push_argv(cargo_toml)
 
         build_stage = Ide.BuildStageLauncher.new(context, build_launcher)
+        build_stage.set_name(_("Building project"))
         build_stage.set_clean_launcher(clean_launcher)
         self.track(pipeline.connect(Ide.BuildPhase.BUILD, 0, build_stage))
 
diff --git a/src/plugins/cmake/gbp-cmake-pipeline-addin.c b/src/plugins/cmake/gbp-cmake-pipeline-addin.c
index 2516eda..8dc41d5 100644
--- a/src/plugins/cmake/gbp-cmake-pipeline-addin.c
+++ b/src/plugins/cmake/gbp-cmake-pipeline-addin.c
@@ -19,6 +19,8 @@
 
 #define G_LOG_DOMAIN "gbp-cmake-pipeline-addin"
 
+#include <glib/gi18n.h>
+
 #include "gbp-cmake-build-system.h"
 #include "gbp-cmake-pipeline-addin.h"
 
@@ -152,6 +154,7 @@ gbp_cmake_pipeline_addin_load (IdeBuildPipelineAddin *addin,
     }
 
   configure_stage = ide_build_stage_launcher_new (context, configure_launcher);
+  ide_build_stage_set_name (configure_stage, _("Configure project"));
 
   build_ninja = ide_build_pipeline_build_builddir_path (pipeline, "build.ninja", NULL);
   if (g_file_test (build_ninja, G_FILE_TEST_IS_REGULAR))
@@ -176,6 +179,7 @@ gbp_cmake_pipeline_addin_load (IdeBuildPipelineAddin *addin,
   ide_subprocess_launcher_push_argv (clean_launcher, "clean");
 
   build_stage = ide_build_stage_launcher_new (context, build_launcher);
+  ide_build_stage_set_name (build_stage, _("Building project"));
 
   ide_build_stage_launcher_set_clean_launcher (IDE_BUILD_STAGE_LAUNCHER (build_stage), clean_launcher);
   ide_build_stage_set_check_stdout (build_stage, TRUE);
@@ -194,6 +198,7 @@ gbp_cmake_pipeline_addin_load (IdeBuildPipelineAddin *addin,
   ide_subprocess_launcher_push_argv (install_launcher, "install");
 
   install_stage = ide_build_stage_launcher_new (context, install_launcher);
+  ide_build_stage_set_name (install_stage, _("Installing project"));
 
   g_signal_connect (install_stage,
                     "query",
diff --git a/src/plugins/make/make_plugin.py b/src/plugins/make/make_plugin.py
index e8dbe84..f5a2a9b 100644
--- a/src/plugins/make/make_plugin.py
+++ b/src/plugins/make/make_plugin.py
@@ -115,6 +115,7 @@ class MakePipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
         clean_launcher.push_argv('clean')
 
         build_stage = Ide.BuildStageLauncher.new(context, build_launcher)
+        build_stage.set_name(_("Build project"))
         build_stage.set_clean_launcher(clean_launcher)
         build_stage.connect('query', self._query)
         self.track(pipeline.connect(Ide.BuildPhase.BUILD, 0, build_stage))
@@ -128,6 +129,7 @@ class MakePipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
         install_launcher.push_argv('install')
 
         install_stage = Ide.BuildStageLauncher.new(context, install_launcher)
+        install_stage.set_name(_("Install project"))
         self.track(pipeline.connect(Ide.BuildPhase.INSTALL, 0, install_stage))
 
     def _query(self, stage, pipeline, cancellable):
diff --git a/src/plugins/npm/npm_plugin.py b/src/plugins/npm/npm_plugin.py
index c5ced74..445bae5 100644
--- a/src/plugins/npm/npm_plugin.py
+++ b/src/plugins/npm/npm_plugin.py
@@ -100,6 +100,7 @@ class NPMPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
 
         # Fetch dependencies so that we no longer need network access
         fetch_launcher = pipeline.create_launcher()
+        fetch_launcher.set_name(_("Downloading npm dependencies"))
         fetch_launcher.set_cwd(package_json.get_parent().get_path())
         fetch_launcher.push_argv(npm)
         if Ide.get_system_type() != system_type:
diff --git a/src/plugins/phpize/phpize_plugin.py b/src/plugins/phpize/phpize_plugin.py
index 7387bf9..c689b4c 100644
--- a/src/plugins/phpize/phpize_plugin.py
+++ b/src/plugins/phpize/phpize_plugin.py
@@ -27,6 +27,8 @@ from gi.repository import GLib
 from gi.repository import GObject
 from gi.repository import Gio
 
+_ = Ide.gettext
+
 _TYPE_NONE = 0
 _TYPE_C = 1
 _TYPE_CPLUSPLUS = 2
@@ -205,6 +207,7 @@ class PHPizeBuildPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
         bootstrap_launcher.push_argv('phpize')
         bootstrap_launcher.set_cwd(srcdir)
         bootstrap_stage = Ide.BuildStageLauncher.new(context, bootstrap_launcher)
+        bootstrap_stage.set_name(_("Bootstrapping project"))
         bootstrap_stage.set_completed(os.path.exists(os.path.join(srcdir, 'configure')))
         self.track(pipeline.connect(Ide.BuildPhase.AUTOGEN, 0, bootstrap_stage))
 
@@ -220,6 +223,7 @@ class PHPizeBuildPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
             _, config_opts = GLib.shell_parse_argv(config_opts)
             config_launcher.push_args(config_opts)
         config_stage = Ide.BuildStageLauncher.new(context, config_launcher)
+        config_stage.set_name(_("Configuring project"))
         self.track(pipeline.connect(Ide.BuildPhase.CONFIGURE, 0, config_stage))
 
         # Build the project using make.
@@ -231,6 +235,7 @@ class PHPizeBuildPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
         clean_launcher.push_argv('make')
         clean_launcher.push_argv('clean')
         build_stage = Ide.BuildStageLauncher.new(context, build_launcher)
+        build_stage.set_name(_("Building project"))
         build_stage.set_clean_launcher(clean_launcher)
         build_stage.connect('query', self._query)
         self.track(pipeline.connect(Ide.BuildPhase.BUILD, 0, build_stage))
@@ -240,6 +245,7 @@ class PHPizeBuildPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
         install_launcher.push_argv('make')
         install_launcher.push_argv('install')
         install_stage = Ide.BuildStageLauncher.new(context, install_launcher)
+        install_stage.set_name(_("Installing project"))
         self.track(pipeline.connect(Ide.BuildPhase.INSTALL, 0, install_stage))
 
     def _query(self, stage, pipeline, cancellable):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]