mirror of
https://github.com/Snigdha-OS/snigdhaos-kernel-switcher.git
synced 2025-09-20 12:54:56 +02:00
🔨 refactor(_!applicable): empty construction
This commit is contained in:
@@ -24,7 +24,7 @@ from libs.Kernel import Kernel, InstalledKernel, CommunityKernel
|
||||
from ui.MessageWindow import MessageWindow
|
||||
from queue import Queue
|
||||
import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
gi.require_version("Gtk", "4.0")
|
||||
from gi.repository import GLib
|
||||
|
||||
|
||||
|
0
snigdhaos-kernel-switcher.css
Normal file
0
snigdhaos-kernel-switcher.css
Normal file
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
#!/bin/python
|
||||
import os
|
||||
import libs.functions as fn
|
||||
from ui.ManagerGUI import ManagerGUI
|
||||
import gi
|
||||
gi.require_version("Gtk", "4.0")
|
||||
from gi.repository import Gtk, Gio, GLib, Gdk
|
||||
@@ -20,4 +21,33 @@ class Main(Gtk.Application):
|
||||
super().__init__(application_id=app_id, flags=Gio.ApplicationFlags.FLAGS_NONE)
|
||||
|
||||
def do_activate(self):
|
||||
default_context = GLib.
|
||||
default_context = GLib.MainContext.default()
|
||||
win = self.props.active_window
|
||||
if not win:
|
||||
win = ManagerGUI(application=self, app_name=app_name, default_context=default_context,app_version=app_version)
|
||||
display = Gtk.Widget.get_display(win)
|
||||
win.set_icon_name("snigdhaos-kernel-switcher-tux")
|
||||
provider = Gtk.CssProvider.new()
|
||||
css_file = Gio.file_new_for_path(css_file)
|
||||
Gtk.StyleContext.add_provider_for_display(display, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
|
||||
win.present()
|
||||
|
||||
def do_startup(self):
|
||||
Gtk.Application.do_startup(self)
|
||||
|
||||
def do_shutdown(self):
|
||||
Gtk.Application.do_shutdown(self)
|
||||
if os.path.exists(lock_file):
|
||||
os.remove(lock_file)
|
||||
if os.path.exists(pid_file):
|
||||
os.remove(pid_file)
|
||||
if os.path.exists(progress_lock_file):
|
||||
os.remove(progress_lock_file)
|
||||
|
||||
def snigdhal_handler(sig, frame):
|
||||
Gtk.main_quit(0)
|
||||
|
||||
# if __name__ == "__main__":
|
||||
# try:
|
||||
# except Exception as e:
|
||||
# return False
|
Reference in New Issue
Block a user