[yast-commit] r56514 - in /trunk/storage/storage/src/include: ep-lvm-dialogs.ycp ep-lvm-lib.ycp
Author: kmachalkova Date: Tue Mar 31 18:01:15 2009 New Revision: 56514 URL: http://svn.opensuse.org/viewcvs/yast?rev=56514&view=rev Log: Less talkative removal of logical volumes (#426907) Modified: trunk/storage/storage/src/include/ep-lvm-dialogs.ycp trunk/storage/storage/src/include/ep-lvm-lib.ycp Modified: trunk/storage/storage/src/include/ep-lvm-dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-lvm-dialogs.ycp?rev=56514&r1=56513&r2=56514&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-lvm-dialogs.ycp (original) +++ trunk/storage/storage/src/include/ep-lvm-dialogs.ycp Tue Mar 31 18:01:15 2009 @@ -79,8 +79,9 @@ //pop-up dialog title _("Confirm Deleting of Volume Group"), //pop-up dialog message part 1: %1 is vol.group name - sformat( _("The volume group \"%1\" contains at least one logical -volume. If you proceed, the following volumes will be deleted:"), vgname), + sformat( _("The volume group \"%1\" contains at least one logical volume. +If you proceed, the following volumes will be unmounted (if mounted) +and deleted:"), vgname), //pop-up dialog message part 2: %1 is vol.group name sformat( _("Really delete volume group \"%1\" and all related logical volumes?"), vgname) ); Modified: trunk/storage/storage/src/include/ep-lvm-lib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-lvm-lib.ycp?rev=56514&r1=56513&r2=56514&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-lvm-lib.ycp (original) +++ trunk/storage/storage/src/include/ep-lvm-lib.ycp Tue Mar 31 18:01:15 2009 @@ -142,6 +142,7 @@ //how many of those we have? integer count = size(log_volumes); + boolean ret = false; boolean proceed = (count > 0) ? //non-empty VG - make sure user wants to delete all LVs ConfirmVgDelete(vgname, log_volumes) : @@ -150,33 +151,27 @@ if (proceed) { - foreach (string one_volume, log_volumes, { - if (!EpDeleteDevice(one_volume)) - { - proceed = false; - break; - } - }); + boolean recursive = Storage::GetRecursiveRemoval(); + Storage::SetRecursiveRemoval( true ); - if (proceed) + if (Storage::DeleteLvmVg(vgname)) { - if (Storage::DeleteLvmVg(vgname)) - { - UpdateMainStatus(); - UpdateNavigationTree(`lvm); - TreePanel::Create(); - } - return true; + UpdateMainStatus(); + UpdateNavigationTree(`lvm); + TreePanel::Create(); + ret = true; } else { Popup::Error( sformat(_("Deleting volume group \"%1\" failed."), vgname)); //FIXME: some rollback? - return false; + ret = false; } + + Storage::SetRecursiveRemoval( recursive ); } - else - return false; + + return ret; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org