mirror of
https://github.com/Snigdha-OS/snigdhaos-welcome.git
synced 2025-09-21 06:24:56 +02:00
minor update
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
BIN
usr/share/snigdhaos-welcome/images/snigdhaos-welcome.png
Normal file
BIN
usr/share/snigdhaos-welcome/images/snigdhaos-welcome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@@ -1,3 +1,6 @@
|
|||||||
|
# Author: Erik Dubois [Arcolinux]
|
||||||
|
# Adopted for Snigdha OS
|
||||||
|
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -70,10 +73,10 @@ label#label_style_eshan {
|
|||||||
|
|
||||||
class Main(Gtk.Window):
|
class Main(Gtk.Window):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Main, self).__init__(title="Snigdha OS Welcome - Arctic")
|
super(Main, self).__init__(title="Snigdha OS Welcome - [Arctic]")
|
||||||
self.set_border_width(10)
|
self.set_border_width(10)
|
||||||
self.set_default_size(860, 450)
|
self.set_default_size(860, 450)
|
||||||
self.set_icon_from_file(os.path.join(base_dir, "images/snigdhaos-icon.png"))
|
self.set_icon_from_file(os.path.join(base_dir, "images/snigdhaos-welcome.png"))
|
||||||
self.set_position(Gtk.WindowPosition.CENTER)
|
self.set_position(Gtk.WindowPosition.CENTER)
|
||||||
self.results = ""
|
self.results = ""
|
||||||
|
|
||||||
|
@@ -1,83 +1 @@
|
|||||||
def on_buttonatt_clicked(self, widget):
|
snigdhaos-welcome.png
|
||||||
# app_cmd = [
|
|
||||||
# "/usr/bin/archlinux-tweak-tool",
|
|
||||||
# ]
|
|
||||||
# pacman_cmd = [
|
|
||||||
# "pkexec",
|
|
||||||
# "pacman",
|
|
||||||
# "-Sy",
|
|
||||||
# "archlinux-tweak-tool-git",
|
|
||||||
# "--noconfirm",
|
|
||||||
# "--needed",
|
|
||||||
# ]
|
|
||||||
|
|
||||||
# dev_package = "archlinux-tweak-tool-dev-git"
|
|
||||||
|
|
||||||
# if self.check_package_installed(dev_package):
|
|
||||||
# print("[WARN]: %s package found ..removing it" % dev_package)
|
|
||||||
# self.remove_dev_package(
|
|
||||||
# ["pkexec", "pacman", "-Rs", dev_package, "--noconfirm"], dev_package
|
|
||||||
# )
|
|
||||||
|
|
||||||
# if not self.check_package_installed("archlinux-tweak-tool-git"):
|
|
||||||
# if not os.path.exists(self.pacman_lockfile):
|
|
||||||
# md = MessageDialog(
|
|
||||||
# title="Install Package",
|
|
||||||
# message="<b>Arch Linux Tweak Tool</b> is missing, Let Snigdha OS - Welcome install it ?",
|
|
||||||
# )
|
|
||||||
|
|
||||||
# md.show_all()
|
|
||||||
# md.run()
|
|
||||||
# md.destroy()
|
|
||||||
|
|
||||||
# if md.response is True:
|
|
||||||
# threading.Thread(
|
|
||||||
# target=self.check_package_queue, daemon=True
|
|
||||||
# ).start()
|
|
||||||
# threading.Thread(
|
|
||||||
# target=self.install_package,
|
|
||||||
# args=(
|
|
||||||
# app_cmd,
|
|
||||||
# pacman_cmd,
|
|
||||||
# "archlinux-tweak-tool-git",
|
|
||||||
# ),
|
|
||||||
# daemon=True,
|
|
||||||
# ).start()
|
|
||||||
# else:
|
|
||||||
# print(
|
|
||||||
# "[ERROR]: Pacman lockfile found %s, is another pacman process running ?"
|
|
||||||
# % self.pacman_lockfile
|
|
||||||
# )
|
|
||||||
# md = Gtk.MessageDialog(
|
|
||||||
# parent=self,
|
|
||||||
# flags=0,
|
|
||||||
# message_type=Gtk.MessageType.WARNING,
|
|
||||||
# buttons=Gtk.ButtonsType.OK,
|
|
||||||
# text="Pacman lockfile found %s, is another pacman process running ?"
|
|
||||||
# % self.pacman_lockfile,
|
|
||||||
# title="Warning",
|
|
||||||
# )
|
|
||||||
# md.run()
|
|
||||||
# md.destroy()
|
|
||||||
# else:
|
|
||||||
# threading.Thread(target=self.run_app, args=(app_cmd,), daemon=True).start()
|
|
||||||
|
|
||||||
# def check_package_installed(self, package):
|
|
||||||
# pacman_cmd = ["pacman", "-Qi", package]
|
|
||||||
# try:
|
|
||||||
# process = subprocess.run(
|
|
||||||
# pacman_cmd,
|
|
||||||
# shell=False,
|
|
||||||
# stdout=subprocess.PIPE,
|
|
||||||
# stderr=subprocess.STDOUT,
|
|
||||||
# universal_newlines=True,
|
|
||||||
# )
|
|
||||||
|
|
||||||
# if process.returncode == 0:
|
|
||||||
# # package is installed
|
|
||||||
# return True
|
|
||||||
# else:
|
|
||||||
# return False
|
|
||||||
# except subprocess.CalledProcessError as e:
|
|
||||||
# # package is not installed
|
|
||||||
# return False
|
|
@@ -49,7 +49,7 @@ def GUI(self, Gtk, GdkPixbuf):
|
|||||||
headerbar.pack_start(
|
headerbar.pack_start(
|
||||||
Gtk.Image().new_from_pixbuf(
|
Gtk.Image().new_from_pixbuf(
|
||||||
GdkPixbuf.Pixbuf().new_from_file_at_size(
|
GdkPixbuf.Pixbuf().new_from_file_at_size(
|
||||||
os.path.join(base_dir, "images/snigdhaos-icon.png"), 16, 16
|
os.path.join(base_dir, "images/snigdhaos-welcome.png"), 16, 16
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -421,7 +421,7 @@ def GUI(self, Gtk, GdkPixbuf):
|
|||||||
# ======================================================================
|
# ======================================================================
|
||||||
|
|
||||||
pixbuf = GdkPixbuf.Pixbuf().new_from_file_at_size(
|
pixbuf = GdkPixbuf.Pixbuf().new_from_file_at_size(
|
||||||
os.path.join(base_dir, "images/snigdhaos-icon.png"), 164, 164
|
os.path.join(base_dir, "images/snigdhaos-welcome.png"), 300, 300
|
||||||
)
|
)
|
||||||
image = Gtk.Image().new_from_pixbuf(pixbuf)
|
image = Gtk.Image().new_from_pixbuf(pixbuf)
|
||||||
|
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user