[gnome-terminal] terminal-screen: check for custom command first



commit 7997f486ff3df49ce1b87413c9ba07be72ee8b28
Author: FrÃdÃric PÃters <fpeters 0d be>
Date:   Sun Jan 20 21:50:55 2013 +0100

    terminal-screen: check for custom command first
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692148

 src/terminal-screen.c |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index bf64ee2..fa4e899 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1113,7 +1113,23 @@ get_child_command (TerminalScreen *screen,
 
   *argv_p = argv = NULL;
 
-  if (priv->shell)
+  if (priv->override_command)
+    {
+      argv = g_strdupv (priv->override_command);
+
+      *spawn_flags_p |= G_SPAWN_SEARCH_PATH;
+    }
+  else if (g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY))
+    {
+      const char *argv_str;
+
+      g_settings_get (profile, TERMINAL_PROFILE_CUSTOM_COMMAND_KEY, "&s", &argv_str);
+      if (!g_shell_parse_argv (argv_str, NULL, &argv, err))
+        return FALSE;
+
+      *spawn_flags_p |= G_SPAWN_SEARCH_PATH;
+    }
+  else if (priv->shell)
     {
       const char *only_name;
       char *shell;
@@ -1140,22 +1156,7 @@ get_child_command (TerminalScreen *screen,
 
       *spawn_flags_p |= G_SPAWN_FILE_AND_ARGV_ZERO;
     }
-  else if (priv->override_command)
-    {
-      argv = g_strdupv (priv->override_command);
 
-      *spawn_flags_p |= G_SPAWN_SEARCH_PATH;
-    }
-  else if (g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY))
-    {
-      const char *argv_str;
-
-      g_settings_get (profile, TERMINAL_PROFILE_CUSTOM_COMMAND_KEY, "&s", &argv_str);
-      if (!g_shell_parse_argv (argv_str, NULL, &argv, err))
-        return FALSE;
-
-      *spawn_flags_p |= G_SPAWN_SEARCH_PATH;
-    }
   else
     {
       g_set_error_literal (err, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,



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