diff frontends/primitivus/files_management.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 d6c0c5dca9b9
children
line wrap: on
line diff
--- a/frontends/primitivus/files_management.py	Wed Aug 18 22:34:35 2010 +0800
+++ b/frontends/primitivus/files_management.py	Thu Aug 19 21:11:22 2010 +0800
@@ -106,13 +106,13 @@
         directories.sort()
         files.sort()
         if os.path.abspath(path)!='/' and os.path.abspath(path) != '//':
-            previous_wid = custom_widgets.ClickableText('..',default_attr='directory')
+            previous_wid = custom_widgets.ClickableText(('directory','..'))
             urwid.connect_signal(previous_wid,'click',self.onPreviousDir)
             self.files_list.append(previous_wid)
         for directory in directories:
             if directory.startswith('.') and not self.show_hidden:
                 continue
-            dir_wid = custom_widgets.ClickableText(directory,default_attr='directory')
+            dir_wid = custom_widgets.ClickableText(('directory',directory))
             urwid.connect_signal(dir_wid,'click',self.onDirClick)
             self.files_list.append(dir_wid)
         self.files_list.append(urwid.AttrMap(urwid.Divider('-'),'separator'))