[gedit] external tools: fix stop button
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] external tools: fix stop button
- Date: Mon, 22 Apr 2013 19:24:58 +0000 (UTC)
commit 56b52df12dc6c7c376232ae9043d2b2847ef46da
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Apr 22 21:23:48 2013 +0200
external tools: fix stop button
https://bugzilla.gnome.org/show_bug.cgi?id=698579
plugins/externaltools/tools/capture.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/plugins/externaltools/tools/capture.py b/plugins/externaltools/tools/capture.py
index a8f2d41..db98da7 100644
--- a/plugins/externaltools/tools/capture.py
+++ b/plugins/externaltools/tools/capture.py
@@ -206,13 +206,17 @@ class Capture(GObject.Object):
if self.idle_write_id:
GLib.source_remove(self.idle_write_id)
self.idle_write_id = 0
+ if self.pipe:
+ self.pipe.stdin.close()
if self.out_channel_id:
+ GLib.source_remove(self.out_channel_id)
self.out_channel.shutdown(True)
self.out_channel = None
self.out_channel_id = 0
if self.err_channel_id:
+ GLib.source_remove(self.err_channel_id)
self.err_channel.shutdown(True)
self.err_channel = None
self.err_channel = 0
@@ -224,6 +228,8 @@ class Capture(GObject.Object):
else:
os.kill(self.pipe.pid, signal.SIGKILL)
+ self.pipe = None
+
def emit_end_execute(self, error_code):
self.emit('end-execute', error_code)
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]