From 15bf9420aeff2130597b5aee1e9414e8f01bfa4b Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 5 Jun 2016 22:28:35 +0100 Subject: [PATCH] Rename Controller --- openlp/core/lib/api/__init__.py | 2 +- openlp/core/lib/api/remotecontroller.py | 57 ------------------------- openlp/core/ui/mainwindow.py | 4 +- 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 openlp/core/lib/api/remotecontroller.py diff --git a/openlp/core/lib/api/__init__.py b/openlp/core/lib/api/__init__.py index 1d81ba0a0..f0d18be56 100644 --- a/openlp/core/lib/api/__init__.py +++ b/openlp/core/lib/api/__init__.py @@ -23,6 +23,6 @@ from .poll import OpenLPPoll from .wsserver import OpenWSServer from .httpserver import OpenLPHttpServer -from .remotecontroller import RemoteController +from .apicontroller import ApiController __all__ = ['OpenLPPoll', 'RemoteController', 'OpenLPHttpServer'] diff --git a/openlp/core/lib/api/remotecontroller.py b/openlp/core/lib/api/remotecontroller.py deleted file mode 100644 index d6a94f351..000000000 --- a/openlp/core/lib/api/remotecontroller.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 - -############################################################################### -# OpenLP - Open Source Lyrics Projection # -# --------------------------------------------------------------------------- # -# Copyright (c) 2008-2016 OpenLP Developers # -# --------------------------------------------------------------------------- # -# This program is free software; you can redistribute it and/or modify it # -# under the terms of the GNU General Public License as published by the Free # -# Software Foundation; version 2 of the License. # -# # -# This program is distributed in the hope that it will be useful, but WITHOUT # -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # -# more details. # -# # -# You should have received a copy of the GNU General Public License along # -# with this program; if not, write to the Free Software Foundation, Inc., 59 # -# Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### -import logging - -from openlp.core.common import OpenLPMixin, Registry, RegistryMixin, RegistryProperties -from openlp.core.lib.api import OpenWSServer, OpenLPPoll, OpenLPHttpServer - -log = logging.getLogger(__name__) - - -class RemoteController(RegistryMixin, OpenLPMixin, RegistryProperties): - """ - The implementation of the Media Controller. The Media Controller adds an own class for every Player. - Currently these are QtWebkit, Phonon and Vlc. display_controllers are an array of controllers keyed on the - slidecontroller or plugin which built them. - - ControllerType is the class containing the key values. - - media_players are an array of media players keyed on player name. - - current_media_players is an array of player instances keyed on ControllerType. - - """ - def __init__(self, parent=None): - """ - Constructor - """ - super(RemoteController, self).__init__(parent) - # Registry().register_function('playbackPlay', self.media_play_msg) - - def bootstrap_post_set_up(self): - """ - process the bootstrap post setup request - """ - self.poll = OpenLPPoll() - Registry().register('OpenLPPoll', self.poll) - self.wsserver = OpenWSServer() - self.httpserver = OpenLPHttpServer() diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index e96f777fd..a531a0469 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -40,7 +40,7 @@ from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.versionchecker import get_application_version from openlp.core.lib import Renderer, PluginManager, ImageManager, PluginStatus, ScreenList, build_icon from openlp.core.lib.ui import UiStrings, create_action -from openlp.core.lib.api import RemoteController +from openlp.core.lib.api import ApiController from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, LiveController, PluginForm, \ ShortcutListForm, FormattingTagForm, PreviewController from openlp.core.ui.firsttimeform import FirstTimeForm @@ -529,7 +529,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties): Settings().set_up_default_values() self.about_form = AboutForm(self) MediaController() - RemoteController() + ApiController() SettingsForm(self) self.formatting_tag_form = FormattingTagForm(self) self.shortcut_form = ShortcutListForm(self)