changeset 24898:91331c76d9c1 stable

invert the logic for whether to start the GUI in the octave wrapper * main.in.cc (main): Set start_gui to false by default. Handle the --gui command-line option.
author Mike Miller <mtmiller@octave.org>
date Fri, 16 Mar 2018 12:08:46 -0700
parents 088506eadb44
children 1a46d174a483
files src/main.in.cc
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.in.cc	Thu Mar 15 15:01:03 2018 +0100
+++ b/src/main.in.cc	Fri Mar 16 12:08:46 2018 -0700
@@ -203,7 +203,7 @@
 {
   int retval = 0;
 
-  bool start_gui = true;
+  bool start_gui = false;
   bool gui_libs = true;
 
   set_octave_home ();
@@ -258,6 +258,15 @@
           start_gui = false;
           new_argv[k++] = argv[i];
         }
+      else if (! strcmp (argv[i], "--gui"))
+        {
+          // If we see this option, then we fork and exec octave with
+          // the --gui option, while continuing to handle signals in the
+          // terminal.
+
+          start_gui = true;
+          new_argv[k++] = argv[i];
+        }
       else if (! strcmp (argv[i], "--silent") || ! strcmp (argv[i], "--quiet"))
         {
           warn_display = false;