primitivus: contact list enhancement
- primitivus: contact list now display groups and sexy name (instead of bare jid) - primitivus: contact list now show an alert when somebody want to contact you, and its chat window is not on the screen - primitivus: cursor is now visible when going to chat window (useful to go back in logs)
This commit is contained in:
parent
61f6edae54
commit
5f3463b147
1 changed files with 180 additions and 50 deletions
|
|
@ -48,7 +48,14 @@ class ChatText(urwid.FlowWidget):
|
|||
return self.display_widget(size, focus).rows(size, focus)
|
||||
|
||||
def render(self, size, focus=False):
|
||||
return self.display_widget(size, focus).render(size, focus)
|
||||
canvas = urwid.CompositeCanvas(self.display_widget(size, focus).render(size, focus))
|
||||
if focus:
|
||||
canvas.set_cursor(self.get_cursor_coords(size))
|
||||
return canvas
|
||||
|
||||
def get_cursor_coords(self, size):
|
||||
#(maxcol,) = size
|
||||
return 0, 0
|
||||
|
||||
def display_widget(self, size, focus):
|
||||
my_mess = (self.from_jid.resource == self.parent.nick) if self.parent.type == "group" else (self.from_jid.short == self.my_jid.short) #mymess = True if message comes from local user
|
||||
|
|
@ -134,7 +141,7 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
|
||||
|
||||
def __buildPresentList(self):
|
||||
self.present_wid = custom_widgets.GenericList([],option_type = custom_widgets.UnselectableText)
|
||||
self.present_wid = custom_widgets.GenericList([],option_type = custom_widgets.ClickableText)
|
||||
return self.present_wid
|
||||
|
||||
def __appendPresentPanel(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue