[yast-commit] r47054 - in /trunk/yast2: VERSION library/packages/src/PackageCallbacks.ycp package/yast2.changes
Author: lslezak Date: Fri Apr 25 11:29:22 2008 New Revision: 47054 URL: http://svn.opensuse.org/viewcvs/yast?rev=47054&view=rev Log: - do not use UI:: call while importing PackageCallbaks module (initializes UI even in command line mode) (bnc#374259) - 2.16.58 Modified: trunk/yast2/VERSION trunk/yast2/library/packages/src/PackageCallbacks.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=47054&r1=47053&r2=47054&view=diff ============================================================================== --- trunk/yast2/VERSION (original) +++ trunk/yast2/VERSION Fri Apr 25 11:29:22 2008 @@ -1 +1 @@ -2.16.57 +2.16.58 Modified: trunk/yast2/library/packages/src/PackageCallbacks.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/packages/src/PackageCallbacks.ycp?rev=47054&r1=47053&r2=47054&view=diff ============================================================================== --- trunk/yast2/library/packages/src/PackageCallbacks.ycp (original) +++ trunk/yast2/library/packages/src/PackageCallbacks.ycp Fri Apr 25 11:29:22 2008 @@ -61,8 +61,15 @@ boolean autorefreshing = false; boolean autorefreshing_aborted = false; - boolean textmode = UI::GetDisplayInfo()["TextMode"]:false; - integer display_width = UI::GetDisplayInfo()["Width"]:0; + boolean textmode() + { + return UI::GetDisplayInfo()["TextMode"]:false; + } + + integer display_width() + { + return UI::GetDisplayInfo()["Width"]:0; + } /* Location of the persistent storage */ const string conf_file = Directory::vardir + "/package_callbacks.conf"; @@ -1130,7 +1137,7 @@ void SetHeaderSourcePopup(string text) { // Qt UI uses bold font, the string must be shortened even more - integer ui_adjustment = textmode ? 0 : 5; + integer ui_adjustment = textmode() ? 0 : 5; if (size(text) > max_size - ui_adjustment) { @@ -1144,7 +1151,7 @@ void SetLabelSourcePopup(string text) { // Qt uses proportional font, the string might be longer - integer ui_adjustment = textmode ? 0 : 6; + integer ui_adjustment = textmode() ? 0 : 6; if (size(text) > max_size + ui_adjustment) { @@ -1897,12 +1904,12 @@ if (bps_current > 0) { // do not show the average download rate if the space is limited - if (textmode && display_width < 100) + if (textmode() && display_width() < 100) { bps_avg = -1; } - string format = textmode ? ("%1 - " + download_file) : (download_file + " - %1"); + string format = textmode() ? ("%1 - " + download_file) : (download_file + " - %1"); // progress bar label, %1 is URL with optional download rate msg_rate = sformat(_("Downloading: %1"), String::FormatRateMessage(format, bps_avg, bps_current)); Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=47054&r1=47053&r2=47054&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Fri Apr 25 11:29:22 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Apr 25 11:18:24 CEST 2008 - lslezak@suse.cz + +- do not use UI:: call while importing PackageCallbaks module + (initializes UI even in command line mode) (bnc#374259) +- 2.16.58 + +------------------------------------------------------------------- Thu Apr 24 09:55:15 CEST 2008 - jsuchome@suse.cz - added missing anyxml.scr -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org