This commit is contained in:
Manuel Cortez 2015-07-03 09:40:44 -05:00
parent c464af83c2
commit a706ebf477
3 changed files with 12 additions and 2 deletions

View File

@ -915,6 +915,7 @@ class Controller(object):
self.view.change_buffer(buff-1) self.view.change_buffer(buff-1)
while self.get_current_buffer().invisible == False: self.skip_buffer(False) while self.get_current_buffer().invisible == False: self.skip_buffer(False)
buffer = self.get_current_buffer() buffer = self.get_current_buffer()
if self.showing == True: buffer.buffer.set_focus_in_list()
try: try:
msg = _(u"%s, %s of %s") % (self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count()) msg = _(u"%s, %s of %s") % (self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count())
except: except:
@ -933,6 +934,7 @@ class Controller(object):
self.view.change_buffer(buff+1) self.view.change_buffer(buff+1)
while self.get_current_buffer().invisible == False: self.skip_buffer(True) while self.get_current_buffer().invisible == False: self.skip_buffer(True)
buffer = self.get_current_buffer() buffer = self.get_current_buffer()
if self.showing == True: buffer.buffer.set_focus_in_list()
try: try:
msg = _(u"%s, %s of %s") % (self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count()) msg = _(u"%s, %s of %s") % (self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count())
except: except:
@ -953,6 +955,7 @@ class Controller(object):
return return
self.view.change_buffer(buff) self.view.change_buffer(buff)
buffer = self.get_current_buffer() buffer = self.get_current_buffer()
if self.showing == True: buffer.buffer.set_focus_in_list()
try: try:
msg = _(u"%s. %s, %s of %s") % (buffer.account, self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count()) msg = _(u"%s. %s, %s of %s") % (buffer.account, self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count())
except: except:
@ -973,6 +976,7 @@ class Controller(object):
return return
self.view.change_buffer(buff) self.view.change_buffer(buff)
buffer = self.get_current_buffer() buffer = self.get_current_buffer()
if self.showing == True: buffer.buffer.set_focus_in_list()
try: try:
msg = _(u"%s. %s, %s of %s") % (buffer.account, self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count()) msg = _(u"%s. %s, %s of %s") % (buffer.account, self.view.get_buffer_text(), buffer.buffer.list.get_selected()+1, buffer.buffer.list.get_count())
except: except:

View File

@ -39,4 +39,7 @@ class basePanel(wx.Panel):
if reversed == False: if reversed == False:
self.list.select_item(self.list.get_count()-1) self.list.select_item(self.list.get_count()-1)
else: else:
self.list.select_item(0) self.list.select_item(0)
def set_focus_in_list(self):
self.list.list.SetFocus()

View File

@ -18,4 +18,7 @@ class eventsPanel(wx.Panel):
if reversed == False: if reversed == False:
self.list.select_item(self.list.get_count()-1) self.list.select_item(self.list.get_count()-1)
else: else:
self.list.select_item(0) self.list.select_item(0)
def set_focus_in_list(self):
self.list.list.SetFocus()