[yast-commit] r49577 - in /trunk/storage/storage/src: include/custom_part_dialogs.ycp inst_custom_part.ycp
Author: aschnell Date: Fri Aug 1 15:15:03 2008 New Revision: 49577 URL: http://svn.opensuse.org/viewcvs/yast?rev=49577&view=rev Log: - removed obsolete code Modified: trunk/storage/storage/src/include/custom_part_dialogs.ycp trunk/storage/storage/src/inst_custom_part.ycp Modified: trunk/storage/storage/src/include/custom_part_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custom_part_dialogs.ycp?rev=49577&r1=49576&r2=49577&view=diff ============================================================================== --- trunk/storage/storage/src/include/custom_part_dialogs.ycp (original) +++ trunk/storage/storage/src/include/custom_part_dialogs.ycp Fri Aug 1 15:15:03 2008 @@ -1477,118 +1477,6 @@ }; -define term TargetShowBarGraph( map target, string dev ) - ``{ - list partitions_size = []; - list partitions_text = []; - integer sum_used = 0; - integer cyl_size = target["cyl_size"]:1; - integer cyl_count = target["cyl_count"]:1; - integer min_size = tointeger( cyl_count / 8 ); - - - y2milestone( " target %1" ,target ); - y2milestone( " parts %1", target["partitions"]:[] ); - - foreach( map part, target["partitions"]:[], - ``{ - if( part["type"]:`primary != `extended ) - { - integer part_size = part["region",1]:0; - string part_size_str = ""; - - part_size_str = ByteToHumanString(part_size * cyl_size); - - sum_used = sum_used + part_size; - if( part_size < min_size ) - part_size = min_size; - - partitions_size = add( partitions_size , part_size); - - string part_text = part["mount"]:""; - - if( part_text == "" || part_text == nil ) - part_text = dev + sformat("%1", part["nr"]:(any)0); - - part_text = part_text + "\n" + part_size_str; - - partitions_text = add( partitions_text, part_text ); - } - }); - - integer free = cyl_count - sum_used; - - if( free > 0 ) - { - if( free > min_size ) - partitions_size = add( partitions_size, free ); - else partitions_size = add( partitions_size, min_size ); - // label text - partitions_text = add( partitions_text, _("free")); - } - - if( Mode::test () ) - { - y2milestone(" partitions_size : %1", partitions_size); - y2milestone(" partitions_text : %1", partitions_text); - } - - return `BarGraph(`opt(`vstretch), partitions_size , partitions_text ); - }; - - - -define boolean TargetAllocationDlg( map target, string dev) - ``{ - if( ! UI::HasSpecialWidget(`BarGraph) ) - { - // %1 is a disk device, example: You have selected the disk /dev/hda, but can only edit a partition like /dev/hda11, /dev/hda2, - Popup::Warning(sformat(_("\n You have selected the disk %1, but you can \n only edit a partition like %11, %12, ... \n"), dev)); - } - else - { - UI::OpenDialog(`opt(`decorated ), - `VBox( - `VSpacing(1), - `Left( `Heading( dev + ":")), - `VSpacing(1), - `VStretch(), - `HSpacing(80), - TargetShowBarGraph(target ,dev), - `VStretch(), - `VSpacing(1), - `HBox( - `PushButton(`id(`close), Label::CloseButton() ) - ) - )); - - UI::UserInput(); - UI::CloseDialog(); - } - - return true; - }; - - - - -define boolean DDZeroPartitionTable( string del_dev, integer size_k ) - ``{ - // popup text - if( Popup::YesNo(sformat(_("CAUTION -If you delete the partition table and disk label of -device %1, data on this device will be lost. - -Really do this? -"), del_dev))) - { - Storage::DeletePartitionTable(del_dev,size_k); - return true; - } - return false; - }; - - symbol ReallyInstPrepdisk() { symbol ret = `none; Modified: trunk/storage/storage/src/inst_custom_part.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_custom_part.ycp?rev=49577&r1=49576&r2=49577&view=diff ============================================================================== --- trunk/storage/storage/src/inst_custom_part.ycp (original) +++ trunk/storage/storage/src/inst_custom_part.ycp Fri Aug 1 15:15:03 2008 @@ -2577,7 +2577,6 @@ } else { - TargetAllocationDlg(tg[id]:$[], id ); } } else if( part["type"]:`unknown == `lvm ) @@ -2821,18 +2820,6 @@ // Delete partition table and disk label ///////////////////////////////////////////////////////////// - if( ret == `delete_parttable ) - { - string ddev = ChooseDisk( tg, - // heading text - _("Delete Partition Table"), `delete ); - // not cancel - if( ddev != nil ) - { - DDZeroPartitionTable( ddev, tg[ddev,"size_k"]:0 ); - } - } - if( Arch::s390 () && ret==`dasdfmt ) { string id = (string)UI::QueryWidget(`id(`table), `CurrentItem); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org