Author: kmachalkova Date: Tue Apr 22 16:48:49 2008 New Revision: 46958 URL: http://svn.opensuse.org/viewcvs/yast?rev=46958&view=rev Log: Activate selected disk/partition/whatever by double clicking on an item in table Fixme: do it also for LVM, only HD's and partitions work so far :) Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.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/storage/src/include/ep-hd.ycp?rev=46958&r1=46957&r2=46958&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Tue Apr 22 16:48:49 2008 @@ -85,7 +85,7 @@ UI::ReplaceWidget(`tree_panel, `VBox( `Left(`Heading(_("Hard Disks"))), - `Table(`id(`table), `opt(`keepSorting), + `Table(`id(`table), `opt(`keepSorting,`notify ), header, table_list), buttons ) @@ -247,7 +247,7 @@ UI::ReplaceWidget(`tab_panel, `VBox( - `Table(`id(`table), `opt(`keepSorting), + `Table(`id(`table), `opt(`keepSorting, `notify), header, table_list ), `HBox( 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=46958&r1=46957&r2=46958&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 Tue Apr 22 16:48:49 2008 @@ -248,6 +248,11 @@ } } } + else if (widget == `table) + { + any citem = UI::QueryWidget(`id(`table), `CurrentItem); + TreePanel::SwitchToNew( citem ); + } } until (widget == `back || widget == `abort || widget == `next); Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp?rev=46958&r1=46957&r2=46958&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp Tue Apr 22 16:48:49 2008 @@ -118,6 +118,17 @@ } } + global void SwitchToNew( any new_current_item ) + { + if (current_item != new_current_item) + { + UI::ChangeWidget(`tree, `CurrentItem, new_current_item); + CallDestroy(); + current_item = new_current_item; + CallCreate(); + } + } + /** * Delegating destroying to the selected panel. */ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org