Hello,

After using "view changes", the selection got reset to the first changed        
                                                                                
                                                                                
                               
profile. This could mislead the user into saving the wrong profile.             
                                                                                
                                                                                
                               

This patch ensures the selection is kept.


I propose this patch for trunk and 2.11.                                        
                                                                                
                                                                                
                               
(2.11 will need different indentation again.)

I'm not sure if we should also apply this in 2.10 and 2.9 - they have           
                                                                                
                                                                                
                               
the same behaviour, but OTOH I'm not sure if changing behaviour (even if        
                                                                                
                                                                                
                               
it's an improvement) in those old releases is a good idea.                      
                                                                                
                                                                                
                               
Opinions?                                                                       
                                                                                
                                                                                
                               


[ 05-save_profiles-remember-selected.diff ]

--- utils/apparmor/aa.py        2017-10-22 14:39:16.033063038 +0200
+++ utils/apparmor/aa.py        2017-10-22 14:39:48.424905988 +0200
@@ -1832,11 +1832,13 @@
 
             ans, arg = q.promptUser()
 
+            q.selected = arg  # remember selection
             which = options[arg]
 
             if ans == 'CMD_SAVE_SELECTED':
                 write_profile_ui_feedback(which)
                 reload_base(which)
+                q.selected = 0  # saving the selected profile removes it from 
the list, therefore reset selection
 
             elif ans == 'CMD_VIEW_CHANGES':
                 oldprofile = None



Regards,

Christian Boltz
-- 
> Morgen werde ich mich jedenfalls von suse-linux abmelden (muessen).
So einfach geht das aber nicht. Du hast das Kleingedruckt offenbar nicht
gelesen. Bei Listenmitgliedern, wie Dir, beträgt die Kündigungsfrist
8 Jahre auf das Jahrtausend-Ende. ;-)
[> Thomas Hertweck und Thorsten Körner in suse-linux]

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to