Removing Java dialog boxes.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing Java dialog boxes.

siko1056
Dear maintainers,

Rik recently observed bug #47700 <https://savannah.gnu.org/bugs/?47700> concerning matured and unmaintained Java code for dialog boxes (errordlg, helpdlg, inputdlg, listdlg, questdlg, warndlg), that is now starting to become a maintenance burden.

All dialog boxes have a pretty good working QT-pendant. So I guess no one really became aware of the existence of a second version of Java dialog boxes since the GUI release. I assume it to be left as a fallback layer, that fortunately did not become necessary. Thus now I think it is time to remove this doubled effort instead of fixing dead code.

The only real pro for the Java dialog boxes is, that it is able to print some TeX symbols
https://www.gnu.org/software/octave/doc/v4.0.1/Which-TeX-symbols-are-implemented-in-dialog-functions_003f.html
which already leads to inconsistencies in the documentation and the usage of the QT-pendant.

If there are no objections, I will remove the Java dialog boxes and fix the documentation. The Java interface itself will of course remain untouched.

Best,
Kai
Reply | Threaded
Open this post in threaded view
|

Re: Removing Java dialog boxes.

Daniel Sebald
On 04/15/2016 04:04 PM, siko1056 wrote:

> Dear maintainers,
>
> Rik recently observed bug #47700<https://savannah.gnu.org/bugs/?47700>
> concerning matured and unmaintained Java code for dialog boxes (errordlg,
> helpdlg, inputdlg, listdlg, questdlg, warndlg), that is now starting to
> become a maintenance burden.
>
> All dialog boxes have a pretty good working QT-pendant. So I guess no one
> really became aware of the existence of a second version of Java dialog
> boxes since the GUI release. I assume it to be left as a fallback layer,
> that fortunately did not become necessary. Thus now I think it is time to
> remove this doubled effort instead of fixing dead code.

The Java versions were pre-Qt, if I'm remembering correctly.  The were
left in for the case where the GUI is not built, something I've been
configuring because of compilation bugs on my slightly outdated system.
  (I don't use the dialog boxes at the moment, though.)  After the Java
fallback is a terminal window dialog simulation, I think.


> The only real pro for the Java dialog boxes is, that it is able to print
> some TeX symbols
> https://www.gnu.org/software/octave/doc/v4.0.1/Which-TeX-symbols-are-implemented-in-dialog-functions_003f.html
> which already leads to inconsistencies in the documentation and the usage of
> the QT-pendant.

By TeX symbols I'm guessing it's meant just the Greek and math
characters.  I think Qt accepts unicode, so one should be able to copy
these symbols from any relevant table (e.g., search for a Greek alphabet
on the web) then copy those into the character string used for the
dialog box message inputs, in theory anyway.

Dan


> If there are no objections, I will remove the Java dialog boxes and fix the
> documentation. The Java interface itself will of course remain untouched.
>
> Best,
> Kai
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/Removing-Java-dialog-boxes-tp4676315.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.
>
>

--

Dan Sebald
email: daniel(DOT)sebald(AT)ieee(DOT)org
URL: http://www(DOT)dansebald(DOT)com

Reply | Threaded
Open this post in threaded view
|

Re: Removing Java dialog boxes.

LachlanA
In reply to this post by siko1056
Kai,

In general, I'm in favour of removing dead code.

If these are only used when the Qt libraries are not installed, I assume that they are for users running from a terminal rather than the GUI.  Would you replace the dialog boxes with a text dialog at the prompt, or how would some functionality be lost?  I assume that I'm not alone in running the CLI for big jobs to free up memory...

Thanks,
Lachlan
Reply | Threaded
Open this post in threaded view
|

Re: Removing Java dialog boxes.

Carnë Draug
In reply to this post by siko1056
On 15 April 2016 at 22:04, siko1056 <[hidden email]> wrote:

> Dear maintainers,
>
> Rik recently observed bug #47700 <https://savannah.gnu.org/bugs/?47700>
> concerning matured and unmaintained Java code for dialog boxes (errordlg,
> helpdlg, inputdlg, listdlg, questdlg, warndlg), that is now starting to
> become a maintenance burden.
>
> All dialog boxes have a pretty good working QT-pendant. So I guess no one
> really became aware of the existence of a second version of Java dialog
> boxes since the GUI release. I assume it to be left as a fallback layer,
> that fortunately did not become necessary. Thus now I think it is time to
> remove this doubled effort instead of fixing dead code.
>
> The only real pro for the Java dialog boxes is, that it is able to print
> some TeX symbols
> https://www.gnu.org/software/octave/doc/v4.0.1/Which-TeX-symbols-are-implemented-in-dialog-functions_003f.html
> which already leads to inconsistencies in the documentation and the usage of
> the QT-pendant.
>
> If there are no objections, I will remove the Java dialog boxes and fix the
> documentation. The Java interface itself will of course remain untouched.
>
> Best,
> Kai

Sounds good to me.

Carnë

Reply | Threaded
Open this post in threaded view
|

Re: Removing Java dialog boxes.

Carnë Draug
In reply to this post by LachlanA
On 16 April 2016 at 06:25, LachlanA <[hidden email]> wrote:
> Kai,
>
> In general, I'm in favour of removing dead code.
>
> If these are only used when the Qt libraries are not installed, I assume
> that they are for users running from a terminal rather than the GUI.  Would
> you replace the dialog boxes with a text dialog at the prompt, or how would
> some functionality be lost?  I assume that I'm not alone in running the CLI
> for big jobs to free up memory...

You can have qt widgets even when running from the CLI (use the --no-gui
option instead of the octave-cli executable).

Actually memory wise, you will use more memory using the java dialogs
because that requires a JVM running.  Just check the memory being used
after you call listdlg in "octave-cli" vs "octave --no-gui".

Carnë

Reply | Threaded
Open this post in threaded view
|

Re: Removing Java dialog boxes.

siko1056
I now commited http://hg.savannah.gnu.org/hgweb/octave/rev/b5d9b95d1e1a .

@Lachlan: I seized your suggestion and added to msgbox a very simple CLI output

http://hg.savannah.gnu.org/hgweb/octave/file/b5d9b95d1e1a/scripts/gui/msgbox.m

I think its easier just printing out the content, instead of complaining about a missing GUI.

Best,
Kai