forked from openlp/openlp
- Fix for "TextLabel" in translation.
- HEAD
This commit is contained in:
commit
b5dc5bafc0
@ -93,6 +93,7 @@ class Ui_PluginViewDialog(object):
|
|||||||
self.pluginListButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
|
self.pluginListButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
|
||||||
self.pluginListButtonBox.setObjectName(u'pluginListButtonBox')
|
self.pluginListButtonBox.setObjectName(u'pluginListButtonBox')
|
||||||
self.pluginLayout.addWidget(self.pluginListButtonBox)
|
self.pluginLayout.addWidget(self.pluginListButtonBox)
|
||||||
|
self.versionNumberLabel.setText(u'')
|
||||||
|
|
||||||
self.retranslateUi(pluginViewDialog)
|
self.retranslateUi(pluginViewDialog)
|
||||||
QtCore.QObject.connect(self.pluginListButtonBox,
|
QtCore.QObject.connect(self.pluginListButtonBox,
|
||||||
@ -106,8 +107,6 @@ class Ui_PluginViewDialog(object):
|
|||||||
translate('OpenLP.PluginForm', 'Plugin Details'))
|
translate('OpenLP.PluginForm', 'Plugin Details'))
|
||||||
self.versionLabel.setText(
|
self.versionLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'Version:'))
|
translate('OpenLP.PluginForm', 'Version:'))
|
||||||
self.versionNumberLabel.setText(
|
|
||||||
translate('OpenLP.PluginForm', 'TextLabel'))
|
|
||||||
self.aboutLabel.setText(
|
self.aboutLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'About:'))
|
translate('OpenLP.PluginForm', 'About:'))
|
||||||
self.statusLabel.setText(
|
self.statusLabel.setText(
|
||||||
@ -116,3 +115,4 @@ class Ui_PluginViewDialog(object):
|
|||||||
translate('OpenLP.PluginForm', 'Active'))
|
translate('OpenLP.PluginForm', 'Active'))
|
||||||
self.statusComboBox.setItemText(1,
|
self.statusComboBox.setItemText(1,
|
||||||
translate('OpenLP.PluginForm', 'Inactive'))
|
translate('OpenLP.PluginForm', 'Inactive'))
|
||||||
|
|
||||||
|
@ -70,6 +70,8 @@ class VersionThread(QtCore.QThread):
|
|||||||
remote_version[u'release'] = int(match.group(3))
|
remote_version[u'release'] = int(match.group(3))
|
||||||
if len(match.groups()) > 3 and match.group(4):
|
if len(match.groups()) > 3 and match.group(4):
|
||||||
remote_version[u'revision'] = int(match.group(4))
|
remote_version[u'revision'] = int(match.group(4))
|
||||||
|
else:
|
||||||
|
return
|
||||||
match = self.version_splitter.match(self.app_version[u'full'])
|
match = self.version_splitter.match(self.app_version[u'full'])
|
||||||
if match:
|
if match:
|
||||||
local_version[u'major'] = int(match.group(1))
|
local_version[u'major'] = int(match.group(1))
|
||||||
@ -77,6 +79,8 @@ class VersionThread(QtCore.QThread):
|
|||||||
local_version[u'release'] = int(match.group(3))
|
local_version[u'release'] = int(match.group(3))
|
||||||
if len(match.groups()) > 3 and match.group(4):
|
if len(match.groups()) > 3 and match.group(4):
|
||||||
local_version[u'revision'] = int(match.group(4))
|
local_version[u'revision'] = int(match.group(4))
|
||||||
|
else:
|
||||||
|
return
|
||||||
if remote_version[u'major'] > local_version[u'major'] or \
|
if remote_version[u'major'] > local_version[u'major'] or \
|
||||||
remote_version[u'minor'] > local_version[u'minor'] or \
|
remote_version[u'minor'] > local_version[u'minor'] or \
|
||||||
remote_version[u'release'] > local_version[u'release']:
|
remote_version[u'release'] > local_version[u'release']:
|
||||||
@ -147,10 +151,10 @@ class AppLocation(object):
|
|||||||
return plugin_path
|
return plugin_path
|
||||||
elif dir_type == AppLocation.VersionDir:
|
elif dir_type == AppLocation.VersionDir:
|
||||||
if hasattr(sys, u'frozen') and sys.frozen == 1:
|
if hasattr(sys, u'frozen') and sys.frozen == 1:
|
||||||
plugin_path = os.path.abspath(os.path.split(sys.argv[0])[0])
|
version_path = os.path.abspath(os.path.split(sys.argv[0])[0])
|
||||||
else:
|
else:
|
||||||
plugin_path = os.path.split(openlp.__file__)[0]
|
version_path = os.path.split(openlp.__file__)[0]
|
||||||
return plugin_path
|
return version_path
|
||||||
elif dir_type == AppLocation.CacheDir:
|
elif dir_type == AppLocation.CacheDir:
|
||||||
if sys.platform == u'win32':
|
if sys.platform == u'win32':
|
||||||
path = os.path.join(os.getenv(u'APPDATA'), u'openlp')
|
path = os.path.join(os.getenv(u'APPDATA'), u'openlp')
|
||||||
@ -206,11 +210,14 @@ def check_latest_version(current_version):
|
|||||||
else:
|
else:
|
||||||
req = urllib2.Request(u'http://www.openlp.org/files/version.txt')
|
req = urllib2.Request(u'http://www.openlp.org/files/version.txt')
|
||||||
req.add_header(u'User-Agent', u'OpenLP/%s' % current_version[u'full'])
|
req.add_header(u'User-Agent', u'OpenLP/%s' % current_version[u'full'])
|
||||||
|
remote_version = None
|
||||||
try:
|
try:
|
||||||
version_string = unicode(urllib2.urlopen(req, None).read()).strip()
|
remote_version = unicode(urllib2.urlopen(req, None).read()).strip()
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
if hasattr(e, u'reason'):
|
if hasattr(e, u'reason'):
|
||||||
log.exception(u'Reason for failure: %s', e.reason)
|
log.exception(u'Reason for failure: %s', e.reason)
|
||||||
|
if remote_version:
|
||||||
|
version_string = remote_version
|
||||||
return version_string
|
return version_string
|
||||||
|
|
||||||
def add_actions(target, actions):
|
def add_actions(target, actions):
|
||||||
|
@ -641,7 +641,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
'''
|
'''
|
||||||
version = self.parent.manager.get_meta_data(bible, u'Version')
|
version = self.parent.manager.get_meta_data(bible, u'Version')
|
||||||
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
|
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
|
||||||
permission = self.parent.manager.get_meta_data(bible, u'Permissions')
|
#permission = self.parent.manager.get_meta_data(bible, u'Permissions')
|
||||||
if dual_bible:
|
if dual_bible:
|
||||||
dual_version = self.parent.manager.get_meta_data(dual_bible,
|
dual_version = self.parent.manager.get_meta_data(dual_bible,
|
||||||
u'Version')
|
u'Version')
|
||||||
|
@ -88,9 +88,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
item = self.songmanager.get_object(item_class, item_id)
|
item = self.songmanager.get_object(item_class, item_id)
|
||||||
if item and len(item.songs) == 0:
|
if item and len(item.songs) == 0:
|
||||||
if QtGui.QMessageBox.warning(self, dlg_title, del_text,
|
if QtGui.QMessageBox.warning(self, dlg_title, del_text,
|
||||||
QtGui.QMessageBox.StandardButtons(
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.No | QtGui.QMessageBox.Yes)
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
|
||||||
) == QtGui.QMessageBox.Yes:
|
|
||||||
self.songmanager.delete_object(item_class, item.id)
|
self.songmanager.delete_object(item_class, item.id)
|
||||||
reset_func()
|
reset_func()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user