Author: aschnell Date: Fri Apr 18 18:48:04 2008 New Revision: 46872 URL: http://svn.opensuse.org/viewcvs/yast?rev=46872&view=rev Log: - removed global variable Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp?rev=46872&r1=46871&r2=46872&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp Fri Apr 18 18:48:04 2008 @@ -40,10 +40,7 @@ include "partitioning/ep-log.ycp"; - map<any, map> data = $[]; - - - list<term> MakeNavigationTree(map open_items) + void MakeNavigationTree(map open_items, list<term>& tree, map<any, map>& data) { // TODO: somehow use AlwaysHideDisk and AlwaysHidePartition @@ -128,26 +125,26 @@ string short_hostname = Hostname::CurrentHostname(); - list<term> tree = [ `item(`id(`all), short_hostname, open(`all), [ - `item(`id(`hd), "Hard Disks", open(`hd), subtree[`hd]:[]), - `item(`id(`lvm), "Volume Management", open(`lvm), subtree[`lvm]:[]), - `item(`id(`md), "RAID", open(`md), subtree[`md]:[]), - `item(`id(`loop), "Crypt Files", open(`loop), subtree[`loop]:[]), - `item(`id(`dm), "Device Mapper", open(`dm), subtree[`dm]:[]), - `item(`id(`nfs), "NFS", open(`nfs), subtree[`nfs]:[]), - `item(`id(`unused), "Unused Devices", open(`unused)) - ]), - `item(`id(`settings), "Settings", open(`settings)), - `item(`id(`log), "Log", open(`log)) ]; - - return tree; + tree = [ `item(`id(`all), short_hostname, open(`all), [ + `item(`id(`hd), _("Hard Disks"), open(`hd), subtree[`hd]:[]), + `item(`id(`lvm), _("Volume Management"), open(`lvm), subtree[`lvm]:[]), + `item(`id(`md), _("RAID"), open(`md), subtree[`md]:[]), + `item(`id(`loop), _("Crypt Files"), open(`loop), subtree[`loop]:[]), + `item(`id(`dm), _("Device Mapper"), open(`dm), subtree[`dm]:[]), + `item(`id(`nfs), _("NFS"), open(`nfs), subtree[`nfs]:[]), + `item(`id(`unused), _("Unused Devices"), open(`unused)) + ]), + `item(`id(`settings), _("Settings"), open(`settings)), + `item(`id(`log), _("Log"), open(`log)) ]; } void UpdateNavigationTree(any new_focus) { + list<term> tree = []; + map<any, map> data = $[]; map open_items = (map) UI::QueryWidget(`id(`tree), `OpenItems); - list<term> tree = MakeNavigationTree(open_items); + MakeNavigationTree(open_items, tree, data); TreePanel::Update(data, tree, new_focus); } @@ -179,26 +176,28 @@ } - term systemViewTreePanel = - `VBox( - `Tree(`id(`tree), `opt(`notify), "System View", MakeNavigationTree($[`all : "ID"])) - ); - - any test_new_ep() { SCR::Write(.target.ycp, Storage::SaveDumpPath("targetmap-ep-start"), Storage::GetTargetMap()); Storage::CreateTargetBackup("expert-partitioner"); + list<term> tree = []; + map<any, map> data = $[]; + MakeNavigationTree($[`all : "ID"], tree, data); + string back_label = Label::BackButton(); string next_label = Label::AcceptButton(); - term contents = `MarginBox(0.7, 0.5, + term contents = `MarginBox(0.5, 0.5, `HBox( - `HWeight(30, systemViewTreePanel ), - `HWeight(70, `ReplacePoint(`id(`tree_panel), - TreePanel::empty_panel)) + `HWeight(30, + `VBox( + `Tree(`id(`tree), `opt(`notify), _("System View"), tree) + ) + ), + `HWeight(70, + `ReplacePoint(`id(`tree_panel), TreePanel::empty_panel)) ) ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org