[gnome-builder/wip/chergert/debugger: 72/89] runner: implement missing force quit



commit 7417fab4d2d15b8a64ce873c29b2867184c5b930
Author: Christian Hergert <chergert redhat com>
Date:   Sun Mar 26 21:33:36 2017 -0700

    runner: implement missing force quit

 libide/runner/ide-runner.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libide/runner/ide-runner.c b/libide/runner/ide-runner.c
index 152cc39..e0c99c1 100644
--- a/libide/runner/ide-runner.c
+++ b/libide/runner/ide-runner.c
@@ -399,6 +399,21 @@ ide_runner_real_set_tty (IdeRunner *self,
 }
 
 static void
+ide_runner_real_force_quit (IdeRunner *self)
+{
+  IdeRunnerPrivate *priv = ide_runner_get_instance_private (self);
+
+  IDE_ENTRY;
+
+  g_assert (IDE_IS_RUNNER (self));
+
+  if (priv->subprocess != NULL)
+    ide_subprocess_force_exit (priv->subprocess);
+
+  IDE_EXIT;
+}
+
+static void
 ide_runner_extension_added (PeasExtensionSet *set,
                             PeasPluginInfo   *plugin_info,
                             PeasExtension    *exten,
@@ -578,6 +593,7 @@ ide_runner_class_init (IdeRunnerClass *klass)
   klass->get_stdin = ide_runner_real_get_stdin;
   klass->get_stdout = ide_runner_real_get_stdout;
   klass->get_stderr = ide_runner_real_get_stderr;
+  klass->force_quit = ide_runner_real_force_quit;
 
   properties [PROP_ARGV] =
     g_param_spec_boxed ("argv",


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