forked from openlp/openlp
Fix check_item_selection
bzr-revno: 879
This commit is contained in:
commit
95945c622f
@ -170,7 +170,7 @@ def check_item_selected(list_widget, message):
|
|||||||
The message to give the user if no item is selected
|
The message to give the user if no item is selected
|
||||||
"""
|
"""
|
||||||
if not list_widget.selectedIndexes():
|
if not list_widget.selectedIndexes():
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(list_widget.parent(),
|
||||||
translate('MediaManagerItem', 'No Items Selected'), message)
|
translate('MediaManagerItem', 'No Items Selected'), message)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -32,7 +32,6 @@ class BaseListWithDnD(QtGui.QListWidget):
|
|||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
QtGui.QListWidget.__init__(self, parent)
|
QtGui.QListWidget.__init__(self, parent)
|
||||||
self.parent = parent
|
|
||||||
# this must be set by the class which is inheriting
|
# this must be set by the class which is inheriting
|
||||||
assert(self.PluginName)
|
assert(self.PluginName)
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ class BibleListView(BaseListWithDnD):
|
|||||||
BaseListWithDnD.__init__(self, parent)
|
BaseListWithDnD.__init__(self, parent)
|
||||||
|
|
||||||
def resizeEvent(self, event):
|
def resizeEvent(self, event):
|
||||||
self.parent.onListViewResize(event.size().width(), event.size().width())
|
self.parent().onListViewResize(event.size().width(),
|
||||||
|
event.size().width())
|
||||||
|
|
||||||
|
|
||||||
class BibleMediaItem(MediaManagerItem):
|
class BibleMediaItem(MediaManagerItem):
|
||||||
|
Loading…
Reference in New Issue
Block a user