main
Mateus Melchiades 2 years ago
parent 53743064f2
commit 029fdadf47

@ -58,7 +58,7 @@ class VanillaDefaultUser(Adw.Bin):
def __on_btn_next_clicked(self, widget): def __on_btn_next_clicked(self, widget):
self.__window.set_user(self.username) self.__window.set_user(self.username)
self.__window.next self.__window.next()
def get_finals(self): def get_finals(self):
return { return {

@ -141,7 +141,7 @@ class Processor:
if os.path.exists(autostart_file): if os.path.exists(autostart_file):
os.remove(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("[Desktop Entry]\n")
f.write("Name=FirstSetup\n") f.write("Name=FirstSetup\n")
f.write("Comment=FirstSetup\n") f.write("Comment=FirstSetup\n")

@ -33,7 +33,7 @@ class VanillaProgress(Gtk.Box):
console_button = Gtk.Template.Child() console_button = Gtk.Template.Child()
console_box = Gtk.Template.Child() console_box = Gtk.Template.Child()
console_output = Gtk.Template.Child() console_output = Gtk.Template.Child()
def __init__(self, window, tour: dict, **kwargs): def __init__(self, window, tour: dict, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
self.__window = window self.__window = window
@ -69,14 +69,14 @@ class VanillaProgress(Gtk.Box):
self.__terminal.set_mouse_autohide(True) self.__terminal.set_mouse_autohide(True)
self.console_output.append(self.__terminal) self.console_output.append(self.__terminal)
self.__terminal.connect("child-exited", self.on_vte_child_exited) 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"] palette = ["#353535", "#c01c28", "#26a269", "#a2734c", "#12488b", "#a347ba", "#2aa1b3", "#cfcfcf", "#5d5d5d", "#f66151", "#33d17a", "#e9ad0c", "#2a7bde", "#c061cb", "#33c7de", "#ffffff"]
FOREGROUND = palette[0] FOREGROUND = palette[0]
BACKGROUND = palette[15] BACKGROUND = palette[15]
FOREGROUND_DARK = palette[15] FOREGROUND_DARK = palette[15]
BACKGROUND_DARK = palette[0] BACKGROUND_DARK = palette[0]
self.fg = Gdk.RGBA() self.fg = Gdk.RGBA()
self.bg = Gdk.RGBA() self.bg = Gdk.RGBA()
@ -90,7 +90,7 @@ class VanillaProgress(Gtk.Box):
self.fg.parse(FOREGROUND_DARK) self.fg.parse(FOREGROUND_DARK)
self.bg.parse(BACKGROUND_DARK) self.bg.parse(BACKGROUND_DARK)
self.__terminal.set_colors(self.fg, self.bg, self.colors) self.__terminal.set_colors(self.fg, self.bg, self.colors)
for _, tour in self.__tour.items(): for _, tour in self.__tour.items():
self.carousel_tour.append(VanillaTour(self.__window, tour)) self.carousel_tour.append(VanillaTour(self.__window, tour))
@ -113,11 +113,11 @@ class VanillaProgress(Gtk.Box):
time.sleep(5) time.sleep(5)
RunAsync(run_async, None) RunAsync(run_async, None)
def on_vte_child_exited(self, terminal, status, *args): def on_vte_child_exited(self, terminal, status, *args):
terminal.get_parent().remove(terminal) terminal.get_parent().remove(terminal)
status = not bool(status) status = not bool(status)
if self.__success_fn is not None and status: if self.__success_fn is not None and status:
self.__success_fn(*self.__success_fn_args) self.__success_fn(*self.__success_fn_args)

Loading…
Cancel
Save