From 029fdadf47de518cca4c9378bb58ad15656e9be0 Mon Sep 17 00:00:00 2001 From: Mateus Melchiades Date: Mon, 6 Mar 2023 11:44:16 -0300 Subject: [PATCH] Fixes --- vanilla_first_setup/defaults/user.py | 2 +- vanilla_first_setup/utils/processor.py | 2 +- vanilla_first_setup/views/progress.py | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vanilla_first_setup/defaults/user.py b/vanilla_first_setup/defaults/user.py index 59306c5..080a769 100644 --- a/vanilla_first_setup/defaults/user.py +++ b/vanilla_first_setup/defaults/user.py @@ -58,7 +58,7 @@ class VanillaDefaultUser(Adw.Bin): def __on_btn_next_clicked(self, widget): self.__window.set_user(self.username) - self.__window.next + self.__window.next() def get_finals(self): return { diff --git a/vanilla_first_setup/utils/processor.py b/vanilla_first_setup/utils/processor.py index c02b5e2..75ed618 100644 --- a/vanilla_first_setup/utils/processor.py +++ b/vanilla_first_setup/utils/processor.py @@ -141,7 +141,7 @@ class Processor: if os.path.exists(autostart_file): os.remove(autostart_file) - with open(desktop_file, "w") as f: + with open(desktop_file, "w+") as f: f.write("[Desktop Entry]\n") f.write("Name=FirstSetup\n") f.write("Comment=FirstSetup\n") diff --git a/vanilla_first_setup/views/progress.py b/vanilla_first_setup/views/progress.py index c1eca4d..17656c6 100644 --- a/vanilla_first_setup/views/progress.py +++ b/vanilla_first_setup/views/progress.py @@ -33,7 +33,7 @@ class VanillaProgress(Gtk.Box): console_button = Gtk.Template.Child() console_box = Gtk.Template.Child() console_output = Gtk.Template.Child() - + def __init__(self, window, tour: dict, **kwargs): super().__init__(**kwargs) self.__window = window @@ -69,14 +69,14 @@ class VanillaProgress(Gtk.Box): self.__terminal.set_mouse_autohide(True) self.console_output.append(self.__terminal) self.__terminal.connect("child-exited", self.on_vte_child_exited) - + palette = ["#353535", "#c01c28", "#26a269", "#a2734c", "#12488b", "#a347ba", "#2aa1b3", "#cfcfcf", "#5d5d5d", "#f66151", "#33d17a", "#e9ad0c", "#2a7bde", "#c061cb", "#33c7de", "#ffffff"] - + FOREGROUND = palette[0] BACKGROUND = palette[15] FOREGROUND_DARK = palette[15] BACKGROUND_DARK = palette[0] - + self.fg = Gdk.RGBA() self.bg = Gdk.RGBA() @@ -90,7 +90,7 @@ class VanillaProgress(Gtk.Box): self.fg.parse(FOREGROUND_DARK) self.bg.parse(BACKGROUND_DARK) self.__terminal.set_colors(self.fg, self.bg, self.colors) - + for _, tour in self.__tour.items(): self.carousel_tour.append(VanillaTour(self.__window, tour)) @@ -113,11 +113,11 @@ class VanillaProgress(Gtk.Box): time.sleep(5) RunAsync(run_async, None) - + def on_vte_child_exited(self, terminal, status, *args): terminal.get_parent().remove(terminal) status = not bool(status) - + if self.__success_fn is not None and status: self.__success_fn(*self.__success_fn_args)