Added legacy attempt to make my Newton text editor; updated Chronos Browser settings file

This commit is contained in:
2026-03-21 15:00:06 -05:00
parent 93cde0000d
commit ae9ef4b167
9 changed files with 456 additions and 1 deletions

View File

@@ -0,0 +1,49 @@
#!/usr/bin/python3
# Gtk imports
import gi, faulthandler, signal
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GLib
# Python imports
import inspect
from setproctitle import setproctitle
# Application imports
from utils.settings import Settings
from signal_classes.controller import Controller
class Main:
def __init__(self):
setproctitle('Media Downloader')
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, Gtk.main_quit)
faulthandler.enable() # For better debug info
settings = Settings()
builder = settings.returnBuilder()
# Gets the methods from the classes and sets to handler.
# Then, builder connects to any signals it needs.
classes = [Controller(settings)]
handlers = {}
for c in classes:
methods = inspect.getmembers(c, predicate=inspect.ismethod)
handlers.update(methods)
builder.connect_signals(handlers)
window = settings.createWindow()
window.show()
if __name__ == "__main__":
try:
main = Main()
Gtk.main()
except Exception as e:
print(e)