# HG changeset patch # User Goffi # Date 1318101281 -7200 # Node ID d34f2b0f68d3b36eaf803e6519a427bd85914110 # Parent c416f0e4284415827c4c798a5c039d0d5d5dc009 urwid 1.0.0 update: fixed missing is_mouse_press diff -r c416f0e42844 -r d34f2b0f68d3 urwid_satext/sat_widgets.py --- a/urwid_satext/sat_widgets.py Sun Oct 02 19:12:40 2011 +0200 +++ b/urwid_satext/sat_widgets.py Sat Oct 08 21:14:41 2011 +0200 @@ -24,6 +24,9 @@ import encodings utf8decode = lambda s: encodings.codecs.utf_8_decode(s)[0] +from urwid.util import is_mouse_press #XXX: is_mouse_press is not include in urwid in 1.0.0 + + class Password(urwid.Edit): """Edit box which doesn't show what is entered (show '*' or other char instead)""" @@ -231,7 +234,7 @@ return key def mouse_event(self, size, event, button, x, y, focus): - if urwid.is_mouse_press(event) and button == 1: + if is_mouse_press(event) and button == 1: self.setState(not self.__selected) return True @@ -865,7 +868,7 @@ def mouse_event(self, size, event, button, x, y, focus): (maxcol,)=size - if urwid.is_mouse_press(event) and button == 1: + if is_mouse_press(event) and button == 1: _prev,_next,start_wid,end_wid,cols_left = self.__calculate_limits(size) if x==0 and _prev: self.keypress(size,'left')