Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hello,

Currently, under Windows the command-line help information (that is available using soffice --help) 
and version information (soffice --version) are shown in a dedicated dialog window 
(CmdlineHelpDialog). That has following problems:

1. The dialog does not allow for scrolling, resizing and selecting. This impairs usability of the 
information, but it may be fixed.

2. This makes the code unnecessary complicated, OS-dependent, because on every other platform, we 
output the information to console.

Given that using command-line switches implies some experience with console, it's natural to unify 
the behavior and use console on Windows OS for this, too.

However, this approach has another problem. As a GUI program, that is launched by another GUI 
program (soffice.exe launches soffice.bin), LibreOffice does not have its own console from the 
beginning, and cannot easily get access to parent console (if any: it may be launched from yet 
another GUI app, e.g. from explorer shortcut). And even if we somehow get to that console, we 
cannot ensure native user experience with it: Windows knows that it started GUI app, and thus 
console had already displayed command prompt, so our output will go after that prompt, and will not 
be followed by another one.

Another option would be to make LO a console application, and release console early (but not before 
we handled command line and had output help message). But this is not a good solution, too: marking 
a Windows executable as console one will force OS to create console each time the program is 
executed from e.g. shortcut (before main()), and that console will flash on start, creating bad UX.

I have posted a patch to gerrit [1], that creates *new* console each time LO is started with --help 
or --version, even when it is started from console itself. This allows to use console's ability to 
scroll, select, resize, and also standardises our code. IMO, this new window is no worse than new 
graphic window used previously, given that we ecpect using console using command-line switches.

Could you please share your thoughts on this? Did I miss some way to implement it better?

Thanks!

1. https://gerrit.libreoffice.org/31059/

--
Best regards,
Mike Kaganski

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.