diff frontends/primitivus/contact_list.py @ 192:879beacb8e16

Primitivus: major changes in SelectableText, menu can now be used with mouse, TabsContainer show wich tab is selected - SelectableText is a WidgetWrap of urwid.Text, and manage attributes and complexe combination like urwid.Text (list of tuples (attribute,text)) - Menu now use a ColumnsRoller, and can't anymore be displayed on 2 rows, avoiding potential bug when display MenuBox - Mouse can be used in menu. Right click on MenuBox make it disappear - Tab container now display which tab is selected by putting a 'title' attribute on the corresponding button /!\ as SelectableText is heavily used, there can be regressions
author Goffi <goffi@goffi.org>
date Thu, 19 Aug 2010 21:11:22 +0800
parents 8ea1510d474b
children 9e7bc7f09221
line wrap: on
line diff
--- a/frontends/primitivus/contact_list.py	Wed Aug 18 22:34:35 2010 +0800
+++ b/frontends/primitivus/contact_list.py	Thu Aug 19 21:11:22 2010 +0800
@@ -95,7 +95,8 @@
             nick = self.CM.getAttr(jid,'nick')
             display = nick or name or jid.node or jid.short
             header = '(*) ' if contact in self.alert_jid else ''
-            widget = custom_widgets.SelectableText(display, selected = contact==self.selected, header=header, data=contact)
+            widget = custom_widgets.SelectableText(display, selected = contact==self.selected, header=header)
+            widget.data = contact
             if contact in self.alert_jid:
                 widget.setAttribute('default','alert')
             content.append(widget)