moved controller to controllers folder
This commit is contained in:
parent
1876ba3fd0
commit
6ed96c426d
|
@ -0,0 +1,3 @@
|
||||||
|
"""
|
||||||
|
Controllers Module
|
||||||
|
"""
|
|
@ -7,14 +7,14 @@ gi.require_version('Gtk', '3.0')
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
from .mixins.signals_mixins import SignalsMixins
|
from ..mixins.signals_mixins import SignalsMixins
|
||||||
from .mixins.dummy_mixin import DummyMixin
|
from ..mixins.dummy_mixin import DummyMixin
|
||||||
from .controller_data import ControllerData
|
from .base_controller_data import BaseControllerData
|
||||||
from .containers.base_container import BaseContainer
|
from ..containers.base_container import BaseContainer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Controller(DummyMixin, SignalsMixins, ControllerData):
|
class BaseController(DummyMixin, SignalsMixins, BaseControllerData):
|
||||||
def __init__(self, args, unknownargs):
|
def __init__(self, args, unknownargs):
|
||||||
self.setup_controller_data()
|
self.setup_controller_data()
|
||||||
|
|
|
@ -10,8 +10,8 @@ from plugins.plugins_controller import PluginsController
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ControllerData:
|
class BaseControllerData:
|
||||||
''' ControllerData contains most of the state of the app at ay given time. It also has some support methods. '''
|
''' BaseControllerData contains most of the state of the app at ay given time. It also has some support methods. '''
|
||||||
|
|
||||||
def setup_controller_data(self) -> None:
|
def setup_controller_data(self) -> None:
|
||||||
self.window = settings_manager.get_main_window()
|
self.window = settings_manager.get_main_window()
|
|
@ -11,7 +11,7 @@ from gi.repository import Gdk
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
from core.controller import Controller
|
from core.controllers.base_controller import BaseController
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,9 +61,9 @@ class Window(Gtk.ApplicationWindow):
|
||||||
if settings_manager.is_debug():
|
if settings_manager.is_debug():
|
||||||
self.set_interactive_debugging(True)
|
self.set_interactive_debugging(True)
|
||||||
|
|
||||||
self._controller = Controller(args, unknownargs)
|
self._controller = BaseController(args, unknownargs)
|
||||||
if not self._controller:
|
if not self._controller:
|
||||||
raise ControllerStartException("Controller exited and doesn't exist...")
|
raise ControllerStartException("BaseController exited and doesn't exist...")
|
||||||
|
|
||||||
self.add( self._controller.get_base_container() )
|
self.add( self._controller.get_base_container() )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue