This commit is contained in:
Andreas Preikschat 2013-04-18 11:27:11 +02:00
parent c13c0a0474
commit d002cb383e
5 changed files with 7 additions and 7 deletions

View File

@ -424,7 +424,7 @@ class MediaManagerItem(QtGui.QWidget):
"""
raise NotImplementedError(u'MediaManagerItem.on_delete_click needs to be defined by the plugin')
def onFocus(self):
def on_focus(self):
"""
Run when a tab in the media manager gains focus. This gives the media
item a chance to focus any elements it wants to.

View File

@ -560,7 +560,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
"""
widget = self.media_tool_box.widget(index)
if widget:
widget.onFocus()
widget.on_focus()
def version_notice(self, version):
"""

View File

@ -250,7 +250,7 @@ class BibleMediaItem(MediaManagerItem):
self.quickSearchEdit.returnPressed.connect(self.onQuickSearchButton)
self.searchTabBar.currentChanged.connect(self.onSearchTabBarCurrentChanged)
def onFocus(self):
def on_focus(self):
if self.quickTab.isVisible():
self.quickSearchEdit.setFocus()
else:

View File

@ -178,7 +178,7 @@ class CustomMediaItem(MediaManagerItem):
self.plugin.manager.delete_object(CustomSlide, id)
self.on_search_text_button_clicked()
def onFocus(self):
def on_focus(self):
self.search_text_edit.setFocus()
def generate_slide_data(self, service_item, item=None, xmlVersion=False,

View File

@ -112,7 +112,7 @@ class SongMediaItem(MediaManagerItem):
text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=u':/general/general_clone.png',
triggers=self.onCloneClick)
def onFocus(self):
def on_focus(self):
self.search_text_edit.setFocus()
def config_update(self):
@ -120,7 +120,7 @@ class SongMediaItem(MediaManagerItem):
Is triggered when the songs config is updated
"""
log.debug(u'config_updated')
self.searchAsYouType = Settings().value(self.settings_section + u'/search as type')
self.search_as_you_type = Settings().value(self.settings_section + u'/search as type')
self.updateServiceOnEdit = Settings().value(self.settings_section + u'/update service on edit')
self.addSongFromService = Settings().value(self.settings_section + u'/add song from service',)
@ -279,7 +279,7 @@ class SongMediaItem(MediaManagerItem):
If search as type enabled invoke the search on each key press. If the Lyrics are being searched do not start
till 7 characters have been entered.
"""
if self.searchAsYouType:
if self.search_as_you_type:
search_length = 1
if self.search_text_edit.current_search_type() == SongSearch.Entire:
search_length = 4