- clear search edit line when starting the wizard again

- changed the "uncheck all" and "check all" buttons check/uncheck only those songs which are currently visible. This enables the user to perform more advanced searches.

bzr-revno: 1308
This commit is contained in:
Andreas Preikschat 2011-02-17 17:40:12 +00:00 committed by Jon Tibble
commit 0bc97a1978

View File

@ -252,6 +252,7 @@ class SongExportForm(OpenLPWizard):
self.availableListWidget.clear() self.availableListWidget.clear()
self.selectedListWidget.clear() self.selectedListWidget.clear()
self.directoryLineEdit.clear() self.directoryLineEdit.clear()
self.searchLineEdit.clear()
# Load the list of songs. # Load the list of songs.
Receiver.send_message(u'cursor_busy') Receiver.send_message(u'cursor_busy')
songs = self.plugin.manager.get_all_objects(Song) songs = self.plugin.manager.get_all_objects(Song)
@ -340,19 +341,21 @@ class SongExportForm(OpenLPWizard):
def onUncheckButtonClicked(self): def onUncheckButtonClicked(self):
""" """
The *uncheckButton* has been clicked. Set all songs unchecked. The *uncheckButton* has been clicked. Set all visible songs unchecked.
""" """
for row in range(self.availableListWidget.count()): for row in range(self.availableListWidget.count()):
item = self.availableListWidget.item(row) item = self.availableListWidget.item(row)
item.setCheckState(QtCore.Qt.Unchecked) if not item.isHidden():
item.setCheckState(QtCore.Qt.Unchecked)
def onCheckButtonClicked(self): def onCheckButtonClicked(self):
""" """
The *checkButton* has been clicked. Set all songs checked. The *checkButton* has been clicked. Set all visible songs checked.
""" """
for row in range(self.availableListWidget.count()): for row in range(self.availableListWidget.count()):
item = self.availableListWidget.item(row) item = self.availableListWidget.item(row)
item.setCheckState(QtCore.Qt.Checked) if not item.isHidden():
item.setCheckState(QtCore.Qt.Checked)
def onDirectoryButtonClicked(self): def onDirectoryButtonClicked(self):
""" """