[yast-commit] r55466 - /trunk/storage/storage/src/include/ep-graph.ycp
Author: aschnell Date: Thu Feb 12 15:28:06 2009 New Revision: 55466 URL: http://svn.opensuse.org/viewcvs/yast?rev=55466&view=rev Log: - handle mount-points in graph Modified: trunk/storage/storage/src/include/ep-graph.ycp Modified: trunk/storage/storage/src/include/ep-graph.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-graph.ycp?rev=55466&r1=55465&r2=55466&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-graph.ycp (original) +++ trunk/storage/storage/src/include/ep-graph.ycp Thu Feb 12 15:28:06 2009 @@ -37,6 +37,22 @@ void HandleGraphPanel(any user_data, symbol widget) { + void GotoDevice(string device) + { + TreePanel::SwitchToNew(device); + UI::SetFocus(UI::WidgetExists(`id(`table)) ? `id(`table) : `id(`text)); + } + + void GotoMountpoint(string mountpoint) + { + foreach(string dev, map disk, Storage::GetTargetMap(), { + foreach(map part, disk["partitions"]:[], { + if (part["mount"]:"" == mountpoint) + GotoDevice(part["device"]:""); + }); + }); + } + switch (widget) { case `graph: @@ -44,15 +60,9 @@ string node = (string) UI::QueryWidget(`id(`graph), `Item); if (String::StartsWith(node, "device:")) - { - string device = substring(node, 7); - TreePanel::SwitchToNew(device); - UI::SetFocus(UI::WidgetExists(`id(`table)) ? `id(`table) : `id(`text)); - } + GotoDevice(substring(node, 7)); else if (String::StartsWith(node, "mountpoint:")) - { - // TODO - } + GotoMountpoint(substring(node, 11)); } break; -- 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