On Tuesday 25 March 2008 15:48, Johannes Meixner wrote:
how can I determine in a YaST module if it runs currently in GUI mode (Qt or Gtk) or in text-only (ncurses) mode?
If it runs in text-only mode, how can I determine its current screen size (i.e. how many lines and characters per line)?
The layout units are the same regardless if it's GUI (Qt or Gtk) or NCurses:
An 800x600 pixel main window corresponds to 80x25 layout units. Fractional
sizes are permitted (but fractions may be rounded by the NCurses UI).
Please note that it is generally not desirable to differentiate on the YCP
application level between NCurses or GUI mode. The UI is intended to be the
abstraction layer for that.
As a general rule of thumb, if a layout does not fit into an NCurses 80x25
layout, it is very likely overcrowded and overly complex. So if you need to
distinguish between GUI and NCurses, you might have that problem.
CU
--
Stefan Hundhammer