Fix password setting using chpasswd -R and improve screen wake lock
This commit is contained in:
@@ -230,6 +230,12 @@ class InstallerWindow(Adw.ApplicationWindow):
|
||||
if self.log_handler:
|
||||
logging.getLogger().removeHandler(self.log_handler)
|
||||
self.log_handler = None
|
||||
|
||||
# Release wake lock if held
|
||||
if hasattr(self, "inhibit_cookie") and self.inhibit_cookie:
|
||||
app = self.get_application()
|
||||
app.uninhibit(self.inhibit_cookie)
|
||||
self.inhibit_cookie = None
|
||||
|
||||
finish_page = Adw.StatusPage()
|
||||
finish_page.set_title(message)
|
||||
@@ -465,11 +471,11 @@ class InstallerWindow(Adw.ApplicationWindow):
|
||||
# Show success in UI even in mock
|
||||
self.show_finish_page("Mock Installation Complete!")
|
||||
else:
|
||||
# Inhibit logout/suspend
|
||||
# Inhibit logout/suspend/idle
|
||||
app = self.get_application()
|
||||
self.inhibit_cookie = app.inhibit(
|
||||
self,
|
||||
Gtk.ApplicationInhibitFlags.LOGOUT | Gtk.ApplicationInhibitFlags.SUSPEND,
|
||||
Gtk.ApplicationInhibitFlags.LOGOUT | Gtk.ApplicationInhibitFlags.SUSPEND | Gtk.ApplicationInhibitFlags.IDLE,
|
||||
"Installing Operating System"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user