From 6d8079b3fe79e0c83e5440a6f0234b3682796477 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sat, 16 Sep 2023 14:34:24 -0500 Subject: [PATCH] Removed Gtk references; widgets --- src/__main__.py | 4 +-- src/core/__init__.py | 4 +-- src/core/containers/base_container.py | 37 ------------------- src/core/containers/center_container.py | 47 ------------------------- src/core/containers/left_container.py | 35 ------------------ src/core/containers/right_container.py | 35 ------------------ src/core/window.py | 1 - 7 files changed, 4 insertions(+), 159 deletions(-) delete mode 100644 src/core/containers/base_container.py delete mode 100644 src/core/containers/center_container.py delete mode 100644 src/core/containers/left_container.py delete mode 100644 src/core/containers/right_container.py diff --git a/src/__main__.py b/src/__main__.py index 50a809a..6ac33c0 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -16,7 +16,7 @@ from app import Application if __name__ == "__main__": - ''' Set process title, get arguments, and create GTK main thread. ''' + ''' Set process title, get arguments, and create main thread. ''' try: setproctitle(f'{app_name}') @@ -39,4 +39,4 @@ if __name__ == "__main__": Application(args, unknownargs) except Exception as e: traceback.print_exc() - quit() + quit() \ No newline at end of file diff --git a/src/core/__init__.py b/src/core/__init__.py index 90cfadc..f1af95c 100644 --- a/src/core/__init__.py +++ b/src/core/__init__.py @@ -1,3 +1,3 @@ """ - Gtk Bound Signal Module -""" + Core Module +""" \ No newline at end of file diff --git a/src/core/containers/base_container.py b/src/core/containers/base_container.py deleted file mode 100644 index 51989c3..0000000 --- a/src/core/containers/base_container.py +++ /dev/null @@ -1,37 +0,0 @@ -# Python imports - -# Lib imports -import gi -gi.require_version('Gtk', '3.0') -from gi.repository import Gtk - -# Application imports -from .left_container import LeftContainer -from .center_container import CenterContainer -from .right_container import RightContainer - - - -class BaseContainer(Gtk.Box): - def __init__(self): - super(BaseContainer, self).__init__() - - self._setup_styling() - self._setup_signals() - self._load_widgets() - - self.show_all() - - - def _setup_styling(self): - self.set_orientation(Gtk.Orientation.VERTICAL) - ctx = self.get_style_context() - ctx.add_class("base-container") - - def _setup_signals(self): - ... - - def _load_widgets(self): - self.add(LeftContainer()) - self.add(CenterContainer()) - self.add(RightContainer()) diff --git a/src/core/containers/center_container.py b/src/core/containers/center_container.py deleted file mode 100644 index cd2cc0f..0000000 --- a/src/core/containers/center_container.py +++ /dev/null @@ -1,47 +0,0 @@ -# Python imports - -# Lib imports -import gi -gi.require_version('Gtk', '3.0') -from gi.repository import Gtk - -# Application imports - - - -class CenterContainer(Gtk.Box): - def __init__(self): - super(CenterContainer, self).__init__() - - self._builder = settings_manager.get_builder() - - self._setup_styling() - self._setup_signals() - self._subscribe_to_events() - self._load_widgets() - - - def _setup_styling(self): - self.set_orientation(Gtk.Orientation.VERTICAL) - ctx = self.get_style_context() - ctx.add_class("center-container") - - def _setup_signals(self): - ... - - def _subscribe_to_events(self): - # event_system.subscribe("handle_file_from_ipc", self.handle_file_from_ipc) - ... - - def _load_widgets(self): - glade_box = self._builder.get_object("glade_box") - button = Gtk.Button(label="Click Me!") - - button.connect("clicked", self._hello_world) - - self.add(button) - self.add(glade_box) - - - def _hello_world(self, widget=None, eve=None): - logger.debug("Hello, World!") diff --git a/src/core/containers/left_container.py b/src/core/containers/left_container.py deleted file mode 100644 index 77cd490..0000000 --- a/src/core/containers/left_container.py +++ /dev/null @@ -1,35 +0,0 @@ -# Python imports - -# Lib imports -import gi -gi.require_version('Gtk', '3.0') -from gi.repository import Gtk - -# Application imports - - - -class LeftContainer(Gtk.Box): - def __init__(self): - super(LeftContainer, self).__init__() - - self._setup_styling() - self._setup_signals() - self._subscribe_to_events() - self._load_widgets() - - - def _setup_styling(self): - self.set_orientation(Gtk.Orientation.VERTICAL) - ctx = self.get_style_context() - ctx.add_class("left-container") - - def _setup_signals(self): - ... - - def _subscribe_to_events(self): - # event_system.subscribe("handle_file_from_ipc", self.handle_file_from_ipc) - ... - - def _load_widgets(self): - ... diff --git a/src/core/containers/right_container.py b/src/core/containers/right_container.py deleted file mode 100644 index f0ac75d..0000000 --- a/src/core/containers/right_container.py +++ /dev/null @@ -1,35 +0,0 @@ -# Python imports - -# Lib imports -import gi -gi.require_version('Gtk', '3.0') -from gi.repository import Gtk - -# Application imports - - - -class RightContainer(Gtk.Box): - def __init__(self): - super(RightContainer, self).__init__() - - self._setup_styling() - self._setup_signals() - self._subscribe_to_events() - self._load_widgets() - - - def _setup_styling(self): - self.set_orientation(Gtk.Orientation.VERTICAL) - ctx = self.get_style_context() - ctx.add_class("right-container") - - def _setup_signals(self): - ... - - def _subscribe_to_events(self): - # event_system.subscribe("handle_file_from_ipc", self.handle_file_from_ipc) - ... - - def _load_widgets(self): - ... diff --git a/src/core/window.py b/src/core/window.py index ca5828a..64dc291 100644 --- a/src/core/window.py +++ b/src/core/window.py @@ -49,4 +49,3 @@ class Window(ApplicationWindow): def _tear_down(self, widget = None, eve = None): settings_manager.save_settings() - Gtk.main_quit()