forked from openlp/openlp
Head
This commit is contained in:
commit
43f4b30d02
@ -283,7 +283,19 @@ class Ui_MainWindow(object):
|
|||||||
self.helpAboutItem = shortcut_action(mainWindow, u'helpAboutItem',
|
self.helpAboutItem = shortcut_action(mainWindow, u'helpAboutItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked,
|
[QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked,
|
||||||
u':/system/system_about.png', category=UiStrings().Help)
|
u':/system/system_about.png', category=UiStrings().Help)
|
||||||
self.helpOnlineHelpItem = shortcut_action(
|
if os.name == u'nt':
|
||||||
|
self.localHelpFile = os.path.join(
|
||||||
|
AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')
|
||||||
|
self.helpLocalHelpItem = shortcut_action(
|
||||||
|
mainWindow, u'helpLocalHelpItem', [QtGui.QKeySequence(u'F1')],
|
||||||
|
self.onHelpLocalHelpClicked, u':/system/system_about.png',
|
||||||
|
category=UiStrings().Help)
|
||||||
|
self.helpOnlineHelpItem = shortcut_action(
|
||||||
|
mainWindow, u'helpOnlineHelpItem', [QtGui.QKeySequence(u'Alt+F1')],
|
||||||
|
self.onHelpOnlineHelpClicked, u':/system/system_online_help.png',
|
||||||
|
category=UiStrings().Help)
|
||||||
|
else:
|
||||||
|
self.helpOnlineHelpItem = shortcut_action(
|
||||||
mainWindow, u'helpOnlineHelpItem', [QtGui.QKeySequence(u'F1')],
|
mainWindow, u'helpOnlineHelpItem', [QtGui.QKeySequence(u'F1')],
|
||||||
self.onHelpOnlineHelpClicked, u':/system/system_online_help.png',
|
self.onHelpOnlineHelpClicked, u':/system/system_online_help.png',
|
||||||
category=UiStrings().Help)
|
category=UiStrings().Help)
|
||||||
@ -321,9 +333,14 @@ class Ui_MainWindow(object):
|
|||||||
add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
|
add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
|
||||||
add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
|
add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
|
||||||
add_actions(self.toolsMenu, [self.updateThemeImages])
|
add_actions(self.toolsMenu, [self.updateThemeImages])
|
||||||
add_actions(self.helpMenu, (self.helpDocumentationItem,
|
add_actions(self.helpMenu, (self.helpDocumentationItem, None))
|
||||||
|
if os.name == u'nt':
|
||||||
|
add_actions(self.helpMenu, (self.helpLocalHelpItem,
|
||||||
self.helpOnlineHelpItem, None, self.helpWebSiteItem,
|
self.helpOnlineHelpItem, None, self.helpWebSiteItem,
|
||||||
self.helpAboutItem))
|
self.helpAboutItem))
|
||||||
|
else:
|
||||||
|
add_actions(self.helpMenu, (self.helpOnlineHelpItem, None,
|
||||||
|
self.helpWebSiteItem, self.helpAboutItem))
|
||||||
add_actions(self.menuBar, (self.fileMenu.menuAction(),
|
add_actions(self.menuBar, (self.fileMenu.menuAction(),
|
||||||
self.viewMenu.menuAction(), self.toolsMenu.menuAction(),
|
self.viewMenu.menuAction(), self.toolsMenu.menuAction(),
|
||||||
self.settingsMenu.menuAction(), self.helpMenu.menuAction()))
|
self.settingsMenu.menuAction(), self.helpMenu.menuAction()))
|
||||||
@ -444,6 +461,9 @@ class Ui_MainWindow(object):
|
|||||||
self.helpAboutItem.setText(translate('OpenLP.MainWindow', '&About'))
|
self.helpAboutItem.setText(translate('OpenLP.MainWindow', '&About'))
|
||||||
self.helpAboutItem.setStatusTip(
|
self.helpAboutItem.setStatusTip(
|
||||||
translate('OpenLP.MainWindow', 'More information about OpenLP'))
|
translate('OpenLP.MainWindow', 'More information about OpenLP'))
|
||||||
|
if os.name == u'nt':
|
||||||
|
self.helpLocalHelpItem.setText(
|
||||||
|
translate('OpenLP.MainWindow', '&Help'))
|
||||||
self.helpOnlineHelpItem.setText(
|
self.helpOnlineHelpItem.setText(
|
||||||
translate('OpenLP.MainWindow', '&Online Help'))
|
translate('OpenLP.MainWindow', '&Online Help'))
|
||||||
self.helpWebSiteItem.setText(
|
self.helpWebSiteItem.setText(
|
||||||
@ -742,6 +762,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open_new(u'http://openlp.org/')
|
webbrowser.open_new(u'http://openlp.org/')
|
||||||
|
|
||||||
|
def onHelpLocalHelpClicked(self):
|
||||||
|
"""
|
||||||
|
Load the local OpenLP help file
|
||||||
|
"""
|
||||||
|
os.startfile(self.localHelpFile)
|
||||||
|
|
||||||
def onHelpOnlineHelpClicked(self):
|
def onHelpOnlineHelpClicked(self):
|
||||||
"""
|
"""
|
||||||
Load the online OpenLP manual
|
Load the online OpenLP manual
|
||||||
|
@ -832,7 +832,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
for item in self.serviceItems:
|
for item in self.serviceItems:
|
||||||
item[u'expanded'] = False
|
item[u'expanded'] = False
|
||||||
self.regenerateServiceItems()
|
self.serviceManagerList.collapseAll()
|
||||||
|
|
||||||
def collapsed(self, item):
|
def collapsed(self, item):
|
||||||
"""
|
"""
|
||||||
@ -848,7 +848,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
for item in self.serviceItems:
|
for item in self.serviceItems:
|
||||||
item[u'expanded'] = True
|
item[u'expanded'] = True
|
||||||
self.regenerateServiceItems()
|
self.serviceManagerList.expandAll()
|
||||||
|
|
||||||
def expanded(self, item):
|
def expanded(self, item):
|
||||||
"""
|
"""
|
||||||
@ -856,7 +856,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
correct state.
|
correct state.
|
||||||
"""
|
"""
|
||||||
pos = item.data(0, QtCore.Qt.UserRole).toInt()[0]
|
pos = item.data(0, QtCore.Qt.UserRole).toInt()[0]
|
||||||
self.serviceItems[pos -1 ][u'expanded'] = True
|
self.serviceItems[pos - 1][u'expanded'] = True
|
||||||
|
|
||||||
def onServiceTop(self):
|
def onServiceTop(self):
|
||||||
"""
|
"""
|
||||||
|
@ -298,11 +298,10 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
Copies an existing theme to a new name
|
Copies an existing theme to a new name
|
||||||
"""
|
"""
|
||||||
item = self.themeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
oldThemeName = unicode(
|
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||||
translate('OpenLP.ThemeManager', 'Copy of %s',
|
self.fileRenameForm.fileNameEdit.setText(
|
||||||
'Copy of <theme name>')) % unicode(
|
unicode(translate('OpenLP.ThemeManager',
|
||||||
item.data(QtCore.Qt.UserRole).toString())
|
'Copy of %s','Copy of <theme name>')) % oldThemeName)
|
||||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
|
||||||
if self.fileRenameForm.exec_(True):
|
if self.fileRenameForm.exec_(True):
|
||||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||||
if self.checkIfThemeExists(newThemeName):
|
if self.checkIfThemeExists(newThemeName):
|
||||||
|
@ -93,7 +93,6 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
|||||||
self.titleEdit.setText(u'')
|
self.titleEdit.setText(u'')
|
||||||
self.creditEdit.setText(u'')
|
self.creditEdit.setText(u'')
|
||||||
self.themeComboBox.setCurrentIndex(0)
|
self.themeComboBox.setCurrentIndex(0)
|
||||||
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
|
|
||||||
else:
|
else:
|
||||||
self.customSlide = self.manager.get_object(CustomSlide, id)
|
self.customSlide = self.manager.get_object(CustomSlide, id)
|
||||||
self.titleEdit.setText(self.customSlide.title)
|
self.titleEdit.setText(self.customSlide.title)
|
||||||
@ -104,10 +103,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
|||||||
self.slideListView.addItem(slide[1])
|
self.slideListView.addItem(slide[1])
|
||||||
theme = self.customSlide.theme_name
|
theme = self.customSlide.theme_name
|
||||||
find_and_set_in_combo_box(self.themeComboBox, theme)
|
find_and_set_in_combo_box(self.themeComboBox, theme)
|
||||||
|
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
|
||||||
# If not preview hide the preview button.
|
# If not preview hide the preview button.
|
||||||
self.previewButton.setVisible(False)
|
self.previewButton.setVisible(preview)
|
||||||
if preview:
|
|
||||||
self.previewButton.setVisible(True)
|
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
Receiver.send_message(u'custom_edit_clear')
|
Receiver.send_message(u'custom_edit_clear')
|
||||||
|
@ -209,9 +209,11 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.alternativeEdit.setText(u'')
|
self.alternativeEdit.setText(u'')
|
||||||
if self.song.song_book_id != 0:
|
if self.song.song_book_id != 0:
|
||||||
book_name = self.manager.get_object(Book, self.song.song_book_id)
|
book_name = self.manager.get_object(Book, self.song.song_book_id)
|
||||||
find_and_set_in_combo_box(self.songBookComboBox, unicode(book_name.name))
|
find_and_set_in_combo_box(
|
||||||
|
self.songBookComboBox, unicode(book_name.name))
|
||||||
if self.song.theme_name:
|
if self.song.theme_name:
|
||||||
find_and_set_in_combo_box(self.themeComboBox, unicode(self.song.theme_name))
|
find_and_set_in_combo_box(
|
||||||
|
self.themeComboBox, unicode(self.song.theme_name))
|
||||||
if self.song.copyright:
|
if self.song.copyright:
|
||||||
self.copyrightEdit.setText(self.song.copyright)
|
self.copyrightEdit.setText(self.song.copyright)
|
||||||
else:
|
else:
|
||||||
|
@ -242,10 +242,10 @@ def copy_windows_files():
|
|||||||
os.path.join(dist_path, u'LICENSE.txt'))
|
os.path.join(dist_path, u'LICENSE.txt'))
|
||||||
copy(os.path.join(winres_path, u'psvince.dll'),
|
copy(os.path.join(winres_path, u'psvince.dll'),
|
||||||
os.path.join(dist_path, u'psvince.dll'))
|
os.path.join(dist_path, u'psvince.dll'))
|
||||||
if os.path.isfile(os.path.join(helpfile_path, u'Openlp.chm')):
|
if os.path.isfile(os.path.join(helpfile_path, u'OpenLP.chm')):
|
||||||
print u' Windows help file found'
|
print u' Windows help file found'
|
||||||
copy(os.path.join(helpfile_path, u'Openlp.chm'),
|
copy(os.path.join(helpfile_path, u'OpenLP.chm'),
|
||||||
os.path.join(dist_path, u'Openlp.chm'))
|
os.path.join(dist_path, u'OpenLP.chm'))
|
||||||
else:
|
else:
|
||||||
print u' WARNING ---- Windows help file not found ---- WARNING'
|
print u' WARNING ---- Windows help file not found ---- WARNING'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user