[gnome-terminal] Handle remote options directly instead of on idle



commit 324323864d833c77a4dfe6ad1da4382236ee41ae
Author: Christian Persch <chpe gnome org>
Date:   Sun Aug 23 21:48:29 2009 +0200

    Handle remote options directly instead of on idle
    
    This way, we can return errors from handling the options to the caller.

 src/terminal.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/terminal.c b/src/terminal.c
index 56767ef..42eb23f 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -514,14 +514,6 @@ shutdown:
 /* Factory stuff */
 
 static gboolean
-handle_new_terminal_event (TerminalOptions *options)
-{
-  terminal_app_handle_options (terminal_app_get (), options, FALSE /* no resume */, NULL);
-
-  return FALSE;
-}
-
-static gboolean
 terminal_factory_handle_arguments (TerminalFactory *terminal_factory,
                                    const GArray *working_directory_array,
                                    const GArray *display_name_array,
@@ -535,6 +527,7 @@ terminal_factory_handle_arguments (TerminalFactory *terminal_factory,
   char **env = NULL, **argv = NULL, **argv_copy = NULL;
   int argc;
   GError *arg_error = NULL;
+  gboolean retval;
 
   working_directory = terminal_util_array_to_string (working_directory_array, &arg_error);
   if (arg_error)
@@ -582,10 +575,8 @@ out:
   if (!options)
     return FALSE;
 
-  g_idle_add_full (G_PRIORITY_HIGH_IDLE,
-                   (GSourceFunc) handle_new_terminal_event,
-                   options,
-                   (GDestroyNotify) terminal_options_free);
+  retval = terminal_app_handle_options (terminal_app_get (), options, FALSE /* no resume */, error);
 
-  return TRUE;
+  terminal_options_free (options);
+  return retval;
 }



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