def restoreDefaults(): home = os.path.expanduser("~") # TODO backup old files run(f"cp -r /etc/skel {home}/", shell=True) from JAK.Widgets import Dialog window = Instance.retrieve("win") msg = "Profile defaults have been set on your home directory." Dialog.information(window, "Set Defaults", msg)
def package_sync_callback(*args): print(args) window = Instance.retrieve("win") msg = f"Would you like to update your software and operating system from {self.branch_lock['branch']} branch now?" Dialog.question(window, " ", msg, update) self.branch_lock["branch"] = "" JavaScript.send(f""" desktop.elem(`#{self.branch_lock["branch"]}-btn`).checked = true """)
def callback(sucprocess: Gio.Subprocess, result: Gio.AsyncResult, data): proc.communicate_utf8_finish(result) current_branch = Desktop.getBranch() if current_branch != desired_branch: JavaScript.send(f""" desktop.elem(`#{current_branch}-btn`).checked = true """) notify("Something went wrong", "") else: window = Instance.retrieve("win") msg = f"All Done, would you like to update your software and operating system from {current_branch.upper()} branch now?" Dialog.question(window, " ", msg, update)
def restoreDefaultsDialog(): window = Instance.retrieve("win") msg = "Some of your manual configuration under your HOME folder will be lost, Would you like to proceed?" Dialog.question(window, " ", msg, Desktop.restoreDefaults)