# HG changeset patch # User Goffi # Date 1410183745 -7200 # Node ID 8f5afab948a0369e64f456bdd687a17444412d23 # Parent 44fc94b0fe186f8c9224e1c3917cdd58dca9c3d8 NotificationBar focus fix diff -r 44fc94b0fe18 -r 8f5afab948a0 urwid_satext/sat_widgets.py --- a/urwid_satext/sat_widgets.py Mon Sep 08 15:42:25 2014 +0200 +++ b/urwid_satext/sat_widgets.py Mon Sep 08 15:42:25 2014 +0200 @@ -680,6 +680,8 @@ self.progress.set_text('') else: self.progress.set_text(('notifs','%02i%%' % percentage)) + if self.columns.focus != self.progress: + self.columns.focus_position = len(self.columns.contents)-1 self._emit('change') def addPopUp(self, pop_up_widget): @@ -708,6 +710,7 @@ self.notifs.remove(found) self.message.set_text(('notifs',found[1])) self.__modQueue() + self.focus_possition = 1 else: self.message.set_text('') self._emit('change') @@ -729,7 +732,7 @@ return not bool(self.notifs) def canHide(self): - """Return True if there is now important information to show""" + """Return True if there is no important information to show""" return self.isQueueEmpty() and not self.message.get_text() and not self.progress.get_text()