octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #48005] menu() does not work without X


From: Atri Bhattacharya
Subject: [Octave-bug-tracker] [bug #48005] menu() does not work without X
Date: Wed, 25 May 2016 17:30:48 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #7, bug #48005 (project octave):

Thanks a lot, Mike, for your review. Updated patch is pasted here. Apropos the
crediting for the patch, I don't mind either way.


 ./scripts/java/{usejava.m.orig => usejava.m} | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: octave-4.0.1/scripts/java/usejava.m
===================================================================
--- octave-4.0.1.orig/scripts/java/usejava.m
+++ octave-4.0.1/scripts/java/usejava.m
@@ -62,7 +62,7 @@ function retval = usejava (feature)
     case "awt"
       try
         dum = methods ("java.awt.Frame");
-        retval = true;
+        retval = ! javaMethod ("isHeadless",
"java.awt.GraphicsEnvironment");
       end_try_catch
     case "desktop"
       ## Octave has no Java based GUI/desktop, leave retval = false
@@ -74,7 +74,7 @@ function retval = usejava (feature)
     case "swing"
       try
         dum = methods ("javax.swing.Popup");
-        retval = true;
+        retval = ! javaMethod ("isHeadless",
"java.awt.GraphicsEnvironment");
       end_try_catch
     otherwise
       error ("usejava: unrecognized feature '%s'", feature);



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48005>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]