[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 14:48:03 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
Follow-up Comment #4, bug #48005 (project octave):
Hi Philip,
Thanks for your comments. I see your point, so one could try something like
the patch pasted here. But at least in the context of the check for menu.m,
wouldn't this make the first condition in menu() redundant? I mean the
isguirunning()
part of the check in menu() should not be needed any more, as the other check
usejava ("awt")
will already ensure this for us.
Otoh, my previous patch ensures that you can actually create awt objects,
which seems like a more ideal test for usejava's usecase. So pros and cons...
What do you think?
dex: 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,9 @@ function retval = usejava (feature)
case "awt"
try
dum = methods ("java.awt.Frame");
- retval = true;
+ ## awt is useless without an X session, test if java is running
+ ## in Headless mode and return ! boolean result as retval
+ retval = ! javaMethod("isHeadless", "java.awt.GraphicsEnvironment");
end_try_catch
case "desktop"
## Octave has no Java based GUI/desktop, leave retval = false
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48005>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, anonymous, 2016/05/24
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, Mike Miller, 2016/05/24
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, anonymous, 2016/05/25
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, anonymous, 2016/05/25
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, Philip Nienhuis, 2016/05/25
- [Octave-bug-tracker] [bug #48005] menu() does not work without X,
Atri Bhattacharya <=
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, Mike Miller, 2016/05/25
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, Atri Bhattacharya, 2016/05/25
- [Octave-bug-tracker] [bug #48005] menu() does not work without X, Mike Miller, 2016/05/25