forked from openlp/openlp
Head
This commit is contained in:
commit
62bca04614
|
@ -191,10 +191,10 @@ def validate_thumb(file_path, thumb_path):
|
||||||
``thumb_path``
|
``thumb_path``
|
||||||
The path to the thumb.
|
The path to the thumb.
|
||||||
"""
|
"""
|
||||||
if not os.path.exists(unicode(thumb_path)):
|
if not os.path.exists(thumb_path):
|
||||||
return False
|
return False
|
||||||
image_date = os.stat(unicode(file_path)).st_mtime
|
image_date = os.stat(file_path).st_mtime
|
||||||
thumb_date = os.stat(unicode(thumb_path)).st_mtime
|
thumb_date = os.stat(thumb_path).st_mtime
|
||||||
return image_date <= thumb_date
|
return image_date <= thumb_date
|
||||||
|
|
||||||
def resize_image(image_path, width, height, background=u'#000000'):
|
def resize_image(image_path, width, height, background=u'#000000'):
|
||||||
|
|
|
@ -113,10 +113,10 @@ sup {
|
||||||
document.getElementById('lyricsmain').style.visibility = lyrics;
|
document.getElementById('lyricsmain').style.visibility = lyrics;
|
||||||
document.getElementById('image').style.visibility = lyrics;
|
document.getElementById('image').style.visibility = lyrics;
|
||||||
outline = document.getElementById('lyricsoutline')
|
outline = document.getElementById('lyricsoutline')
|
||||||
if(outline!=null)
|
if(outline != null)
|
||||||
outline.style.visibility = lyrics;
|
outline.style.visibility = lyrics;
|
||||||
shadow = document.getElementById('lyricsshadow')
|
shadow = document.getElementById('lyricsshadow')
|
||||||
if(shadow!=null)
|
if(shadow != null)
|
||||||
shadow.style.visibility = lyrics;
|
shadow.style.visibility = lyrics;
|
||||||
document.getElementById('footer').style.visibility = lyrics;
|
document.getElementById('footer').style.visibility = lyrics;
|
||||||
}
|
}
|
||||||
|
@ -129,10 +129,28 @@ sup {
|
||||||
var match = /-webkit-text-fill-color:[^;\"]+/gi;
|
var match = /-webkit-text-fill-color:[^;\"]+/gi;
|
||||||
if(timer != null)
|
if(timer != null)
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
/*
|
||||||
|
QtWebkit bug with outlines and justify causing outline alignment
|
||||||
|
problems. (Bug 859950) Surround each word with a <span> to workaround,
|
||||||
|
but only in this scenario.
|
||||||
|
*/
|
||||||
|
var txt = document.getElementById('lyricsmain');
|
||||||
|
if(window.getComputedStyle(txt).textAlign == 'justify'){
|
||||||
|
var outline = document.getElementById('lyricsoutline');
|
||||||
|
if(outline != null)
|
||||||
|
txt = outline;
|
||||||
|
if(window.getComputedStyle(txt).webkitTextStrokeWidth != '0px'){
|
||||||
|
newtext = newtext.replace(/(\s| )+(?![^<]*>)/g,
|
||||||
|
function(match) {
|
||||||
|
return '</span>' + match + '<span>';
|
||||||
|
});
|
||||||
|
newtext = '<span>' + newtext + '</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
text_fade('lyricsmain', newtext);
|
text_fade('lyricsmain', newtext);
|
||||||
text_fade('lyricsoutline', newtext);
|
text_fade('lyricsoutline', newtext);
|
||||||
text_fade('lyricsshadow', newtext.replace(match, ""));
|
text_fade('lyricsshadow', newtext.replace(match, ''));
|
||||||
if(text_opacity()==1) return;
|
if(text_opacity() == 1) return;
|
||||||
timer = setTimeout(function(){
|
timer = setTimeout(function(){
|
||||||
show_text(newtext);
|
show_text(newtext);
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -149,18 +167,18 @@ sup {
|
||||||
slides) still looks pretty and is zippy.
|
slides) still looks pretty and is zippy.
|
||||||
*/
|
*/
|
||||||
var text = document.getElementById(id);
|
var text = document.getElementById(id);
|
||||||
if(text==null) return;
|
if(text == null) return;
|
||||||
if(!transition){
|
if(!transition){
|
||||||
text.innerHTML = newtext;
|
text.innerHTML = newtext;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(newtext==text.innerHTML){
|
if(newtext == text.innerHTML){
|
||||||
text.style.opacity = parseFloat(text.style.opacity) + 0.3;
|
text.style.opacity = parseFloat(text.style.opacity) + 0.3;
|
||||||
if(text.style.opacity>0.7)
|
if(text.style.opacity > 0.7)
|
||||||
text.style.opacity = 1;
|
text.style.opacity = 1;
|
||||||
} else {
|
} else {
|
||||||
text.style.opacity = parseFloat(text.style.opacity) - 0.3;
|
text.style.opacity = parseFloat(text.style.opacity) - 0.3;
|
||||||
if(text.style.opacity<=0.1){
|
if(text.style.opacity <= 0.1){
|
||||||
text.innerHTML = newtext;
|
text.innerHTML = newtext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +190,7 @@ sup {
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_text_complete(){
|
function show_text_complete(){
|
||||||
return (text_opacity()==1);
|
return (text_opacity() == 1);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -91,8 +91,9 @@ class Plugin(QtCore.QObject):
|
||||||
``checkPreConditions()``
|
``checkPreConditions()``
|
||||||
Provides the Plugin with a handle to check if it can be loaded.
|
Provides the Plugin with a handle to check if it can be loaded.
|
||||||
|
|
||||||
``getMediaManagerItem()``
|
``createMediaManagerItem()``
|
||||||
Returns an instance of MediaManagerItem to be used in the Media Manager.
|
Creates a new instance of MediaManagerItem to be used in the Media
|
||||||
|
Manager.
|
||||||
|
|
||||||
``addImportMenuItem(import_menu)``
|
``addImportMenuItem(import_menu)``
|
||||||
Add an item to the Import menu.
|
Add an item to the Import menu.
|
||||||
|
@ -100,8 +101,8 @@ class Plugin(QtCore.QObject):
|
||||||
``addExportMenuItem(export_menu)``
|
``addExportMenuItem(export_menu)``
|
||||||
Add an item to the Export menu.
|
Add an item to the Export menu.
|
||||||
|
|
||||||
``getSettingsTab()``
|
``createSettingsTab()``
|
||||||
Returns an instance of SettingsTabItem to be used in the Settings
|
Creates a new instance of SettingsTabItem to be used in the Settings
|
||||||
dialog.
|
dialog.
|
||||||
|
|
||||||
``addToMenu(menubar)``
|
``addToMenu(menubar)``
|
||||||
|
@ -156,10 +157,10 @@ class Plugin(QtCore.QObject):
|
||||||
self.icon = None
|
self.icon = None
|
||||||
self.media_item_class = media_item_class
|
self.media_item_class = media_item_class
|
||||||
self.settings_tab_class = settings_tab_class
|
self.settings_tab_class = settings_tab_class
|
||||||
|
self.settings_tab = None
|
||||||
|
self.mediaItem = None
|
||||||
self.weight = 0
|
self.weight = 0
|
||||||
self.status = PluginStatus.Inactive
|
self.status = PluginStatus.Inactive
|
||||||
# Set up logging
|
|
||||||
self.log = logging.getLogger(self.name)
|
|
||||||
self.previewController = plugin_helpers[u'preview']
|
self.previewController = plugin_helpers[u'preview']
|
||||||
self.liveController = plugin_helpers[u'live']
|
self.liveController = plugin_helpers[u'live']
|
||||||
self.renderer = plugin_helpers[u'renderer']
|
self.renderer = plugin_helpers[u'renderer']
|
||||||
|
@ -178,7 +179,7 @@ class Plugin(QtCore.QObject):
|
||||||
Provides the Plugin with a handle to check if it can be loaded.
|
Provides the Plugin with a handle to check if it can be loaded.
|
||||||
Failing Preconditions does not stop a settings Tab being created
|
Failing Preconditions does not stop a settings Tab being created
|
||||||
|
|
||||||
Returns True or False.
|
Returns ``True`` or ``False``.
|
||||||
"""
|
"""
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -210,15 +211,14 @@ class Plugin(QtCore.QObject):
|
||||||
"""
|
"""
|
||||||
return self.status == PluginStatus.Active
|
return self.status == PluginStatus.Active
|
||||||
|
|
||||||
def getMediaManagerItem(self):
|
def createMediaManagerItem(self):
|
||||||
"""
|
"""
|
||||||
Construct a MediaManagerItem object with all the buttons and things
|
Construct a MediaManagerItem object with all the buttons and things
|
||||||
you need, and return it for integration into openlp.org.
|
you need, and return it for integration into OpenLP.
|
||||||
"""
|
"""
|
||||||
if self.media_item_class:
|
if self.media_item_class:
|
||||||
return self.media_item_class(self.mediadock.media_dock, self,
|
self.mediaItem = self.media_item_class(self.mediadock.media_dock,
|
||||||
self.icon)
|
self, self.icon)
|
||||||
return None
|
|
||||||
|
|
||||||
def addImportMenuItem(self, importMenu):
|
def addImportMenuItem(self, importMenu):
|
||||||
"""
|
"""
|
||||||
|
@ -247,16 +247,15 @@ class Plugin(QtCore.QObject):
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getSettingsTab(self, parent):
|
def createSettingsTab(self, parent):
|
||||||
"""
|
"""
|
||||||
Create a tab for the settings window to display the configurable
|
Create a tab for the settings window to display the configurable options
|
||||||
options for this plugin to the user.
|
for this plugin to the user.
|
||||||
"""
|
"""
|
||||||
if self.settings_tab_class:
|
if self.settings_tab_class:
|
||||||
return self.settings_tab_class(parent, self.name,
|
self.settings_tab = self.settings_tab_class(parent, self.name,
|
||||||
self.getString(StringContent.VisibleName)[u'title'],
|
self.getString(StringContent.VisibleName)[u'title'],
|
||||||
self.icon_path)
|
self.icon_path)
|
||||||
return None
|
|
||||||
|
|
||||||
def addToMenu(self, menubar):
|
def addToMenu(self, menubar):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -90,7 +90,7 @@ class PluginManager(object):
|
||||||
thisdepth = len(path.split(os.sep))
|
thisdepth = len(path.split(os.sep))
|
||||||
if thisdepth - startdepth > 2:
|
if thisdepth - startdepth > 2:
|
||||||
# skip anything lower down
|
# skip anything lower down
|
||||||
continue
|
break
|
||||||
modulename = os.path.splitext(path)[0]
|
modulename = os.path.splitext(path)[0]
|
||||||
prefix = os.path.commonprefix([self.basepath, path])
|
prefix = os.path.commonprefix([self.basepath, path])
|
||||||
# hack off the plugin base path
|
# hack off the plugin base path
|
||||||
|
@ -113,7 +113,7 @@ class PluginManager(object):
|
||||||
plugin_objects.append(plugin)
|
plugin_objects.append(plugin)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
log.exception(u'Failed to load plugin %s', unicode(p))
|
log.exception(u'Failed to load plugin %s', unicode(p))
|
||||||
plugins_list = sorted(plugin_objects, self.order_by_weight)
|
plugins_list = sorted(plugin_objects, key=lambda plugin: plugin.weight)
|
||||||
for plugin in plugins_list:
|
for plugin in plugins_list:
|
||||||
if plugin.checkPreConditions():
|
if plugin.checkPreConditions():
|
||||||
log.debug(u'Plugin %s active', unicode(plugin.name))
|
log.debug(u'Plugin %s active', unicode(plugin.name))
|
||||||
|
@ -122,29 +122,13 @@ class PluginManager(object):
|
||||||
plugin.status = PluginStatus.Disabled
|
plugin.status = PluginStatus.Disabled
|
||||||
self.plugins.append(plugin)
|
self.plugins.append(plugin)
|
||||||
|
|
||||||
def order_by_weight(self, x, y):
|
def hook_media_manager(self):
|
||||||
"""
|
"""
|
||||||
Sort two plugins and order them by their weight.
|
Create the plugins' media manager items.
|
||||||
|
|
||||||
``x``
|
|
||||||
The first plugin.
|
|
||||||
|
|
||||||
``y``
|
|
||||||
The second plugin.
|
|
||||||
"""
|
|
||||||
return cmp(x.weight, y.weight)
|
|
||||||
|
|
||||||
def hook_media_manager(self, mediadock):
|
|
||||||
"""
|
|
||||||
Loop through all the plugins. If a plugin has a valid media manager
|
|
||||||
item, add it to the media manager.
|
|
||||||
|
|
||||||
``mediatoolbox``
|
|
||||||
The Media Manager itself.
|
|
||||||
"""
|
"""
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.status is not PluginStatus.Disabled:
|
if plugin.status is not PluginStatus.Disabled:
|
||||||
plugin.mediaItem = plugin.getMediaManagerItem()
|
plugin.createMediaManagerItem()
|
||||||
|
|
||||||
def hook_settings_tabs(self, settings_form=None):
|
def hook_settings_tabs(self, settings_form=None):
|
||||||
"""
|
"""
|
||||||
|
@ -152,14 +136,12 @@ class PluginManager(object):
|
||||||
item, add it to the settings tab.
|
item, add it to the settings tab.
|
||||||
Tabs are set for all plugins not just Active ones
|
Tabs are set for all plugins not just Active ones
|
||||||
|
|
||||||
``settingsform``
|
``settings_form``
|
||||||
Defaults to *None*. The settings form to add tabs to.
|
Defaults to *None*. The settings form to add tabs to.
|
||||||
"""
|
"""
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.status is not PluginStatus.Disabled:
|
if plugin.status is not PluginStatus.Disabled:
|
||||||
plugin.settings_tab = plugin.getSettingsTab(settings_form)
|
plugin.createSettingsTab(settings_form)
|
||||||
else:
|
|
||||||
plugin.settings_tab = None
|
|
||||||
settings_form.plugins = self.plugins
|
settings_form.plugins = self.plugins
|
||||||
|
|
||||||
def hook_import_menu(self, import_menu):
|
def hook_import_menu(self, import_menu):
|
||||||
|
@ -225,7 +207,7 @@ class PluginManager(object):
|
||||||
|
|
||||||
def get_plugin_by_name(self, name):
|
def get_plugin_by_name(self, name):
|
||||||
"""
|
"""
|
||||||
Return the plugin which has a name with value ``name``
|
Return the plugin which has a name with value ``name``.
|
||||||
"""
|
"""
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.name == name:
|
if plugin.name == name:
|
||||||
|
|
|
@ -176,92 +176,100 @@ class Ui_MainWindow(object):
|
||||||
self.themeManagerDock)
|
self.themeManagerDock)
|
||||||
# Create the menu items
|
# Create the menu items
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(UiStrings().File, CategoryOrder.standardMenu)
|
action_list.add_category(unicode(UiStrings().File),
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.fileNewItem = shortcut_action(mainWindow, u'fileNewItem',
|
self.fileNewItem = shortcut_action(mainWindow, u'fileNewItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+N')],
|
[QtGui.QKeySequence(u'Ctrl+N')],
|
||||||
self.serviceManagerContents.onNewServiceClicked,
|
self.serviceManagerContents.onNewServiceClicked,
|
||||||
u':/general/general_new.png', category=UiStrings().File)
|
u':/general/general_new.png', category=unicode(UiStrings().File))
|
||||||
self.fileOpenItem = shortcut_action(mainWindow, u'fileOpenItem',
|
self.fileOpenItem = shortcut_action(mainWindow, u'fileOpenItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+O')],
|
[QtGui.QKeySequence(u'Ctrl+O')],
|
||||||
self.serviceManagerContents.onLoadServiceClicked,
|
self.serviceManagerContents.onLoadServiceClicked,
|
||||||
u':/general/general_open.png', category=UiStrings().File)
|
u':/general/general_open.png', category=unicode(UiStrings().File))
|
||||||
self.fileSaveItem = shortcut_action(mainWindow, u'fileSaveItem',
|
self.fileSaveItem = shortcut_action(mainWindow, u'fileSaveItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+S')],
|
[QtGui.QKeySequence(u'Ctrl+S')],
|
||||||
self.serviceManagerContents.saveFile,
|
self.serviceManagerContents.saveFile,
|
||||||
u':/general/general_save.png', category=UiStrings().File)
|
u':/general/general_save.png', category=unicode(UiStrings().File))
|
||||||
self.fileSaveAsItem = shortcut_action(mainWindow, u'fileSaveAsItem',
|
self.fileSaveAsItem = shortcut_action(mainWindow, u'fileSaveAsItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+Shift+S')],
|
[QtGui.QKeySequence(u'Ctrl+Shift+S')],
|
||||||
self.serviceManagerContents.saveFileAs, category=UiStrings().File)
|
self.serviceManagerContents.saveFileAs,
|
||||||
|
category=unicode(UiStrings().File))
|
||||||
self.printServiceOrderItem = shortcut_action(mainWindow,
|
self.printServiceOrderItem = shortcut_action(mainWindow,
|
||||||
u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')],
|
u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')],
|
||||||
self.serviceManagerContents.printServiceOrder,
|
self.serviceManagerContents.printServiceOrder,
|
||||||
category=UiStrings().File)
|
category=unicode(UiStrings().File))
|
||||||
self.fileExitItem = shortcut_action(mainWindow, u'fileExitItem',
|
self.fileExitItem = shortcut_action(mainWindow, u'fileExitItem',
|
||||||
[QtGui.QKeySequence(u'Alt+F4')], mainWindow.close,
|
[QtGui.QKeySequence(u'Alt+F4')], mainWindow.close,
|
||||||
u':/system/system_exit.png', category=UiStrings().File)
|
u':/system/system_exit.png', category=unicode(UiStrings().File))
|
||||||
action_list.add_category(UiStrings().Import, CategoryOrder.standardMenu)
|
action_list.add_category(unicode(UiStrings().Import),
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.importThemeItem = base_action(
|
self.importThemeItem = base_action(
|
||||||
mainWindow, u'importThemeItem', UiStrings().Import)
|
mainWindow, u'importThemeItem', unicode(UiStrings().Import))
|
||||||
self.importLanguageItem = base_action(
|
self.importLanguageItem = base_action(
|
||||||
mainWindow, u'importLanguageItem')#, UiStrings().Import)
|
mainWindow, u'importLanguageItem')#, unicode(UiStrings().Import))
|
||||||
action_list.add_category(UiStrings().Export, CategoryOrder.standardMenu)
|
action_list.add_category(unicode(UiStrings().Export),
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.exportThemeItem = base_action(
|
self.exportThemeItem = base_action(
|
||||||
mainWindow, u'exportThemeItem', UiStrings().Export)
|
mainWindow, u'exportThemeItem', unicode(UiStrings().Export))
|
||||||
self.exportLanguageItem = base_action(
|
self.exportLanguageItem = base_action(
|
||||||
mainWindow, u'exportLanguageItem')#, UiStrings().Export)
|
mainWindow, u'exportLanguageItem')#, unicode(UiStrings().Export))
|
||||||
action_list.add_category(UiStrings().View, CategoryOrder.standardMenu)
|
action_list.add_category(unicode(UiStrings().View),
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.viewMediaManagerItem = shortcut_action(mainWindow,
|
self.viewMediaManagerItem = shortcut_action(mainWindow,
|
||||||
u'viewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
|
u'viewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
|
||||||
self.toggleMediaManager, u':/system/system_mediamanager.png',
|
self.toggleMediaManager, u':/system/system_mediamanager.png',
|
||||||
self.mediaManagerDock.isVisible(), UiStrings().View)
|
self.mediaManagerDock.isVisible(), unicode(UiStrings().View))
|
||||||
self.viewThemeManagerItem = shortcut_action(mainWindow,
|
self.viewThemeManagerItem = shortcut_action(mainWindow,
|
||||||
u'viewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
|
u'viewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
|
||||||
self.toggleThemeManager, u':/system/system_thememanager.png',
|
self.toggleThemeManager, u':/system/system_thememanager.png',
|
||||||
self.themeManagerDock.isVisible(), UiStrings().View)
|
self.themeManagerDock.isVisible(), unicode(UiStrings().View))
|
||||||
self.viewServiceManagerItem = shortcut_action(mainWindow,
|
self.viewServiceManagerItem = shortcut_action(mainWindow,
|
||||||
u'viewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
|
u'viewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
|
||||||
self.toggleServiceManager, u':/system/system_servicemanager.png',
|
self.toggleServiceManager, u':/system/system_servicemanager.png',
|
||||||
self.serviceManagerDock.isVisible(), UiStrings().View)
|
self.serviceManagerDock.isVisible(), unicode(UiStrings().View))
|
||||||
self.viewPreviewPanel = shortcut_action(mainWindow,
|
self.viewPreviewPanel = shortcut_action(mainWindow,
|
||||||
u'viewPreviewPanel', [QtGui.QKeySequence(u'F11')],
|
u'viewPreviewPanel', [QtGui.QKeySequence(u'F11')],
|
||||||
self.setPreviewPanelVisibility, checked=previewVisible,
|
self.setPreviewPanelVisibility, checked=previewVisible,
|
||||||
category=UiStrings().View)
|
category=unicode(UiStrings().View))
|
||||||
self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
|
self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
|
||||||
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
||||||
checked=liveVisible, category=UiStrings().View)
|
checked=liveVisible, category=unicode(UiStrings().View))
|
||||||
self.lockPanel = shortcut_action(mainWindow, u'lockPanel',
|
self.lockPanel = shortcut_action(mainWindow, u'lockPanel',
|
||||||
None, self.setLockPanel,
|
None, self.setLockPanel,
|
||||||
checked=panelLocked, category=None)
|
checked=panelLocked, category=None)
|
||||||
action_list.add_category(UiStrings().ViewMode,
|
action_list.add_category(unicode(UiStrings().ViewMode),
|
||||||
CategoryOrder.standardMenu)
|
CategoryOrder.standardMenu)
|
||||||
self.modeDefaultItem = checkable_action(
|
self.modeDefaultItem = checkable_action(
|
||||||
mainWindow, u'modeDefaultItem', category=UiStrings().ViewMode)
|
mainWindow, u'modeDefaultItem',
|
||||||
|
category=unicode(UiStrings().ViewMode))
|
||||||
self.modeSetupItem = checkable_action(
|
self.modeSetupItem = checkable_action(
|
||||||
mainWindow, u'modeSetupItem', category=UiStrings().ViewMode)
|
mainWindow, u'modeSetupItem',
|
||||||
|
category=unicode(UiStrings().ViewMode))
|
||||||
self.modeLiveItem = checkable_action(
|
self.modeLiveItem = checkable_action(
|
||||||
mainWindow, u'modeLiveItem', True, UiStrings().ViewMode)
|
mainWindow, u'modeLiveItem', True, unicode(UiStrings().ViewMode))
|
||||||
self.modeGroup = QtGui.QActionGroup(mainWindow)
|
self.modeGroup = QtGui.QActionGroup(mainWindow)
|
||||||
self.modeGroup.addAction(self.modeDefaultItem)
|
self.modeGroup.addAction(self.modeDefaultItem)
|
||||||
self.modeGroup.addAction(self.modeSetupItem)
|
self.modeGroup.addAction(self.modeSetupItem)
|
||||||
self.modeGroup.addAction(self.modeLiveItem)
|
self.modeGroup.addAction(self.modeLiveItem)
|
||||||
self.modeDefaultItem.setChecked(True)
|
self.modeDefaultItem.setChecked(True)
|
||||||
action_list.add_category(UiStrings().Tools, CategoryOrder.standardMenu)
|
action_list.add_category(unicode(UiStrings().Tools),
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.toolsAddToolItem = icon_action(mainWindow, u'toolsAddToolItem',
|
self.toolsAddToolItem = icon_action(mainWindow, u'toolsAddToolItem',
|
||||||
u':/tools/tools_add.png', category=UiStrings().Tools)
|
u':/tools/tools_add.png', category=unicode(UiStrings().Tools))
|
||||||
self.toolsOpenDataFolder = icon_action(mainWindow,
|
self.toolsOpenDataFolder = icon_action(mainWindow,
|
||||||
u'toolsOpenDataFolder', u':/general/general_open.png',
|
u'toolsOpenDataFolder', u':/general/general_open.png',
|
||||||
category=UiStrings().Tools)
|
category=unicode(UiStrings().Tools))
|
||||||
self.toolsFirstTimeWizard = icon_action(mainWindow,
|
self.toolsFirstTimeWizard = icon_action(mainWindow,
|
||||||
u'toolsFirstTimeWizard', u':/general/general_revert.png',
|
u'toolsFirstTimeWizard', u':/general/general_revert.png',
|
||||||
category=UiStrings().Tools)
|
category=unicode(UiStrings().Tools))
|
||||||
self.updateThemeImages = base_action(mainWindow,
|
self.updateThemeImages = base_action(mainWindow,
|
||||||
u'updateThemeImages', category=UiStrings().Tools)
|
u'updateThemeImages', category=unicode(UiStrings().Tools))
|
||||||
action_list.add_category(UiStrings().Settings,
|
action_list.add_category(unicode(UiStrings().Settings),
|
||||||
CategoryOrder.standardMenu)
|
CategoryOrder.standardMenu)
|
||||||
self.settingsPluginListItem = shortcut_action(mainWindow,
|
self.settingsPluginListItem = shortcut_action(mainWindow,
|
||||||
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
||||||
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
||||||
category=UiStrings().Settings)
|
category=unicode(UiStrings().Settings))
|
||||||
# i18n Language Items
|
# i18n Language Items
|
||||||
self.autoLanguageItem = checkable_action(mainWindow,
|
self.autoLanguageItem = checkable_action(mainWindow,
|
||||||
u'autoLanguageItem', LanguageManager.auto_language)
|
u'autoLanguageItem', LanguageManager.auto_language)
|
||||||
|
@ -278,35 +286,38 @@ class Ui_MainWindow(object):
|
||||||
self.settingsShortcutsItem = icon_action(mainWindow,
|
self.settingsShortcutsItem = icon_action(mainWindow,
|
||||||
u'settingsShortcutsItem',
|
u'settingsShortcutsItem',
|
||||||
u':/system/system_configure_shortcuts.png',
|
u':/system/system_configure_shortcuts.png',
|
||||||
category=UiStrings().Settings)
|
category=unicode(UiStrings().Settings))
|
||||||
# Formatting Tags were also known as display tags.
|
# Formatting Tags were also known as display tags.
|
||||||
self.formattingTagItem = icon_action(mainWindow,
|
self.formattingTagItem = icon_action(mainWindow,
|
||||||
u'displayTagItem', u':/system/tag_editor.png',
|
u'displayTagItem', u':/system/tag_editor.png',
|
||||||
category=UiStrings().Settings)
|
category=unicode(UiStrings().Settings))
|
||||||
self.settingsConfigureItem = icon_action(mainWindow,
|
self.settingsConfigureItem = icon_action(mainWindow,
|
||||||
u'settingsConfigureItem', u':/system/system_settings.png',
|
u'settingsConfigureItem', u':/system/system_settings.png',
|
||||||
category=UiStrings().Settings)
|
category=unicode(UiStrings().Settings))
|
||||||
self.settingsImportItem = base_action(mainWindow,
|
self.settingsImportItem = base_action(mainWindow,
|
||||||
u'settingsImportItem', category=UiStrings().Settings)
|
u'settingsImportItem', category=unicode(UiStrings().Settings))
|
||||||
self.settingsExportItem = base_action(mainWindow,
|
self.settingsExportItem = base_action(mainWindow,
|
||||||
u'settingsExportItem', category=UiStrings().Settings)
|
u'settingsExportItem', category=unicode(UiStrings().Settings))
|
||||||
action_list.add_category(UiStrings().Help, CategoryOrder.standardMenu)
|
action_list.add_category(unicode(UiStrings().Help),
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.aboutItem = shortcut_action(mainWindow, u'aboutItem',
|
self.aboutItem = shortcut_action(mainWindow, u'aboutItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+F1')], self.onAboutItemClicked,
|
[QtGui.QKeySequence(u'Ctrl+F1')], self.onAboutItemClicked,
|
||||||
u':/system/system_about.png', category=UiStrings().Help)
|
u':/system/system_about.png', category=unicode(UiStrings().Help))
|
||||||
if os.name == u'nt':
|
if os.name == u'nt':
|
||||||
self.localHelpFile = os.path.join(
|
self.localHelpFile = os.path.join(
|
||||||
AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')
|
AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')
|
||||||
self.offlineHelpItem = shortcut_action(
|
self.offlineHelpItem = shortcut_action(
|
||||||
mainWindow, u'offlineHelpItem', [QtGui.QKeySequence(u'F1')],
|
mainWindow, u'offlineHelpItem', [QtGui.QKeySequence(u'F1')],
|
||||||
self.onOfflineHelpClicked,
|
self.onOfflineHelpClicked,
|
||||||
u':/system/system_help_contents.png', category=UiStrings().Help)
|
u':/system/system_help_contents.png',
|
||||||
|
category=unicode(UiStrings().Help))
|
||||||
self.onlineHelpItem = shortcut_action(
|
self.onlineHelpItem = shortcut_action(
|
||||||
mainWindow, u'onlineHelpItem',
|
mainWindow, u'onlineHelpItem',
|
||||||
[QtGui.QKeySequence(u'Alt+F1')], self.onOnlineHelpClicked,
|
[QtGui.QKeySequence(u'Alt+F1')], self.onOnlineHelpClicked,
|
||||||
u':/system/system_online_help.png', category=UiStrings().Help)
|
u':/system/system_online_help.png',
|
||||||
|
category=unicode(UiStrings().Help))
|
||||||
self.webSiteItem = base_action(
|
self.webSiteItem = base_action(
|
||||||
mainWindow, u'webSiteItem', category=UiStrings().Help)
|
mainWindow, u'webSiteItem', category=unicode(UiStrings().Help))
|
||||||
add_actions(self.fileImportMenu, (self.settingsImportItem, None,
|
add_actions(self.fileImportMenu, (self.settingsImportItem, None,
|
||||||
self.importThemeItem, self.importLanguageItem))
|
self.importThemeItem, self.importLanguageItem))
|
||||||
add_actions(self.fileExportMenu, (self.settingsExportItem, None,
|
add_actions(self.fileExportMenu, (self.settingsExportItem, None,
|
||||||
|
@ -655,7 +666,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||||
self.pluginManager.hook_settings_tabs(self.settingsForm)
|
self.pluginManager.hook_settings_tabs(self.settingsForm)
|
||||||
# Find and insert media manager items
|
# Find and insert media manager items
|
||||||
log.info(u'hook media')
|
log.info(u'hook media')
|
||||||
self.pluginManager.hook_media_manager(self.mediaDockManager)
|
self.pluginManager.hook_media_manager()
|
||||||
# Call the hook method to pull in import menus.
|
# Call the hook method to pull in import menus.
|
||||||
log.info(u'hook menus')
|
log.info(u'hook menus')
|
||||||
self.pluginManager.hook_import_menu(self.fileImportMenu)
|
self.pluginManager.hook_import_menu(self.fileImportMenu)
|
||||||
|
|
|
@ -177,9 +177,9 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.serviceManagerList.moveTop.setObjectName(u'moveTop')
|
self.serviceManagerList.moveTop.setObjectName(u'moveTop')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(
|
action_list.add_category(
|
||||||
UiStrings().Service, CategoryOrder.standardToolbar)
|
unicode(UiStrings().Service), CategoryOrder.standardToolbar)
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveTop, UiStrings().Service)
|
self.serviceManagerList.moveTop, unicode(UiStrings().Service))
|
||||||
self.serviceManagerList.moveUp = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.moveUp = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move &up'),
|
translate('OpenLP.ServiceManager', 'Move &up'),
|
||||||
u':/services/service_up.png',
|
u':/services/service_up.png',
|
||||||
|
@ -188,7 +188,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.onServiceUp, shortcuts=[QtCore.Qt.Key_PageUp])
|
self.onServiceUp, shortcuts=[QtCore.Qt.Key_PageUp])
|
||||||
self.serviceManagerList.moveUp.setObjectName(u'moveUp')
|
self.serviceManagerList.moveUp.setObjectName(u'moveUp')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveUp, UiStrings().Service)
|
self.serviceManagerList.moveUp, unicode(UiStrings().Service))
|
||||||
self.serviceManagerList.moveDown = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.moveDown = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move &down'),
|
translate('OpenLP.ServiceManager', 'Move &down'),
|
||||||
u':/services/service_down.png',
|
u':/services/service_down.png',
|
||||||
|
@ -197,7 +197,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.onServiceDown, shortcuts=[QtCore.Qt.Key_PageDown])
|
self.onServiceDown, shortcuts=[QtCore.Qt.Key_PageDown])
|
||||||
self.serviceManagerList.moveDown.setObjectName(u'moveDown')
|
self.serviceManagerList.moveDown.setObjectName(u'moveDown')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveDown, UiStrings().Service)
|
self.serviceManagerList.moveDown, unicode(UiStrings().Service))
|
||||||
self.serviceManagerList.moveBottom = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.moveBottom = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move to &bottom'),
|
translate('OpenLP.ServiceManager', 'Move to &bottom'),
|
||||||
u':/services/service_bottom.png',
|
u':/services/service_bottom.png',
|
||||||
|
@ -206,7 +206,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.onServiceEnd, shortcuts=[QtCore.Qt.Key_End])
|
self.onServiceEnd, shortcuts=[QtCore.Qt.Key_End])
|
||||||
self.serviceManagerList.moveBottom.setObjectName(u'moveBottom')
|
self.serviceManagerList.moveBottom.setObjectName(u'moveBottom')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveBottom, UiStrings().Service)
|
self.serviceManagerList.moveBottom, unicode(UiStrings().Service))
|
||||||
self.serviceManagerList.down = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.down = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move &down'),
|
translate('OpenLP.ServiceManager', 'Move &down'),
|
||||||
None,
|
None,
|
||||||
|
@ -241,7 +241,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.onExpandAll, shortcuts=[QtCore.Qt.Key_Plus])
|
self.onExpandAll, shortcuts=[QtCore.Qt.Key_Plus])
|
||||||
self.serviceManagerList.expand.setObjectName(u'expand')
|
self.serviceManagerList.expand.setObjectName(u'expand')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.expand, UiStrings().Service)
|
self.serviceManagerList.expand, unicode(UiStrings().Service))
|
||||||
self.serviceManagerList.collapse = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.collapse = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', '&Collapse all'),
|
translate('OpenLP.ServiceManager', '&Collapse all'),
|
||||||
u':/services/service_collapse_all.png',
|
u':/services/service_collapse_all.png',
|
||||||
|
@ -250,7 +250,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.onCollapseAll, shortcuts=[QtCore.Qt.Key_Minus])
|
self.onCollapseAll, shortcuts=[QtCore.Qt.Key_Minus])
|
||||||
self.serviceManagerList.collapse.setObjectName(u'collapse')
|
self.serviceManagerList.collapse.setObjectName(u'collapse')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.collapse, UiStrings().Service)
|
self.serviceManagerList.collapse, unicode(UiStrings().Service))
|
||||||
self.orderToolbar.addSeparator()
|
self.orderToolbar.addSeparator()
|
||||||
self.serviceManagerList.makeLive = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.makeLive = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Go Live'),
|
translate('OpenLP.ServiceManager', 'Go Live'),
|
||||||
|
@ -260,7 +260,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
shortcuts=[QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return])
|
shortcuts=[QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return])
|
||||||
self.serviceManagerList.makeLive.setObjectName(u'orderToolbar')
|
self.serviceManagerList.makeLive.setObjectName(u'orderToolbar')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.makeLive, UiStrings().Service)
|
self.serviceManagerList.makeLive, unicode(UiStrings().Service))
|
||||||
self.layout.addWidget(self.orderToolbar)
|
self.layout.addWidget(self.orderToolbar)
|
||||||
# Connect up our signals and slots
|
# Connect up our signals and slots
|
||||||
QtCore.QObject.connect(self.themeComboBox,
|
QtCore.QObject.connect(self.themeComboBox,
|
||||||
|
|
|
@ -187,18 +187,20 @@ class SlideController(Controller):
|
||||||
translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
||||||
self.blankScreen = shortcut_action(self.hideMenu, u'blankScreen',
|
self.blankScreen = shortcut_action(self.hideMenu, u'blankScreen',
|
||||||
[QtCore.Qt.Key_Period], self.onBlankDisplay,
|
[QtCore.Qt.Key_Period], self.onBlankDisplay,
|
||||||
u':/slides/slide_blank.png', False, UiStrings().LiveToolbar)
|
u':/slides/slide_blank.png', False,
|
||||||
|
unicode(UiStrings().LiveToolbar))
|
||||||
self.blankScreen.setText(
|
self.blankScreen.setText(
|
||||||
translate('OpenLP.SlideController', 'Blank Screen'))
|
translate('OpenLP.SlideController', 'Blank Screen'))
|
||||||
self.themeScreen = shortcut_action(self.hideMenu, u'themeScreen',
|
self.themeScreen = shortcut_action(self.hideMenu, u'themeScreen',
|
||||||
[QtGui.QKeySequence(u'T')], self.onThemeDisplay,
|
[QtGui.QKeySequence(u'T')], self.onThemeDisplay,
|
||||||
u':/slides/slide_theme.png', False, UiStrings().LiveToolbar)
|
u':/slides/slide_theme.png', False,
|
||||||
|
unicode(UiStrings().LiveToolbar))
|
||||||
self.themeScreen.setText(
|
self.themeScreen.setText(
|
||||||
translate('OpenLP.SlideController', 'Blank to Theme'))
|
translate('OpenLP.SlideController', 'Blank to Theme'))
|
||||||
self.desktopScreen = shortcut_action(self.hideMenu,
|
self.desktopScreen = shortcut_action(self.hideMenu,
|
||||||
u'desktopScreen', [QtGui.QKeySequence(u'D')],
|
u'desktopScreen', [QtGui.QKeySequence(u'D')],
|
||||||
self.onHideDisplay, u':/slides/slide_desktop.png', False,
|
self.onHideDisplay, u':/slides/slide_desktop.png', False,
|
||||||
UiStrings().LiveToolbar)
|
unicode(UiStrings().LiveToolbar))
|
||||||
self.desktopScreen.setText(
|
self.desktopScreen.setText(
|
||||||
translate('OpenLP.SlideController', 'Show Desktop'))
|
translate('OpenLP.SlideController', 'Show Desktop'))
|
||||||
self.hideMenu.setDefaultAction(self.blankScreen)
|
self.hideMenu.setDefaultAction(self.blankScreen)
|
||||||
|
@ -218,11 +220,13 @@ class SlideController(Controller):
|
||||||
self.toolbar))
|
self.toolbar))
|
||||||
self.playSlidesLoop = shortcut_action(self.playSlidesMenu,
|
self.playSlidesLoop = shortcut_action(self.playSlidesMenu,
|
||||||
u'playSlidesLoop', [], self.onPlaySlidesLoop,
|
u'playSlidesLoop', [], self.onPlaySlidesLoop,
|
||||||
u':/media/media_time.png', False, UiStrings().LiveToolbar)
|
u':/media/media_time.png', False,
|
||||||
|
unicode(UiStrings().LiveToolbar))
|
||||||
self.playSlidesLoop.setText(UiStrings().PlaySlidesInLoop)
|
self.playSlidesLoop.setText(UiStrings().PlaySlidesInLoop)
|
||||||
self.playSlidesOnce = shortcut_action(self.playSlidesMenu,
|
self.playSlidesOnce = shortcut_action(self.playSlidesMenu,
|
||||||
u'playSlidesOnce', [], self.onPlaySlidesOnce,
|
u'playSlidesOnce', [], self.onPlaySlidesOnce,
|
||||||
u':/media/media_time.png', False, UiStrings().LiveToolbar)
|
u':/media/media_time.png', False,
|
||||||
|
unicode(UiStrings().LiveToolbar))
|
||||||
self.playSlidesOnce.setText(UiStrings().PlaySlidesToEnd)
|
self.playSlidesOnce.setText(UiStrings().PlaySlidesToEnd)
|
||||||
if QtCore.QSettings().value(self.parent().generalSettingsSection +
|
if QtCore.QSettings().value(self.parent().generalSettingsSection +
|
||||||
u'/enable slide loop', QtCore.QVariant(True)).toBool():
|
u'/enable slide loop', QtCore.QVariant(True)).toBool():
|
||||||
|
@ -320,7 +324,7 @@ class SlideController(Controller):
|
||||||
self.shortcutTimer.setSingleShot(True)
|
self.shortcutTimer.setSingleShot(True)
|
||||||
self.verseShortcut = shortcut_action(self, u'verseShortcut',
|
self.verseShortcut = shortcut_action(self, u'verseShortcut',
|
||||||
[QtGui.QKeySequence(u'V')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'V')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.verseShortcut.setText(translate(
|
self.verseShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Verse"'))
|
'OpenLP.SlideController', 'Go to "Verse"'))
|
||||||
|
@ -356,37 +360,37 @@ class SlideController(Controller):
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.chorusShortcut = shortcut_action(self, u'chorusShortcut',
|
self.chorusShortcut = shortcut_action(self, u'chorusShortcut',
|
||||||
[QtGui.QKeySequence(u'C')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'C')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.chorusShortcut.setText(translate(
|
self.chorusShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Chorus"'))
|
'OpenLP.SlideController', 'Go to "Chorus"'))
|
||||||
self.bridgeShortcut = shortcut_action(self, u'bridgeShortcut',
|
self.bridgeShortcut = shortcut_action(self, u'bridgeShortcut',
|
||||||
[QtGui.QKeySequence(u'B')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'B')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.bridgeShortcut.setText(translate(
|
self.bridgeShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Bridge"'))
|
'OpenLP.SlideController', 'Go to "Bridge"'))
|
||||||
self.preChorusShortcut = shortcut_action(self, u'preChorusShortcut',
|
self.preChorusShortcut = shortcut_action(self, u'preChorusShortcut',
|
||||||
[QtGui.QKeySequence(u'P')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'P')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.preChorusShortcut.setText(translate(
|
self.preChorusShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Pre-Chorus"'))
|
'OpenLP.SlideController', 'Go to "Pre-Chorus"'))
|
||||||
self.introShortcut = shortcut_action(self, u'introShortcut',
|
self.introShortcut = shortcut_action(self, u'introShortcut',
|
||||||
[QtGui.QKeySequence(u'I')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'I')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.introShortcut.setText(translate(
|
self.introShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Intro"'))
|
'OpenLP.SlideController', 'Go to "Intro"'))
|
||||||
self.endingShortcut = shortcut_action(self, u'endingShortcut',
|
self.endingShortcut = shortcut_action(self, u'endingShortcut',
|
||||||
[QtGui.QKeySequence(u'E')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'E')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.endingShortcut.setText(translate(
|
self.endingShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Ending"'))
|
'OpenLP.SlideController', 'Go to "Ending"'))
|
||||||
self.otherShortcut = shortcut_action(self, u'otherShortcut',
|
self.otherShortcut = shortcut_action(self, u'otherShortcut',
|
||||||
[QtGui.QKeySequence(u'O')], self.slideShortcutActivated,
|
[QtGui.QKeySequence(u'O')], self.slideShortcutActivated,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.otherShortcut.setText(translate(
|
self.otherShortcut.setText(translate(
|
||||||
'OpenLP.SlideController', 'Go to "Other"'))
|
'OpenLP.SlideController', 'Go to "Other"'))
|
||||||
|
@ -540,24 +544,24 @@ class SlideController(Controller):
|
||||||
self.nextItem.setObjectName(u'nextItemLive')
|
self.nextItem.setObjectName(u'nextItemLive')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(
|
action_list.add_category(
|
||||||
UiStrings().LiveToolbar, CategoryOrder.standardToolbar)
|
unicode(UiStrings().LiveToolbar), CategoryOrder.standardToolbar)
|
||||||
action_list.add_action(self.previousItem)
|
action_list.add_action(self.previousItem)
|
||||||
action_list.add_action(self.nextItem)
|
action_list.add_action(self.nextItem)
|
||||||
self.previousService = shortcut_action(parent, u'previousService',
|
self.previousService = shortcut_action(parent, u'previousService',
|
||||||
[QtCore.Qt.Key_Left], self.servicePrevious,
|
[QtCore.Qt.Key_Left], self.servicePrevious,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.previousService.setText(
|
self.previousService.setText(
|
||||||
translate('OpenLP.SlideController', 'Previous Service'))
|
translate('OpenLP.SlideController', 'Previous Service'))
|
||||||
self.nextService = shortcut_action(parent, 'nextService',
|
self.nextService = shortcut_action(parent, 'nextService',
|
||||||
[QtCore.Qt.Key_Right], self.serviceNext,
|
[QtCore.Qt.Key_Right], self.serviceNext,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.nextService.setText(
|
self.nextService.setText(
|
||||||
translate('OpenLP.SlideController', 'Next Service'))
|
translate('OpenLP.SlideController', 'Next Service'))
|
||||||
self.escapeItem = shortcut_action(parent, 'escapeItem',
|
self.escapeItem = shortcut_action(parent, 'escapeItem',
|
||||||
[QtCore.Qt.Key_Escape], self.liveEscape,
|
[QtCore.Qt.Key_Escape], self.liveEscape,
|
||||||
category=UiStrings().LiveToolbar,
|
category=unicode(UiStrings().LiveToolbar),
|
||||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.escapeItem.setText(
|
self.escapeItem.setText(
|
||||||
translate('OpenLP.SlideController', 'Escape Item'))
|
translate('OpenLP.SlideController', 'Escape Item'))
|
||||||
|
|
|
@ -217,8 +217,6 @@ class ActionList(object):
|
||||||
The weight specifies how important a category is. However, this only
|
The weight specifies how important a category is. However, this only
|
||||||
has an impact on the order the categories are displayed.
|
has an impact on the order the categories are displayed.
|
||||||
"""
|
"""
|
||||||
if category is not None:
|
|
||||||
category = unicode(category)
|
|
||||||
if category not in self.categories:
|
if category not in self.categories:
|
||||||
self.categories.append(category)
|
self.categories.append(category)
|
||||||
action.defaultShortcuts = action.shortcuts()
|
action.defaultShortcuts = action.shortcuts()
|
||||||
|
@ -226,7 +224,7 @@ class ActionList(object):
|
||||||
self.categories[category].actions.append(action)
|
self.categories[category].actions.append(action)
|
||||||
else:
|
else:
|
||||||
self.categories[category].actions.add(action, weight)
|
self.categories[category].actions.add(action, weight)
|
||||||
if category is None:
|
if not category:
|
||||||
# Stop here, as this action is not configurable.
|
# Stop here, as this action is not configurable.
|
||||||
return
|
return
|
||||||
# Load the shortcut from the config.
|
# Load the shortcut from the config.
|
||||||
|
@ -250,8 +248,6 @@ class ActionList(object):
|
||||||
The name (unicode string) of the category, which contains the
|
The name (unicode string) of the category, which contains the
|
||||||
action. Defaults to None.
|
action. Defaults to None.
|
||||||
"""
|
"""
|
||||||
if category is not None:
|
|
||||||
category = unicode(category)
|
|
||||||
if category not in self.categories:
|
if category not in self.categories:
|
||||||
return
|
return
|
||||||
self.categories[category].actions.remove(action)
|
self.categories[category].actions.remove(action)
|
||||||
|
|
|
@ -149,7 +149,7 @@ class AlertsPlugin(Plugin):
|
||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.toolsAlertItem.setVisible(True)
|
self.toolsAlertItem.setVisible(True)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.toolsAlertItem, UiStrings().Tools)
|
action_list.add_action(self.toolsAlertItem, unicode(UiStrings().Tools))
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -55,9 +55,11 @@ class BiblePlugin(Plugin):
|
||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.importBibleItem.setVisible(True)
|
self.importBibleItem.setVisible(True)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.importBibleItem, UiStrings().Import)
|
action_list.add_action(self.importBibleItem,
|
||||||
|
unicode(UiStrings().Import))
|
||||||
# Do not add the action to the list yet.
|
# Do not add the action to the list yet.
|
||||||
#action_list.add_action(self.exportBibleItem, UiStrings().Export)
|
#action_list.add_action(self.exportBibleItem,
|
||||||
|
# unicode(UiStrings().Export))
|
||||||
# Set to invisible until we can export bibles
|
# Set to invisible until we can export bibles
|
||||||
self.exportBibleItem.setVisible(False)
|
self.exportBibleItem.setVisible(False)
|
||||||
if len(self.manager.old_bible_databases):
|
if len(self.manager.old_bible_databases):
|
||||||
|
@ -71,7 +73,8 @@ class BiblePlugin(Plugin):
|
||||||
self.manager.finalise()
|
self.manager.finalise()
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.remove_action(self.importBibleItem, UiStrings().Import)
|
action_list.remove_action(self.importBibleItem,
|
||||||
|
unicode(UiStrings().Import))
|
||||||
self.importBibleItem.setVisible(False)
|
self.importBibleItem.setVisible(False)
|
||||||
#action_list.remove_action(self.exportBibleItem, UiStrings().Export)
|
#action_list.remove_action(self.exportBibleItem, UiStrings().Export)
|
||||||
self.exportBibleItem.setVisible(False)
|
self.exportBibleItem.setVisible(False)
|
||||||
|
|
|
@ -127,13 +127,13 @@ class ImageMediaItem(MediaManagerItem):
|
||||||
self.plugin.formparent.incrementProgressBar()
|
self.plugin.formparent.incrementProgressBar()
|
||||||
filename = os.path.split(unicode(imageFile))[1]
|
filename = os.path.split(unicode(imageFile))[1]
|
||||||
thumb = os.path.join(self.servicePath, filename)
|
thumb = os.path.join(self.servicePath, filename)
|
||||||
if not os.path.exists(imageFile):
|
if not os.path.exists(unicode(imageFile)):
|
||||||
icon = build_icon(u':/general/general_delete.png')
|
icon = build_icon(u':/general/general_delete.png')
|
||||||
else:
|
else:
|
||||||
if validate_thumb(imageFile, thumb):
|
if validate_thumb(unicode(imageFile), thumb):
|
||||||
icon = build_icon(thumb)
|
icon = build_icon(thumb)
|
||||||
else:
|
else:
|
||||||
icon = create_thumb(imageFile, thumb)
|
icon = create_thumb(unicode(imageFile), thumb)
|
||||||
item_name = QtGui.QListWidgetItem(filename)
|
item_name = QtGui.QListWidgetItem(filename)
|
||||||
item_name.setIcon(icon)
|
item_name.setIcon(icon)
|
||||||
item_name.setToolTip(imageFile)
|
item_name.setToolTip(imageFile)
|
||||||
|
|
|
@ -52,12 +52,12 @@ class MediaPlugin(Plugin):
|
||||||
for ext in self.video_extensions_list:
|
for ext in self.video_extensions_list:
|
||||||
self.serviceManager.supportedSuffixes(ext[2:])
|
self.serviceManager.supportedSuffixes(ext[2:])
|
||||||
|
|
||||||
def getSettingsTab(self, parent):
|
def createSettingsTab(self, parent):
|
||||||
"""
|
"""
|
||||||
Create the settings Tab
|
Create the settings Tab
|
||||||
"""
|
"""
|
||||||
visible_name = self.getString(StringContent.VisibleName)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return MediaTab(parent, self.name, visible_name[u'title'],
|
self.settings_tab = MediaTab(parent, self.name, visible_name[u'title'],
|
||||||
self.mediaController.mediaPlayers, self.icon_path)
|
self.mediaController.mediaPlayers, self.icon_path)
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
|
|
|
@ -57,13 +57,13 @@ class PresentationPlugin(Plugin):
|
||||||
self.icon_path = u':/plugins/plugin_presentations.png'
|
self.icon_path = u':/plugins/plugin_presentations.png'
|
||||||
self.icon = build_icon(self.icon_path)
|
self.icon = build_icon(self.icon_path)
|
||||||
|
|
||||||
def getSettingsTab(self, parent):
|
def createSettingsTab(self, parent):
|
||||||
"""
|
"""
|
||||||
Create the settings Tab
|
Create the settings Tab
|
||||||
"""
|
"""
|
||||||
visible_name = self.getString(StringContent.VisibleName)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return PresentationTab(parent, self.name, visible_name[u'title'],
|
self.settings_tab = PresentationTab(parent, self.name,
|
||||||
self.controllers, self.icon_path)
|
visible_name[u'title'], self.controllers, self.icon_path)
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
"""
|
"""
|
||||||
|
@ -94,11 +94,11 @@ class PresentationPlugin(Plugin):
|
||||||
controller.kill()
|
controller.kill()
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
|
|
||||||
def getMediaManagerItem(self):
|
def createMediaManagerItem(self):
|
||||||
"""
|
"""
|
||||||
Create the Media Manager List
|
Create the Media Manager List
|
||||||
"""
|
"""
|
||||||
return PresentationMediaItem(
|
self.mediaItem = PresentationMediaItem(
|
||||||
self.mediadock.media_dock, self, self.icon, self.controllers)
|
self.mediadock.media_dock, self, self.icon, self.controllers)
|
||||||
|
|
||||||
def registerControllers(self, controller):
|
def registerControllers(self, controller):
|
||||||
|
|
|
@ -181,7 +181,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||||
plugin.status == PluginStatus.Active:
|
plugin.status == PluginStatus.Active:
|
||||||
self.audioAddFromMediaButton.setVisible(True)
|
self.audioAddFromMediaButton.setVisible(True)
|
||||||
self.mediaForm.populateFiles(
|
self.mediaForm.populateFiles(
|
||||||
plugin.getMediaManagerItem().getList(MediaType.Audio))
|
plugin.mediaItem.getList(MediaType.Audio))
|
||||||
break
|
break
|
||||||
|
|
||||||
def newSong(self):
|
def newSong(self):
|
||||||
|
|
|
@ -74,9 +74,10 @@ class SongsPlugin(Plugin):
|
||||||
self.songExportItem.setVisible(True)
|
self.songExportItem.setVisible(True)
|
||||||
self.toolsReindexItem.setVisible(True)
|
self.toolsReindexItem.setVisible(True)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.songImportItem, UiStrings().Import)
|
action_list.add_action(self.songImportItem, unicode(UiStrings().Import))
|
||||||
action_list.add_action(self.songExportItem, UiStrings().Export)
|
action_list.add_action(self.songExportItem, unicode(UiStrings().Export))
|
||||||
action_list.add_action(self.toolsReindexItem, UiStrings().Tools)
|
action_list.add_action(self.toolsReindexItem,
|
||||||
|
unicode(UiStrings().Tools))
|
||||||
|
|
||||||
def addImportMenuItem(self, import_menu):
|
def addImportMenuItem(self, import_menu):
|
||||||
"""
|
"""
|
||||||
|
@ -269,7 +270,10 @@ class SongsPlugin(Plugin):
|
||||||
self.songExportItem.setVisible(False)
|
self.songExportItem.setVisible(False)
|
||||||
self.toolsReindexItem.setVisible(False)
|
self.toolsReindexItem.setVisible(False)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.remove_action(self.songImportItem, UiStrings().Import)
|
action_list.remove_action(self.songImportItem,
|
||||||
action_list.remove_action(self.songExportItem, UiStrings().Export)
|
unicode(UiStrings().Import))
|
||||||
action_list.remove_action(self.toolsReindexItem, UiStrings().Tools)
|
action_list.remove_action(self.songExportItem,
|
||||||
|
unicode(UiStrings().Export))
|
||||||
|
action_list.remove_action(self.toolsReindexItem,
|
||||||
|
unicode(UiStrings().Tools))
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
|
|
|
@ -136,11 +136,11 @@ class SongUsagePlugin(Plugin):
|
||||||
self.setButtonState()
|
self.setButtonState()
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.songUsageStatus,
|
action_list.add_action(self.songUsageStatus,
|
||||||
translate('SongUsagePlugin', 'Song Usage'))
|
unicode(translate('SongUsagePlugin', 'Song Usage')))
|
||||||
action_list.add_action(self.songUsageDelete,
|
action_list.add_action(self.songUsageDelete,
|
||||||
translate('SongUsagePlugin', 'Song Usage'))
|
unicode(translate('SongUsagePlugin', 'Song Usage')))
|
||||||
action_list.add_action(self.songUsageReport,
|
action_list.add_action(self.songUsageReport,
|
||||||
translate('SongUsagePlugin', 'Song Usage'))
|
unicode(translate('SongUsagePlugin', 'Song Usage')))
|
||||||
self.songUsageDeleteForm = SongUsageDeleteForm(self.manager,
|
self.songUsageDeleteForm = SongUsageDeleteForm(self.manager,
|
||||||
self.formparent)
|
self.formparent)
|
||||||
self.songUsageDetailForm = SongUsageDetailForm(self, self.formparent)
|
self.songUsageDetailForm = SongUsageDetailForm(self, self.formparent)
|
||||||
|
@ -157,11 +157,11 @@ class SongUsagePlugin(Plugin):
|
||||||
self.songUsageMenu.menuAction().setVisible(False)
|
self.songUsageMenu.menuAction().setVisible(False)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.remove_action(self.songUsageStatus,
|
action_list.remove_action(self.songUsageStatus,
|
||||||
translate('SongUsagePlugin', 'Song Usage'))
|
unicode(translate('SongUsagePlugin', 'Song Usage')))
|
||||||
action_list.remove_action(self.songUsageDelete,
|
action_list.remove_action(self.songUsageDelete,
|
||||||
translate('SongUsagePlugin', 'Song Usage'))
|
unicode(translate('SongUsagePlugin', 'Song Usage')))
|
||||||
action_list.remove_action(self.songUsageReport,
|
action_list.remove_action(self.songUsageReport,
|
||||||
translate('SongUsagePlugin', 'Song Usage'))
|
unicode(translate('SongUsagePlugin', 'Song Usage')))
|
||||||
self.songUsageActiveButton.hide()
|
self.songUsageActiveButton.hide()
|
||||||
# stop any events being processed
|
# stop any events being processed
|
||||||
self.songUsageActive = False
|
self.songUsageActive = False
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1040
resources/i18n/et.ts
1040
resources/i18n/et.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue