Author: aschnell Date: Fri Mar 28 12:35:36 2008 New Revision: 45824 URL: http://svn.opensuse.org/viewcvs/yast?rev=45824&view=rev Log: - rescan and iscsi Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp?rev=45824&r1=45823&r2=45824&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp Fri Mar 28 12:35:36 2008 @@ -183,4 +183,16 @@ UI::UserInput(); UI::CloseDialog(); } + + + void RescanDisks() + { + UI::OpenDialog(`opt(`decorated), + // popup text + `MarginBox(2, 1, `Label(_("Rescanning disks...")))); + + Storage::ReReadTargetMap(); + + UI::CloseDialog(); + } } Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp?rev=45824&r1=45823&r2=45824&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Fri Mar 28 12:35:36 2008 @@ -34,7 +34,43 @@ { if (widget == `rescan) { - Popup::YesNo (_("Rescan?")); + boolean doit = true; + + if (!Storage::EqualBackupStates("expert-partitioner", "", true)) + { + // popup text + doit = Popup::YesNo(_("Rescaning disks cancels all current changes. +Really rescan disks?")); + } + + if (doit) + { + RescanDisks(); + Storage::CreateTargetBackup("expert-partitioner"); + UpdateNavigationTree(`hd); + } + } + else if (widget == `iscsi) + { + boolean doit = true; + + if (!Storage::EqualBackupStates("expert-partitioner", "", true)) + { + // popup text + doit = Popup::YesNo(_("Calling iSCSI configuration cancels all current changes. +Really call iSCSI configuration?")); + } + + if (doit) + { + if (Package::InstallAll(["yast2-iscsi-client"])) + { + WFM::call("iscsi-client"); + RescanDisks(); + Storage::CreateTargetBackup("expert-partitioner"); + UpdateNavigationTree(`hd); + } + } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org