Author: locilka
Date: Tue Apr 29 15:38:38 2008
New Revision: 47161
URL: http://svn.opensuse.org/viewcvs/yast?rev=47161&view=rev
Log:
- Progress for "searching for partitions" (bnc #384707).
- 2.16.8
Modified:
trunk/update/VERSION
trunk/update/package/yast2-update.changes
trunk/update/src/modules/RootPart.ycp
Modified: trunk/update/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/VERSION?rev=47161&r1=47160&r2=47161&view=diff
==============================================================================
--- trunk/update/VERSION (original)
+++ trunk/update/VERSION Tue Apr 29 15:38:38 2008
@@ -1 +1 @@
-2.16.7
+2.16.8
Modified: trunk/update/package/yast2-update.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/package/yast2-update.changes?rev=47161&r1=47160&r2=47161&view=diff
==============================================================================
--- trunk/update/package/yast2-update.changes (original)
+++ trunk/update/package/yast2-update.changes Tue Apr 29 15:38:38 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Apr 29 13:31:05 CEST 2008 - locilka@suse.cz
+
+- Progress for "searching for partitions" (bnc #384707).
+- 2.16.8
+
+-------------------------------------------------------------------
Wed Apr 23 15:29:55 CEST 2008 - locilka@suse.cz
- Added new client for run_update that does the real update, the
Modified: trunk/update/src/modules/RootPart.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/src/modules/RootPart.ycp?rev=47161&r1=47160&r2=47161&view=diff
==============================================================================
--- trunk/update/src/modules/RootPart.ycp (original)
+++ trunk/update/src/modules/RootPart.ycp Tue Apr 29 15:38:38 2008
@@ -1495,15 +1495,36 @@
Storage::ActivateEvms();
map target_map = (map ) Storage::GetOndiskTarget ();
y2milestone ("target_map: %1", target_map);
-// target_map = (map ) Storage::GetTargetMap ();
-// y2milestone ("target_map: %1", target_map);
+
+ // prepare progress-bar
+ if (UI::WidgetExists (`id ("search_progress")))
+ UI::ReplaceWidget (
+ `id ("search_progress"),
+ `ProgressBar (
+ `id ("search_pb"),
+ _("Evaluating root partition. One moment please..."),
+ 100,
+ 0
+ )
+ );
rootPartitions = $[];
numberOfValidRootPartitions = 0;
+ // all partitions on all devices
+ integer max_steps = 0;
+ foreach (string device, map description, target_map, {
+ max_steps = max_steps + size (description["partitions"]:[]);
+ });
+
+ integer counter = 0;
foreach (string device, map description, target_map, {
foreach (map partition, description["partitions"]:[], {
+ counter = counter + 1;
+ if (UI::WidgetExists (`id ("search_progress")))
+ UI::ChangeWidget (`id ("search_pb"), `Value, (100 * counter / max_steps));
+
// some partitions don't make sense at all
if (partition["detected_fs"]:`unknown != `swap &&
partition["type"]:`primary != `extended)
@@ -1523,6 +1544,10 @@
});
});
+ // 100%
+ if (UI::WidgetExists (`id ("search_progress")))
+ UI::ChangeWidget (`id ("search_pb"), `Value, 100);
+
didSearchForRootPartitions = true;
y2milestone ("rootPartitions: %1", rootPartitions);
@@ -1549,15 +1574,19 @@
global void Detect () {
if (!didSearchForRootPartitions)
{
- // FIXME: can we use a Progress for that?
- UI::OpenDialog (`opt(`decorated ),
- // label
- `Label(_("Evaluating root partition. One moment please...")));
+ Wizard::SetContents (
+ // TRANSLATORS: dialog caption
+ _("Update Configuration"),
+ `VBox (
+ `ReplacePoint (`id ("search_progress"), `Empty())
+ ),
+ "",
+ false,
+ false
+ );
FindRootPartitions ();
- UI::CloseDialog ();
-
selectedRootPartition = "";
y2milestone ("Detected root partitions: %1", rootPartitions);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org