Author: aschnell Date: Thu Aug 7 12:04:36 2008 New Revision: 49811 URL: http://svn.opensuse.org/viewcvs/yast?rev=49811&view=rev Log: - removed obsolete code Modified: trunk/storage/storage/src/inst_custom_part.ycp 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=49811&r1=49810&r2=49811&view=diff ============================================================================== --- trunk/storage/storage/src/inst_custom_part.ycp (original) +++ trunk/storage/storage/src/inst_custom_part.ycp Thu Aug 7 12:04:36 2008 @@ -1770,120 +1770,6 @@ }; - /*--------------------------------------------------------------------- - * Dialog choose disk - * return /dev/xxx or nil if cancel - * what -> `create or `delete - *--------------------------------------------------------------------- - */ - -boolean SelDisk( symbol what, map disk ) - { - return( (what==`delete||!disk["readonly"]:false) && - Storage::IsPartitionable( disk ) && - disk["used_by_type"]:`UB_NONE==`UB_NONE ); - } - - -define term RaidButton( integer num ) - ``{ - list item_list = []; - item_list = add( item_list, - // menue entry text - `item( `id(`raid_wizard), _("&Create RAID...") )); - if( num>0 ) - item_list = add( item_list, - // menu entry text - `item( `id(`raid_settings), _("&Edit RAID"))); - // button text - return( `MenuButton( _("&RAID...") , item_list )); - }; - -define term LoopButton( integer num ) - ``{ - list item_list = []; - item_list = add( item_list, - // menue entry text - `item( `id(`loop_create), _("&Create Crypt File") )); - if( num>0 ) - item_list = add( item_list, - // menue entry text - `item( `id(`loop_edit), _("&Edit Crypt File"))); - // button text - return( `MenuButton( _("Cr&ypt File...") , item_list )); - }; - - - - /*--------------------------------------------------------------------- - * Dialog choose primary extended or logical Partition - * Input "PL", "PE" or "PEL" - * return `primary or `logical or `extended or `none - *--------------------------------------------------------------------- - */ - -define symbol ChoosePart( string usage ) - ``{ - term PL = `VBox( - // button text - `Left( `RadioButton( `id(`primary ), _("&Primary Partition"), true )), - // button text - `Left( `RadioButton( `id(`logical ), _("&Logical Partition"), false )) - ); - term PE = `VBox( - // button text - `Left( `RadioButton( `id(`primary ), _("&Primary Partition"), true )), - // button text - `Left( `RadioButton( `id(`extended ), _("&Extended Partition"), false )) - ); - term PEL = `VBox( - // button text - `Left( `RadioButton( `id(`primary ), _("&Primary Partition"), true )), - // button text - `Left( `RadioButton( `id(`logical ), _("&Logical Partition"), false )), - // button text - `Left( `RadioButton( `id(`extended ), _("&Extended Partition"), false )) - ); - - term current = PEL; // default - if ( usage == "PL" ) current = PL; - if ( usage == "PE" ) current = PE; - - UI::OpenDialog( `opt(`decorated ), - // heading in a popup dialog - `VBox(`Heading(_("Partition Type") ), - `VSpacing(0.5), - `RadioButtonGroup( `id(`choosePL), current ), - `VSpacing(0.5), - `HBox( - // popup edit existing partition: OK - `PushButton(`id(`ok), `opt(`default), Label::OKButton() ), - // popup edit existing partition: Cancel - `PushButton(`id(`cancel), Label::CancelButton() ) - ) - ) - ); - symbol ret = (symbol)UI::UserInput(); - - if (ret == `cancel) - { - UI::CloseDialog(); - return(`none); - } - else - { - ret = (symbol)UI::QueryWidget(`id(`choosePL), `CurrentButton); - UI::CloseDialog(); - return(ret); - } - }; - - - /*--------------------------------------------------------------------- - * Make a output string for "you can not create a partition, because: " - *--------------------------------------------------------------------- - */ - define string FormatCauseLine( symbol cause ) ``{ @@ -1982,99 +1868,7 @@ Storage::CreateTargetBackup("custom_part"); } - ///////////////////////////////////////////////////////////////// - /// MAIN DIALOG - - - ///////////////////////////////////////////////////////////////// - // MAIN LAYOUT - // --------------------------- - - term buttonline_a = `HBox(); - - // main dialog: Button Create partition - if( button_create ) - buttonline_a = add( buttonline_a, - `PushButton(`id(`create), _("&Create")) ); - - // main dialog: Button Edit partition - if( button_edit ) - buttonline_a = add( buttonline_a, `PushButton(`id(`edit), _("&Edit"))); - - // main dialog: Button Delete partition - if( button_delete ) - buttonline_a = add( buttonline_a, - `PushButton(`id(`delete), _("&Delete")) ); - - // main dialog: Button Resize partition - if( button_resize ) - buttonline_a = add( buttonline_a, - `PushButton(`id(`resize), _("Re&size")) ); - - - - list expert_item_list =[]; - if( button_reread ) - expert_item_list = - add( expert_item_list , - // menu entry text - `item( `id (`reread), _("&Reread Partition Table"))); - if ( button_delete_parttable ) - expert_item_list = - add( expert_item_list, - `item( `id (`delete_parttable), - // menu entry text - _("Delete Partition &Table and Disk Label"))); - if( Arch::s390 () ) - { - expert_item_list = - add( expert_item_list, - `item( `id(`dasdfmt), - // menu entry text - _("Execute dasd&fmt on the DASD Device"))); - buttonline_a = add( buttonline_a, `PushButton(`id(`dasdfmt), - //button text using case-senstive command name. dasdfmt should not normally be translated. - _("dasd&fmt")) ); - } - expert_item_list = - add( expert_item_list, `item( `id(`iscsi), - // menu entry text - _("Call &iSCSI configuration"))); - - term buttonline_b = `HBox(); - - if( button_lvm ) - // main dialog: Button LVM - buttonline_b = add( buttonline_b, `PushButton(`id(`lvm), _("&LVM..."))); - - // main dialog: Button RAID - if( button_raid ) - buttonline_b = - add( buttonline_b, - `ReplacePoint( `id(`raid_button), - RaidButton(size(tg["/dev/md","partitions"]:[])))); - - // main dialog: Button LOOP - if( button_loop ) - buttonline_b = - add( buttonline_b, - `ReplacePoint( `id(`loop_button), - LoopButton(size(tg["/dev/loop","partitions"]:[])))); - - if( button_nfs ) - buttonline_b = add( buttonline_b, `PushButton(`id(`nfs), _("&NFS..."))); - - if( button_expert) - // main dialog: Menu-Button for Expert options - buttonline_b = - add( buttonline_b, `MenuButton ( _("E&xpert.."), expert_item_list )); - - - // check box - term details_checkbox = `Left ( - `CheckBox (`id(`show_table_details), `opt(`notify), _("&Show Details")) - ); string help_text = ""; if( Arch::s390 () ) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org