diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 9dd133852..37cbd7a63 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -137,10 +137,7 @@ class AppLocation(object): os.path.split(openlp.__file__)[0]) return os.path.join(app_path, u'i18n') else: - return _get_os_dir_path(u'openlp', - os.path.join(os.getenv(u'HOME'), u'Library', - u'Application Support', u'openlp'), - None, os.path.join(os.getenv(u'HOME'), u'.openlp'), dir_type) + return _get_os_dir_path(dir_type) @staticmethod def get_data_path(): @@ -163,17 +160,18 @@ class AppLocation(object): os.makedirs(path) return path -def _get_os_dir_path(win_option, darwin_option, base_dir_option, - non_base_dir_option, dir_type=1): +def _get_os_dir_path(dir_type): """ Return a path based on which OS and environment we are running in. """ if sys.platform == u'win32': - return os.path.join(os.getenv(u'APPDATA'), win_option) + return os.path.join(os.getenv(u'APPDATA'), u'openlp') elif sys.platform == u'darwin': if dir_type == AppLocation.DataDir: - return os.path.join(darwin_option, u'Data') - return darwin_option + return os.path.join(os.getenv(u'HOME'), u'Library', + u'Application Support', u'openlp', u'Data') + return os.path.join(os.getenv(u'HOME'), u'Library', + u'Application Support', u'openlp') else: if XDG_BASE_AVAILABLE: if dir_type == AppLocation.ConfigDir: @@ -183,7 +181,7 @@ def _get_os_dir_path(win_option, darwin_option, base_dir_option, elif dir_type == AppLocation.CacheDir: return os.path.join(BaseDirectory.xdg_cache_home, u'openlp') else: - return non_base_dir_option + return os.path.join(os.getenv(u'HOME'), u'.openlp') def _get_frozen_path(frozen_option, non_frozen_option): """ diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index 61be922d5..443ec1e84 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -45,15 +45,14 @@ class AlertsPlugin(Plugin): self.icon = build_icon(u':/plugins/plugin_alerts.png') self.alertsmanager = AlertsManager(self) self.manager = Manager(u'alerts', init_schema) - visible_name = self.getString(StringContent.VisibleName) - self.alertForm = AlertForm(self, visible_name[u'title']) + self.visible_name = self.getString(StringContent.VisibleName) + self.alertForm = AlertForm(self) def getSettingsTab(self): """ Return the settings tab for the Alerts plugin """ - visible_name = self.getString(StringContent.VisibleName) - self.alertsTab = AlertsTab(self, visible_name[u'title']) + self.alertsTab = AlertsTab(self, self.visible_name[u'title']) return self.alertsTab def addToolsMenuItem(self, tools_menu): diff --git a/openlp/plugins/alerts/forms/alertform.py b/openlp/plugins/alerts/forms/alertform.py index 1d6a566fd..f1a0f7fea 100644 --- a/openlp/plugins/alerts/forms/alertform.py +++ b/openlp/plugins/alerts/forms/alertform.py @@ -35,7 +35,7 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog): """ Provide UI for the alert system """ - def __init__(self, plugin, visible_title): + def __init__(self, plugin): """ Initialise the alert form """ diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index 6ca67c2ae..f12d36dc8 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -171,11 +171,11 @@ class ImpressController(PresentationController): desktop = self.get_com_desktop() #Sometimes we get a failure and desktop is None if not desktop: - log.exception(u'Failed to terminate OpenOffice') + log.exception(u'Failed to find an OpenOffice desktop to terminate') return docs = desktop.getComponents() if docs.hasElements(): - log.debug(u'OpenOffice not terminated') + log.debug(u'OpenOffice not terminated as docs are still open') else: try: desktop.terminate()