2022-10-14 01:58:44 +00:00
|
|
|
# Python imports
|
|
|
|
|
2023-01-29 06:06:52 +00:00
|
|
|
# Lib imports
|
2022-10-14 01:58:44 +00:00
|
|
|
import gi
|
|
|
|
gi.require_version('Gtk', '3.0')
|
|
|
|
from gi.repository import Gtk
|
|
|
|
|
|
|
|
# Application imports
|
|
|
|
|
|
|
|
|
2023-01-29 06:06:52 +00:00
|
|
|
|
2023-04-23 15:57:12 +00:00
|
|
|
class BaseContainer(Gtk.Box):
|
2022-10-14 01:58:44 +00:00
|
|
|
def __init__(self):
|
2023-04-23 15:57:12 +00:00
|
|
|
super(BaseContainer, self).__init__()
|
2022-10-14 01:58:44 +00:00
|
|
|
|
2023-02-24 00:48:37 +00:00
|
|
|
self._builder = settings.get_builder()
|
|
|
|
|
2022-10-14 01:58:44 +00:00
|
|
|
self._setup_styling()
|
|
|
|
self._setup_signals()
|
|
|
|
self._load_widgets()
|
|
|
|
|
|
|
|
self.show_all()
|
|
|
|
|
|
|
|
|
|
|
|
def _setup_styling(self):
|
2023-04-28 04:27:53 +00:00
|
|
|
self.set_orientation(Gtk.Orientation.VERTICAL)
|
2022-10-14 01:58:44 +00:00
|
|
|
|
|
|
|
def _setup_signals(self):
|
|
|
|
...
|
|
|
|
|
|
|
|
def _load_widgets(self):
|
2023-02-24 00:48:37 +00:00
|
|
|
glade_box = self._builder.get_object("glade_box")
|
|
|
|
button = Gtk.Button(label="Click Me!")
|
|
|
|
|
2022-10-14 01:58:44 +00:00
|
|
|
button.connect("clicked", self._hello_world)
|
|
|
|
|
|
|
|
self.add(button)
|
2023-02-24 00:48:37 +00:00
|
|
|
self.add(glade_box)
|
|
|
|
|
|
|
|
|
2022-10-14 01:58:44 +00:00
|
|
|
|
|
|
|
def _hello_world(self, widget=None, eve=None):
|
2023-04-29 14:27:21 +00:00
|
|
|
logger.debug("Hello, World!")
|