Removed Gtk references; widgets
This commit is contained in:
parent
cb8ebcd64b
commit
6d8079b3fe
|
@ -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}')
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
"""
|
||||
Gtk Bound Signal Module
|
||||
Core Module
|
||||
"""
|
|
@ -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())
|
|
@ -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!")
|
|
@ -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):
|
||||
...
|
|
@ -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):
|
||||
...
|
|
@ -49,4 +49,3 @@ class Window(ApplicationWindow):
|
|||
|
||||
def _tear_down(self, widget = None, eve = None):
|
||||
settings_manager.save_settings()
|
||||
Gtk.main_quit()
|
||||
|
|
Loading…
Reference in New Issue