mirror of
https://github.com/Snigdha-OS/snigdhaos-kernel-switcher.git
synced 2025-09-20 21:04:55 +02:00
perf(function): extend functionalities
This commit is contained in:
1707
functions.py
1707
functions.py
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,14 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import gi
|
|
||||||
import signal
|
|
||||||
import functions as fn
|
import functions as fn
|
||||||
|
from ui import ManagerGUI
|
||||||
from ui.ManagerGUI import ManagerGUI
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "4.0")
|
gi.require_version("Gtk", "4.0")
|
||||||
|
from gi.repository import Gtk, Gio, GLib
|
||||||
from gi.repository import Gtk, Gio, GLib, Gdk
|
|
||||||
|
|
||||||
base_dir = fn.os.path.dirname(fn.os.path.realpath(__file__))
|
base_dir = fn.os.path.dirname(fn.os.path.realpath(__file__))
|
||||||
|
|
||||||
|
|
||||||
app_name = "Snigdha OS Kernel Manager"
|
app_name = "Snigdha OS Kernel Manager"
|
||||||
app_version = "${app_version}"
|
app_version = "${app_version}"
|
||||||
app_name_dir = "snigdhaos-kernel-manager"
|
app_name_dir = "snigdhaos-kernel-manager"
|
||||||
@@ -28,9 +23,7 @@ class Main(Gtk.Application):
|
|||||||
|
|
||||||
def do_activate(self):
|
def do_activate(self):
|
||||||
default_context = GLib.MainContext.default()
|
default_context = GLib.MainContext.default()
|
||||||
|
|
||||||
win = self.props.active_window
|
win = self.props.active_window
|
||||||
|
|
||||||
if not win:
|
if not win:
|
||||||
win = ManagerGUI(
|
win = ManagerGUI(
|
||||||
application=self,
|
application=self,
|
||||||
@@ -49,7 +42,6 @@ class Main(Gtk.Application):
|
|||||||
Gtk.StyleContext.add_provider_for_display(
|
Gtk.StyleContext.add_provider_for_display(
|
||||||
display, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
display, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
||||||
)
|
)
|
||||||
|
|
||||||
win.present()
|
win.present()
|
||||||
|
|
||||||
def do_startup(self):
|
def do_startup(self):
|
||||||
|
@@ -8,7 +8,7 @@ from ui.AboutDialog import AboutDialog
|
|||||||
from ui.SplashScreen import SplashScreen
|
from ui.SplashScreen import SplashScreen
|
||||||
from ui.MessageWindow import MessageWindow
|
from ui.MessageWindow import MessageWindow
|
||||||
from ui.SettingsWindow import SettingsWindow
|
from ui.SettingsWindow import SettingsWindow
|
||||||
import libs.functions as fn
|
import functions as fn
|
||||||
|
|
||||||
gi.require_version("Gtk", "4.0")
|
gi.require_version("Gtk", "4.0")
|
||||||
from gi.repository import Gtk, Gio, Gdk, GLib
|
from gi.repository import Gtk, Gio, Gdk, GLib
|
||||||
|
Reference in New Issue
Block a user