Now when a user makes changes to a profile, those changes are staged (but not automatically applied) by the AppArmor::Parser class in libappanvil. Two buttons appear at the bottom of the screen that allow the user to either cancel the changes or apply them to the system.
Internally the logic for cancelling/applying changes is handled by libappanvil. Additionally, libappanvil can determine if there are any unsaved changes. In libappanvil I created a binary called "aa-replace" which saves a profile and loads it using "apparmor_parser".
I also added a GtkRevealer to automatically hide/show the cancel/apply buttons. These buttons should only be visible if there are staged changes to the profile.
I am considering creating a loading spinner, which will only show after the "Apply" button is pressed. Currently, it takes a few seconds for the pkexec prompt to pass and aa-replace to terminate. The user might be unsure whether the operation has completed successfully.
This PR closes #56.
Now when a user makes changes to a profile, those changes are staged (but not automatically applied) by the AppArmor::Parser class in libappanvil. Two buttons appear at the bottom of the screen that allow the user to either cancel the changes or apply them to the system.
Internally the logic for cancelling/applying changes is handled by libappanvil. Additionally, libappanvil can determine if there are any unsaved changes. In libappanvil I created a binary called "aa-replace" which saves a profile and loads it using "apparmor_parser".
I also added a GtkRevealer to automatically hide/show the cancel/apply buttons. These buttons should only be visible if there are staged changes to the profile.
I am considering creating a loading spinner, which will only show after the "Apply" button is pressed. Currently, it takes a few seconds for the pkexec prompt to pass and aa-replace to terminate. The user might be unsure whether the operation has completed successfully.