44 lines
902 B
Python
44 lines
902 B
Python
# Python imports
|
|
|
|
# Lib imports
|
|
import gi
|
|
gi.require_version('Gtk', '3.0')
|
|
from gi.repository import Gtk
|
|
|
|
# Application imports
|
|
|
|
|
|
|
|
class ImageList(Gtk.Box):
|
|
def __init__(self):
|
|
super(ImageList, self).__init__()
|
|
|
|
self.path = None
|
|
self.img_list = None
|
|
|
|
self._setup_styling()
|
|
self._setup_signals()
|
|
self._subscribe_to_events()
|
|
self._load_widgets()
|
|
|
|
|
|
def _setup_styling(self):
|
|
...
|
|
|
|
def _setup_signals(self):
|
|
...
|
|
|
|
def _subscribe_to_events(self):
|
|
event_system.subscribe("load_image_list", self.load_image_list)
|
|
|
|
def _load_widgets(self):
|
|
...
|
|
|
|
def load_image_list(self, path = None, img_list = []):
|
|
if not path or len(img_list) == 0:
|
|
return
|
|
|
|
logger.debug(f"Loading images from: {path}\nList: {img_list}")
|
|
self.path = path
|
|
self.img_list = img_list
|