Author: jsuchome Date: Thu Aug 21 10:55:13 2008 New Revision: 50251 URL: http://svn.opensuse.org/viewcvs/yast?rev=50251&view=rev Log: - SlideShow.ycp: do not use UI while being imported, breaks CLI Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/modules/SlideShow.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=50251&r1=50250&r2=50251&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Thu Aug 21 10:55:13 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Aug 21 10:53:54 CEST 2008 - jsuchome@suse.cz + +- SlideShow.ycp: do not use UI while being imported, breaks CLI + +------------------------------------------------------------------- Thu Aug 14 14:34:02 CEST 2008 - locilka@suse.cz - Added support for several products on one media by making Modified: trunk/packager/src/modules/SlideShow.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/SlideShow.ycp?rev=50251&r1=50250&r2=50251&view=diff ============================================================================== --- trunk/packager/src/modules/SlideShow.ycp (original) +++ trunk/packager/src/modules/SlideShow.ycp Thu Aug 21 10:55:13 2008 @@ -73,12 +73,38 @@ boolean user_abort = false; // properties of the current UI - boolean textmode = UI::GetDisplayInfo()["TextMode"]:false; - integer display_width = UI::GetDisplayInfo()["Width"]:0; + boolean textmode = nil; + integer display_width = nil; global string relnotes = nil; /** + * return the value of text_mode (true for ncurses) + */ + global boolean GetTextMode () { + + if (textmode == nil) + { + map display_info = UI::GetDisplayInfo (); + textmode = display_info["TextMode"]:false; + } + return textmode; + } + + /** + * return the value of screen width + */ + global integer GetDisplayWidth () { + + if (display_width == nil) + { + map display_info = UI::GetDisplayInfo (); + display_width = display_info["Width"]:0; + } + return display_width; + } + + /** * Constructor **/ global void SlideShow() @@ -1123,7 +1149,7 @@ if (bps_current > 0) { // do not show the average download rate if the space is limited - if (textmode && display_width < 100) + if (GetTextMode () && GetDisplayWidth () < 100) { bps_avg = -1; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org