[gedit/dbus] Fix reading from stdin in non wait mode
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/dbus] Fix reading from stdin in non wait mode
- Date: Wed, 5 May 2010 22:08:52 +0000 (UTC)
commit 5425c6f428d1d6083f5615e350a3ef7f3a560d40
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Thu May 6 00:08:43 2010 +0200
Fix reading from stdin in non wait mode
Before the process was stopped which killed reading from stdin.
Now it's kept alive until EOF on stdin
gedit/gedit-dbus.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-dbus.c b/gedit/gedit-dbus.c
index 6e0d8e4..92c337e 100644
--- a/gedit/gedit-dbus.c
+++ b/gedit/gedit-dbus.c
@@ -363,8 +363,6 @@ slave_open_ready_cb (GDBusConnection *connection,
&error);
command_line = gedit_command_line_get_default ();
- /* TODO: start proxying stdin if needed */
-
if (ret == NULL)
{
g_warning ("Failed to call gedit service: %s", error->message);
@@ -381,7 +379,8 @@ slave_open_ready_cb (GDBusConnection *connection,
dbus->priv->result = GEDIT_DBUS_RESULT_SUCCESS;
- if (!gedit_command_line_get_wait (command_line))
+ if (!gedit_command_line_get_wait (command_line) &&
+ !dbus->priv->stdin_cancellable)
{
g_main_loop_quit (dbus->priv->main_loop);
}
@@ -446,6 +445,11 @@ stdin_write_finish (GOutputStream *stream,
g_object_unref (priv->stdin_cancellable);
priv->stdin_cancellable = NULL;
+
+ if (priv->main_loop)
+ {
+ g_main_loop_quit (priv->main_loop);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]