moved controller to controllers folder
This commit is contained in:
parent
1876ba3fd0
commit
6ed96c426d
3
src/core/controllers/__init__.py
Normal file
3
src/core/controllers/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
"""
|
||||
Controllers Module
|
||||
"""
|
@ -7,14 +7,14 @@ gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
|
||||
# Application imports
|
||||
from .mixins.signals_mixins import SignalsMixins
|
||||
from .mixins.dummy_mixin import DummyMixin
|
||||
from .controller_data import ControllerData
|
||||
from .containers.base_container import BaseContainer
|
||||
from ..mixins.signals_mixins import SignalsMixins
|
||||
from ..mixins.dummy_mixin import DummyMixin
|
||||
from .base_controller_data import BaseControllerData
|
||||
from ..containers.base_container import BaseContainer
|
||||
|
||||
|
||||
|
||||
class Controller(DummyMixin, SignalsMixins, ControllerData):
|
||||
class BaseController(DummyMixin, SignalsMixins, BaseControllerData):
|
||||
def __init__(self, args, unknownargs):
|
||||
self.setup_controller_data()
|
||||
|
||||
@ -64,4 +64,4 @@ class Controller(DummyMixin, SignalsMixins, ControllerData):
|
||||
settings_manager.set_builder(self.builder)
|
||||
self.base_container = BaseContainer()
|
||||
|
||||
settings_manager.register_signals_to_builder([self, self.base_container])
|
||||
settings_manager.register_signals_to_builder([self, self.base_container])
|
@ -10,8 +10,8 @@ from plugins.plugins_controller import PluginsController
|
||||
|
||||
|
||||
|
||||
class ControllerData:
|
||||
''' ControllerData contains most of the state of the app at ay given time. It also has some support methods. '''
|
||||
class BaseControllerData:
|
||||
''' 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:
|
||||
self.window = settings_manager.get_main_window()
|
||||
@ -80,4 +80,4 @@ class ControllerData:
|
||||
proc = subprocess.Popen(command, stdin = subprocess.PIPE)
|
||||
proc.stdin.write(data.encode(encoding))
|
||||
proc.stdin.close()
|
||||
retcode = proc.wait()
|
||||
retcode = proc.wait()
|
@ -11,7 +11,7 @@ from gi.repository import Gdk
|
||||
from gi.repository import GLib
|
||||
|
||||
# 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():
|
||||
self.set_interactive_debugging(True)
|
||||
|
||||
self._controller = Controller(args, unknownargs)
|
||||
self._controller = BaseController(args, unknownargs)
|
||||
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() )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user