Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47249 - in /trunk/yast2: VERSION library/modules/Mode.ycp library/packages/src/PackageCallbacks.ycp library/wizard/src/Progress.ycp package/yast2.changes
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Fri, 02 May 2008 12:55:31 -0000
  • Message-id: <20080502125532.47331252FB@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Fri May 2 14:55:31 2008
New Revision: 47249

URL: http://svn.opensuse.org/viewcvs/yast?rev=47249&view=rev
Log:
- Mode::test(), PakageCallbacks - do not call UI:: functions in
command line mode (do not initialize UI) (another fix for
bnc#374259)
- 2.16.61

Modified:
trunk/yast2/VERSION
trunk/yast2/library/modules/Mode.ycp
trunk/yast2/library/packages/src/PackageCallbacks.ycp
trunk/yast2/library/wizard/src/Progress.ycp
trunk/yast2/package/yast2.changes

Modified: trunk/yast2/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=47249&r1=47248&r2=47249&view=diff
==============================================================================
--- trunk/yast2/VERSION (original)
+++ trunk/yast2/VERSION Fri May 2 14:55:31 2008
@@ -1 +1 @@
-2.16.60
+2.16.61

Modified: trunk/yast2/library/modules/Mode.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/modules/Mode.ycp?rev=47249&r1=47248&r2=47249&view=diff
==============================================================================
--- trunk/yast2/library/modules/Mode.ycp (original)
+++ trunk/yast2/library/modules/Mode.ycp Fri May 2 14:55:31 2008
@@ -124,14 +124,21 @@
_mode = new_mode;
}

+global boolean commandline();
+
// test mode definitions

global string testMode () {
if (_test == nil)
Initialize ();
if (!test_autochecked) {
- // #243624
- if (UI::GetDisplayInfo () == nil) {
+
+ // do not call GetDisplayInfo in command line mode (bnc#374259)
+ if (commandline())
+ {
+ _test = "none";
+ }
+ else if (UI::GetDisplayInfo () == nil) {
_test = "testsuite"; // testsuite runs with a dummy ui.
}
test_autochecked = true;

Modified: trunk/yast2/library/packages/src/PackageCallbacks.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/packages/src/PackageCallbacks.ycp?rev=47249&r1=47248&r2=47249&view=diff
==============================================================================
--- trunk/yast2/library/packages/src/PackageCallbacks.ycp (original)
+++ trunk/yast2/library/packages/src/PackageCallbacks.ycp Fri May 2 14:55:31
2008
@@ -63,12 +63,12 @@

boolean textmode()
{
- return UI::GetDisplayInfo()["TextMode"]:false;
+ return Mode::commandline() ? true :
UI::GetDisplayInfo()["TextMode"]:false;
}

integer display_width()
{
- return UI::GetDisplayInfo()["Width"]:0;
+ return Mode::commandline() ? 0 : UI::GetDisplayInfo()["Width"]:0;
}

/* Location of the persistent storage */
@@ -2579,6 +2579,8 @@
y2milestone("Process: Start: task: %1, stages: %2, help: %3", task, stages,
help);
y2milestone("Progress: status: %1, isrunning: %2", Progress::status(),
Progress::IsRunning());

+ if (Mode::commandline()) return;
+
boolean opened = false;

if (Progress::status())
@@ -2609,6 +2611,9 @@
global boolean ProcessProgress(integer percent)
{
y2debug("Process: %1%%", percent);
+
+ if (Mode::commandline()) return true;
+
Progress::Step(percent);

return true;
@@ -2620,6 +2625,9 @@
global void ProcessNextStage()
{
y2milestone("Setting stage: %1", last_stage);
+
+ if (Mode::commandline()) return;
+
Progress::Stage(last_stage, "", -1);

last_stage = last_stage + 1;
@@ -2631,6 +2639,7 @@
global void ProcessDone()
{
y2milestone("Process: Finished");
+ if (Mode::commandline()) return;

integer idx = size(opened_wizard) - 1;


Modified: trunk/yast2/library/wizard/src/Progress.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Progress.ycp?rev=47249&r1=47248&r2=47249&view=diff
==============================================================================
--- trunk/yast2/library/wizard/src/Progress.ycp (original)
+++ trunk/yast2/library/wizard/src/Progress.ycp Fri May 2 14:55:31 2008
@@ -371,11 +371,6 @@

y2milestone("Progress::New(%1, %2, %3)", window_title, length, stg);

- // a progress is already running, remember the current status
- if (IsRunning())
- {
- PushState();
- }

integer orig_current_step = current_step;

@@ -388,6 +383,12 @@
if (Mode::commandline ())
return;

+ // a progress is already running, remember the current status
+ if (IsRunning())
+ {
+ PushState();
+ }
+
if (length < size(stg))
{
y2warning("Number of stages (%1) is greater than number of steps
(%2)", size(stg), length);

Modified: trunk/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=47249&r1=47248&r2=47249&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Fri May 2 14:55:31 2008
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Fri May 2 14:07:24 CEST 2008 - lslezak@xxxxxxx
+
+- Mode::test(), PakageCallbacks - do not call UI:: functions in
+ command line mode (do not initialize UI) (another fix for
+ bnc#374259)
+- 2.16.61
+
+-------------------------------------------------------------------
Wed Apr 30 12:02:38 CEST 2008 - lslezak@xxxxxxx

- Product.ycp - properly set 'name' and 'short_name' (bnc#368104)

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages