forked from openlp/openlp
More busy and sort changes
bzr-revno: 1574
This commit is contained in:
commit
fe4b5fb147
@ -1109,6 +1109,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
Send the current item to the Preview slide controller
|
Send the current item to the Preview slide controller
|
||||||
"""
|
"""
|
||||||
|
Receiver.send_message(u'cursor_busy')
|
||||||
item, child = self.findServiceItem()
|
item, child = self.findServiceItem()
|
||||||
if self.serviceItems[item][u'service_item'].is_valid:
|
if self.serviceItems[item][u'service_item'].is_valid:
|
||||||
self.mainwindow.previewController.addServiceManagerItem(
|
self.mainwindow.previewController.addServiceManagerItem(
|
||||||
@ -1118,6 +1119,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
translate('OpenLP.ServiceManager', 'Missing Display Handler'),
|
translate('OpenLP.ServiceManager', 'Missing Display Handler'),
|
||||||
translate('OpenLP.ServiceManager', 'Your item cannot be '
|
translate('OpenLP.ServiceManager', 'Your item cannot be '
|
||||||
'displayed as there is no handler to display it'))
|
'displayed as there is no handler to display it'))
|
||||||
|
Receiver.send_message(u'cursor_normal')
|
||||||
|
|
||||||
def getServiceItem(self):
|
def getServiceItem(self):
|
||||||
"""
|
"""
|
||||||
@ -1150,6 +1152,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
return
|
return
|
||||||
if row != -1:
|
if row != -1:
|
||||||
child = row
|
child = row
|
||||||
|
Receiver.send_message(u'cursor_busy')
|
||||||
if self.serviceItems[item][u'service_item'].is_valid:
|
if self.serviceItems[item][u'service_item'].is_valid:
|
||||||
self.mainwindow.liveController.addServiceManagerItem(
|
self.mainwindow.liveController.addServiceManagerItem(
|
||||||
self.serviceItems[item][u'service_item'], child)
|
self.serviceItems[item][u'service_item'], child)
|
||||||
@ -1169,6 +1172,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
translate('OpenLP.ServiceManager', 'Your item cannot be '
|
translate('OpenLP.ServiceManager', 'Your item cannot be '
|
||||||
'displayed as the plugin required to display it is missing '
|
'displayed as the plugin required to display it is missing '
|
||||||
'or inactive'))
|
'or inactive'))
|
||||||
|
Receiver.send_message(u'cursor_normal')
|
||||||
|
|
||||||
def remoteEdit(self):
|
def remoteEdit(self):
|
||||||
"""
|
"""
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import locale
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -112,6 +113,10 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
def loadList(self, list, initialLoad=False):
|
def loadList(self, list, initialLoad=False):
|
||||||
if not initialLoad:
|
if not initialLoad:
|
||||||
self.parent.formparent.displayProgressBar(len(list))
|
self.parent.formparent.displayProgressBar(len(list))
|
||||||
|
# Sort the themes by its filename considering language specific
|
||||||
|
# characters. lower() is needed for windows!
|
||||||
|
list.sort(cmp=locale.strcoll,
|
||||||
|
key=lambda filename: os.path.split(unicode(filename))[1].lower())
|
||||||
for imageFile in list:
|
for imageFile in list:
|
||||||
if not initialLoad:
|
if not initialLoad:
|
||||||
self.parent.formparent.incrementProgressBar()
|
self.parent.formparent.incrementProgressBar()
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import locale
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -202,6 +203,10 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.settingsSection, self.getFileList())
|
self.settingsSection, self.getFileList())
|
||||||
|
|
||||||
def loadList(self, list):
|
def loadList(self, list):
|
||||||
|
# Sort the themes by its filename considering language specific
|
||||||
|
# characters. lower() is needed for windows!
|
||||||
|
list.sort(cmp=locale.strcoll,
|
||||||
|
key=lambda filename: os.path.split(unicode(filename))[1].lower())
|
||||||
for file in list:
|
for file in list:
|
||||||
filename = os.path.split(unicode(file))[1]
|
filename = os.path.split(unicode(file))[1]
|
||||||
item_name = QtGui.QListWidgetItem(filename)
|
item_name = QtGui.QListWidgetItem(filename)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import locale
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -161,6 +162,10 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
Receiver.send_message(u'cursor_busy')
|
Receiver.send_message(u'cursor_busy')
|
||||||
if not initialLoad:
|
if not initialLoad:
|
||||||
self.parent.formparent.displayProgressBar(len(files))
|
self.parent.formparent.displayProgressBar(len(files))
|
||||||
|
# Sort the themes by its filename considering language specific
|
||||||
|
# characters. lower() is needed for windows!
|
||||||
|
files.sort(cmp=locale.strcoll,
|
||||||
|
key=lambda filename: os.path.split(unicode(filename))[1].lower())
|
||||||
for file in files:
|
for file in files:
|
||||||
if not initialLoad:
|
if not initialLoad:
|
||||||
self.parent.formparent.incrementProgressBar()
|
self.parent.formparent.incrementProgressBar()
|
||||||
|
Loading…
Reference in New Issue
Block a user