Author: kmachalkova Date: Fri Mar 6 17:10:59 2009 New Revision: 55990 URL: http://svn.opensuse.org/viewcvs/yast?rev=55990&view=rev Log: Has nothing in common with the bug (#480099), but always moving kbd focus to the first item just annoys me Modified: trunk/apparmor/src/include/subdomain/profile_dialogs.ycp Modified: trunk/apparmor/src/include/subdomain/profile_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/include/subdomain/profile_dialogs.ycp?rev=55990&r1=55989&r2=55990&view=diff ============================================================================== --- trunk/apparmor/src/include/subdomain/profile_dialogs.ycp (original) +++ trunk/apparmor/src/include/subdomain/profile_dialogs.ycp Fri Mar 6 17:10:59 2009 @@ -851,11 +851,11 @@ { event = UI::WaitForEvent( timeout_millisec ); id = event["ID"]:nil; // We'll need this often - cache it + integer itemselected = ((integer) UI::QueryWidget(`id(`table), `CurrentItem) ); if ( (( id == `table ) && (event["EventReason"]:nil == "Activated" )) || ( id == `edit) ) { // Widget activated in the table - integer itemselected = ((integer) UI::QueryWidget(`id(`table), `CurrentItem) ); string rule = (string) select((term) UI::QueryWidget(`id(`table), `Item(itemselected)), 1, ""); integer findcap = find( rule, "CAP_"); integer findinc = find( rule, "#include"); @@ -900,9 +900,9 @@ includes, hats ); UI::ChangeWidget( `id(`table), `Items, profilelist ); + UI::ChangeWidget( `id(`table), `CurrentItem, itemselected ); } else if ( id == `delete ) { - integer selectedid = ((integer) UI::QueryWidget(`id(`table), `CurrentItem) ); - string rule = (string) select((term) UI::QueryWidget(`id(`table), `Item(selectedid)), 1, ""); + string rule = (string) select((term) UI::QueryWidget(`id(`table), `Item(itemselected)), 1, ""); integer findcap = find( rule, "CAP_"); integer findinc = find( rule, "#include"); integer findhat = find( rule, "[+] ^"); @@ -935,6 +935,7 @@ includes, hats ); UI::ChangeWidget( `id(`table), `Items, profilelist ); + UI::ChangeWidget( `id(`table), `CurrentItem, (itemselected == 0) ? 0 : itemselected -1 ); } else if ( id == `file || id == `dir ) { string addfname = ""; integer addperms = 0; @@ -960,6 +961,7 @@ includes, hats ); UI::ChangeWidget( `id(`table), `Items, profilelist ); + UI::ChangeWidget( `id(`table), `CurrentItem, itemselected ); } else if ( id == `cap ) { caps = capabilityEntryPopup( caps, "", pathname ); profile["allow","capability"] = caps; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org