openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05834
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/47179
Fix Windows AppLocation (Bug #706396)
Cleanups
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/47179
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/utils/__init__.py'
--- openlp/core/utils/__init__.py 2011-01-22 11:33:56 +0000
+++ openlp/core/utils/__init__.py 2011-01-23 00:57:55 +0000
@@ -137,10 +137,7 @@
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 @@
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 @@
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):
"""
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2011-01-09 00:27:46 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2011-01-23 00:57:55 +0000
@@ -45,15 +45,14 @@
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):
=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py 2011-01-06 20:48:22 +0000
+++ openlp/plugins/alerts/forms/alertform.py 2011-01-23 00:57:55 +0000
@@ -35,7 +35,7 @@
"""
Provide UI for the alert system
"""
- def __init__(self, plugin, visible_title):
+ def __init__(self, plugin):
"""
Initialise the alert form
"""
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2011-01-21 22:28:34 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2011-01-23 00:57:55 +0000
@@ -171,11 +171,11 @@
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()
Follow ups