added debug signal caller, updated some prints to logger, added settings option for min win size
This commit is contained in:
@@ -9,7 +9,6 @@ from gi.repository import Gtk
|
||||
|
||||
|
||||
|
||||
|
||||
class BaseContainer(Gtk.Box):
|
||||
def __init__(self):
|
||||
super(BaseContainer, self).__init__()
|
||||
@@ -41,4 +40,4 @@ class BaseContainer(Gtk.Box):
|
||||
|
||||
|
||||
def _hello_world(self, widget=None, eve=None):
|
||||
print("Hello, World!")
|
||||
logger.debug("Hello, World!")
|
||||
|
@@ -56,7 +56,7 @@ class Controller(DummyMixin, SignalsMixins, ControllerData):
|
||||
event_system.subscribe("tggl_top_main_menubar", self._tggl_top_main_menubar)
|
||||
|
||||
def _tggl_top_main_menubar(self):
|
||||
print("_tggl_top_main_menubar > stub...")
|
||||
logger.debug("_tggl_top_main_menubar > stub...")
|
||||
|
||||
def setup_builder_and_container(self):
|
||||
self.builder = Gtk.Builder()
|
||||
|
@@ -6,9 +6,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
class DummyMixin:
|
||||
""" DummyMixin is an example of how mixins are used and structured in a project. """
|
||||
|
||||
def print_hello_world(self) -> None:
|
||||
print("Hello, World!")
|
||||
logger.debug("Hello, World!")
|
||||
|
@@ -11,10 +11,10 @@ class IPCSignalsMixin:
|
||||
""" IPCSignalsMixin handle messages from another starting solarfm process. """
|
||||
|
||||
def print_to_console(self, message=None):
|
||||
print(message)
|
||||
logger.debug(message)
|
||||
|
||||
def handle_file_from_ipc(self, path: str) -> None:
|
||||
print(f"File From IPC: {path}")
|
||||
logger.debug(f"File From IPC: {path}")
|
||||
|
||||
def handle_dir_from_ipc(self, path: str) -> None:
|
||||
print(f"Dir From IPC: {path}")
|
||||
logger.debug(f"Dir From IPC: {path}")
|
@@ -39,6 +39,9 @@ class Window(Gtk.ApplicationWindow):
|
||||
|
||||
self.show()
|
||||
|
||||
# NOTE: Need to set size after show b/c get_allocation methods are initially incorrect if done beforehand...
|
||||
self._set_size_constraints()
|
||||
|
||||
|
||||
def _setup_styling(self):
|
||||
self.set_default_size(settings.get_main_window_width(),
|
||||
@@ -66,6 +69,12 @@ class Window(Gtk.ApplicationWindow):
|
||||
|
||||
self.add( self._controller.get_base_container() )
|
||||
|
||||
def _set_size_constraints(self):
|
||||
self.set_default_size(settings.get_main_window_width(),
|
||||
settings.get_main_window_height())
|
||||
self.set_size_request(settings.get_main_window_min_width(),
|
||||
settings.get_main_window_min_height())
|
||||
|
||||
def _set_window_data(self) -> None:
|
||||
screen = self.get_screen()
|
||||
visual = screen.get_rgba_visual()
|
||||
|
Reference in New Issue
Block a user