From 0c70f83b24454a712dc7680be3d914d1d1f5943c Mon Sep 17 00:00:00 2001 From: arcolinuxz Date: Thu, 11 May 2023 17:58:48 +0200 Subject: [PATCH] up to date ? --- .../arcolinux_application_glade.py | 82 ++- usr/share/arcolinux-app-glade/gGui.ui | 28 +- usr/share/arcolinux-app-glade/gGui.ui~ | 619 ++++++++++++++++++ 3 files changed, 666 insertions(+), 63 deletions(-) create mode 100644 usr/share/arcolinux-app-glade/gGui.ui~ diff --git a/usr/share/arcolinux-app-glade/arcolinux_application_glade.py b/usr/share/arcolinux-app-glade/arcolinux_application_glade.py index 73fb509..f2c7b55 100755 --- a/usr/share/arcolinux-app-glade/arcolinux_application_glade.py +++ b/usr/share/arcolinux-app-glade/arcolinux_application_glade.py @@ -38,11 +38,20 @@ class Main: def __init__(self): # Setup intialization for logging and Gui + self.splash() self.setup_logging() self.back_ups() self.versioning() self.setup_gui() + def splash(self): + # splash screen + splScr = splash.splashScreen() + while Gtk.events_pending(): + Gtk.main_iteration() + sleep(1) + splScr.destroy() + def setup_logging(self): # defining handlers for terminal and log file self.handlers = [ @@ -120,9 +129,6 @@ def versioning(self): ) def setup_gui(self): - self.hold_alacritty = False - self.packagesp = "" - # self.packages_path = self.timeout_id = None # https://python-gtk-3-tutorial.readthedocs.io/en/latest/builder.html @@ -130,13 +136,6 @@ def setup_gui(self): self.builder = Gtk.Builder() self.builder.add_from_file(GUI_UI_FILE) - # splash screen - splScr = splash.splashScreen() - while Gtk.events_pending(): - Gtk.main_iteration() - sleep(1) - splScr.destroy() - logging.info("Connecting the glad signals") self.builder.connect_signals(self) @@ -159,13 +158,12 @@ def on_close_clicked(self, widget): ############################################################################ def on_iso_choices_changed(self, widget): - text = widget.get_active_text() - self.choice = text + self.choice = widget.get_active_text() + logging.info("You selected = " + self.choice) def on_hold_toggled(self, widget): - enabled_hold = widget.get_active() - self.hold_alacritty = enabled_hold - if enabled_hold: + self.enabled_hold = widget.get_active() + if self.enabled_hold: logging.info("--hold for Alacritty is on") else: logging.info("--hold for Alacritty is off") @@ -253,7 +251,7 @@ def on_create_arco_clicked(self, widget): logging.info("Launching the building script") - if self.hold_alacritty: + if self.enabled_hold: critty = "alacritty --hold -e" logging.info("Using the hold option") else: @@ -494,36 +492,37 @@ def on_pacman_reset_cached_clicked(self, widget): False, ) - def on_find_path(self, widget): - dialog = Gtk.FileChooserDialog( - title="Please choose a file", - action=Gtk.FileChooserAction.OPEN, - ) - filter = Gtk.FileFilter() - filter.set_name("Text files") - dialog.set_current_folder(fn.home) - dialog.add_buttons( - Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, "Open", Gtk.ResponseType.OK - ) - dialog.connect("response", self.open_response_cb) - - dialog.show() - - def open_response_cb(self, dialog, response): - if response == Gtk.ResponseType.OK: - self.packages_path.set_text(dialog.get_filename()) - self.packagesp = self.packages_path.set_text(dialog.get_filename()) - dialog.destroy() - elif response == Gtk.ResponseType.CANCEL: - dialog.destroy() + # def on_find_path(self, widget): + # dialog = Gtk.FileChooserDialog( + # title="Please choose a file", + # action=Gtk.FileChooserAction.OPEN, + # ) + # filter = Gtk.FileFilter() + # filter.set_name("Text files") + # dialog.set_current_folder(fn.home) + # dialog.add_buttons( + # Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, "Open", Gtk.ResponseType.OK + # ) + # dialog.connect("response", self.open_response_cb) + + # dialog.show() + + # def open_response_cb(self, dialog, response): + # if response == Gtk.ResponseType.OK: + # self.packages_path.set_text(dialog.get_filename()) + # self.packagesp = self.packages_path.set_text(dialog.get_filename()) + # dialog.destroy() + # elif response == Gtk.ResponseType.CANCEL: + # dialog.destroy() def on_pacman_install_packages(self, widget): - path = self.packagesp - if len(path) > 1 and not path == "Choose a file first": + filechooserbutton = self.builder.get_object("install_path") + path = filechooserbutton.get_filename() + if len(path) > 1: logging.info("Installing packages from selected file") logging.info("You selected this file") logging.info("File: " + path) - fn.install_packages_path(self, self.packages_path.get_text()) + fn.install_packages_path(self, path) GLib.idle_add( fn.show_in_app_notification, self, @@ -532,7 +531,6 @@ def on_pacman_install_packages(self, widget): ) else: logging.info("First select a file") - # self.packagesp("Choose a file first") if __name__ == "__main__": diff --git a/usr/share/arcolinux-app-glade/gGui.ui b/usr/share/arcolinux-app-glade/gGui.ui index b08c2f5..db5e9ef 100644 --- a/usr/share/arcolinux-app-glade/gGui.ui +++ b/usr/share/arcolinux-app-glade/gGui.ui @@ -436,6 +436,7 @@ 100 True False + 364 Install packages from file: @@ -445,21 +446,7 @@ - - packages_path - 165 - True - True - 42 - - - False - True - 1 - - - - + Install 100 30 @@ -476,17 +463,16 @@ - - ... + True - True - True - + False + False True - 3 + end + 4 diff --git a/usr/share/arcolinux-app-glade/gGui.ui~ b/usr/share/arcolinux-app-glade/gGui.ui~ new file mode 100644 index 0000000..356714b --- /dev/null +++ b/usr/share/arcolinux-app-glade/gGui.ui~ @@ -0,0 +1,619 @@ + + + + + + False + False + center + center + + + True + False + + + 770 + 450 + True + False + False + False + slide-down + + + True + False + + + 100 + True + False + 10 + + + 100 + True + False + Create your personal ArcoLinux iso: + + + False + True + 0 + + + + + 240 + 30 + True + False + 0 + False + + arcolinuxl + arcolinuxd + arcolinuxs + arcolinuxs-lts + arcolinuxs-zen + arcolinuxs-xanmod + arcolinuxb-awesome + arcolinuxb-berry + arcolinuxb-bspwm + arcolinuxb-budgie + arcolinuxb-chadwm + arcolinuxb-cinnamon + arcolinuxb-cutefish + arcolinuxb-cwm + arcolinuxb-deepin + arcolinuxb-dusk + arcolinuxb-dwm + arcolinuxb-fvwm3 + arcolinuxb-gnome + arcolinuxb-herbstluftw + arcolinuxb-hyprland + arcolinuxb-i3 + arcolinuxb-icewm + arcolinuxb-jwm + arcolinuxb-leftwm + arcolinuxb-lxqt + arcolinuxb-mate + arcolinuxb-openbox + arcolinuxb-pantheon + arcolinuxb-plasma + arcolinuxb-qtile + arcolinuxb-spectrwm + arcolinuxb-sway + arcolinuxb-ukui + arcolinuxb-wmderland + arcolinuxb-worm + arcolinuxb-xfce + arcolinuxb-xmonad + arcolinuxb-xtended + + + + + False + True + 1 + + + + + Create + 100 + 30 + True + True + True + + + + False + False + end + 3 + + + + + --hold + 25 + True + True + False + 38 + True + + + + False + True + 4 + + + + + 30 + + + + + 100 + True + False + 10 + + + 100 + True + False + 365 + Create your personal ArchLinux iso: + + + False + True + 1 + + + + + Create + 100 + 30 + True + True + True + + + + False + False + end + 3 + + + + + 90 + + + + + building + Building + + + + + True + False + + + 100 + True + False + 10 + + + 100 + True + False + 370 + Clean the pacman cache: + + + False + True + 1 + + + + + Clean + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + + + 100 + True + False + 10 + + + True + False + 482 + Fix keys: + + + False + True + 1 + + + + + Fix + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + 40 + + + + + 100 + True + False + 10 + + + 100 + True + False + 418 + Best Arch Servers: + + + False + True + 1 + + + + + Apply best servers + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + 80 + + + + + 100 + True + False + 10 + + + 100 + True + False + 289 + Install ArcoLinux Keys and Mirrorlist: + + + False + True + 0 + + + + + Install + True + True + True + + + + False + True + 1 + + + + + Remove + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + 120 + + + + + 100 + True + False + 10 + + + 100 + True + False + 342 + Reset your /etc/pacman.conf: + + + False + True + 0 + + + + + Cached + True + True + True + + + + False + True + 1 + + + + + From local file + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + 160 + + + + + 100 + True + False + 10 + + + 100 + True + False + 364 + Install packages from file: + + + False + True + 0 + + + + + Install + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + True + False + + + + False + True + end + 4 + + + + + 200 + + + + + installing + Installing + 1 + + + + + True + False + + + 100 + True + False + 10 + + + True + False + 303 + Get the ArcoLinux nemesis scripts: + + + False + True + 1 + + + + + Install them + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + + + 100 + True + False + 10 + + + True + False + 410 + Provide probe link: + + + False + True + 1 + + + + + Get probe link + 100 + 30 + True + True + True + + + + False + False + end + 2 + + + + + 40 + + + + + scripting + Scripting + 2 + + + + + 30 + 90 + + + + + 404 + 28 + True + False + True + stack1 + + + 202 + 22 + + + + + + + True + False + ArcoLinux Application Glade + ArcoLinux + True + + + True + False + icons/arcolinux-32x32.png + + + + + +