[gnome-builder] run-manager: add IdeRunManager::run(IdeRunner) signal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] run-manager: add IdeRunManager::run(IdeRunner) signal
- Date: Wed, 19 Oct 2016 06:38:58 +0000 (UTC)
commit a3f316ebc3a8a90bf303ad46c755d31eb3e27255
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 18 23:38:50 2016 -0700
run-manager: add IdeRunManager::run(IdeRunner) signal
This can be used by plugins to detect when an IdeRunner is about to be
executed.
libide/runner/ide-run-manager.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/libide/runner/ide-run-manager.c b/libide/runner/ide-run-manager.c
index 221c6de..1792f9b 100644
--- a/libide/runner/ide-run-manager.c
+++ b/libide/runner/ide-run-manager.c
@@ -61,6 +61,7 @@ enum {
};
enum {
+ RUN,
STOPPED,
N_SIGNALS
};
@@ -178,6 +179,27 @@ ide_run_manager_class_init (IdeRunManagerClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
/**
+ * IdeRunManager::run:
+ * @self: An #IdeRunManager
+ * @runner: An #IdeRunner
+ *
+ * This signal is emitted right before ide_runner_run_async() is called
+ * on an #IdeRunner. It can be used by plugins to tweak things right
+ * before the runner is executed.
+ */
+ signals [RUN] =
+ g_signal_new ("run",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 1,
+ IDE_TYPE_RUNNER);
+
+ /**
* IdeRunManager::stopped:
*
* This signal is emitted when the run manager has stopped the currently
@@ -317,6 +339,8 @@ do_run_async (IdeRunManager *self,
if (self->handler != NULL && self->handler->handler != NULL)
self->handler->handler (self, runner, self->handler->handler_data);
+ g_signal_emit (self, signals [RUN], 0, runner);
+
ide_runner_run_async (runner,
cancellable,
ide_run_manager_run_cb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]