Mailinglist Archive: yast-devel (191 mails)

< Previous Next >
Re: [yast-devel] how to determine GUI versus ncurses mode via YCP
  • From: Stefan Hundhammer <sh@xxxxxxx>
  • Date: Tue, 25 Mar 2008 16:23:00 +0100
  • Message-id: <200803251623.00463.sh@xxxxxxx>
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 <sh@xxxxxxx> Penguin by conviction.
YaST2 Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Nürnberg, Germany
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References