Author: aschnell Date: Mon Apr 7 12:58:25 2008 New Revision: 46174 URL: http://svn.opensuse.org/viewcvs/yast?rev=46174&view=rev Log: - added dasd, zfcp and xpram buttons Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Mon Apr 7 12:58:25 2008 @@ -15,85 +15,102 @@ void CreateHdMainPanel(any user_data) { + term tmp = `VBox( + `PushButton(`id(`iscsi), _("Configure &iSCSI...")), + `PushButton(`id(`multipath), _("Configure &Multipath...")) + ); + + if (Arch::s390()) + { + tmp = add(tmp, `PushButton(`id(`dasd), _("Configure DASD..."))); + tmp = add(tmp, `PushButton(`id(`zfcp), _("Configure zFCP..."))); + tmp = add(tmp, `PushButton(`id(`xpram), _("Configure XPRAM..."))); + } + UI::ReplaceWidget(`tree_panel, - `VBox( - `HStretch(), - `Left(`Heading("Hard Disks")), + Greasemonkey::Transform( `VBox( - `PushButton(`id(`rescan), "Rescan"), - `PushButton(`id(`fstab), "Search for Fstab..."), - `PushButton(`id(`iscsi), _("Configure &iSCSI...")), - `PushButton(`id(`multipath), _("Configure &Multipath...")) - ), - `VStretch() - ) + `HStretch(), + `Left(`Heading("Hard Disks")), + `VStackFrames( + `Frame(_("Detection"), + `VBox( + `PushButton(`id(`rescan), "Rescan") + ) + ), + `Frame(_("Configuration"), tmp), + `Frame(_("Import"), + `VBox( + `PushButton(`id(`fstab), "Import Mount Points...") + ) + ) + ), + `VStretch() + )) ); } void HandleHdMainPanel(any user_data, any widget) { - if (widget == `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) + void CallConfig(string text, list<string> pkgs, string call) { 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?")); + doit = Popup::YesNo(text); } if (doit) { - if (Package::InstallAll(["yast2-iscsi-client"])) + if (pkgs == nil || Package::InstallAll(pkgs)) { - WFM::call("iscsi-client"); + if (call != nil) + WFM::call(call); RescanDisks(); Storage::CreateTargetBackup("expert-partitioner"); UpdateNavigationTree(`hd); } } } + + + if (widget == `rescan) + { + // popup text + CallConfig(_("Rescaning disks cancels all current changes. +Really rescan disks?"), nil, nil); + } + else if (widget == `iscsi) + { + // popup text + CallConfig(_("Calling iSCSI configuration cancels all current changes. +Really call iSCSI configuration?"), ["yast2-iscsi-client"], "iscsi-client"); + } else if (widget == `multipath) { - boolean doit = true; - - if (!Storage::EqualBackupStates("expert-partitioner", "", true)) - { - // popup text - doit = Popup::YesNo(_("Calling Multipath configuration cancels all current changes. -Really call Multipath configuration?")); - } - - if (doit) - { - if (Package::InstallAll(["yast2-multipath"])) - { - WFM::call("multipath"); - RescanDisks(); - Storage::CreateTargetBackup("expert-partitioner"); - UpdateNavigationTree(`hd); - } - } + // popup text + CallConfig(_("Calling Multipath configuration cancels all current changes. +Really call Multipath configuration?"), ["yast2-multipath"], "multipath"); + } + else if (widget == `dasd) + { + // popup text + CallConfig(_("Calling DASD configuration cancels all current changes. +Really call DASD configuration?"), ["yast2-s390"], "dasd"); + } + else if (widget == `zfcp) + { + // popup text + CallConfig(_("Calling zFCP configuration cancels all current changes. +Really call zFCP configuration?"), ["yast2-s390"], "zfcp"); + } + else if (widget == `xpram) + { + // popup text + CallConfig(_("Calling XPRAM configuration cancels all current changes. +Really call XPRAM configuration?"), ["yast2-s390"], "xpram"); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org