projects
/
findit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f85180
)
Added CLI version for files table output
author
Eugene Gagarin
<mosfet07@ya.ru>
Wed, 29 Apr 2009 06:43:00 +0000
(10:43 +0400)
committer
Eugene Gagarin
<mosfet07@ya.ru>
Wed, 29 Apr 2009 06:43:00 +0000
(10:43 +0400)
src/files/outtable.py
patch
|
blob
|
history
diff --git
a/src/files/outtable.py
b/src/files/outtable.py
index
7fc52ad
..
9585470
100755
(executable)
--- a/
src/files/outtable.py
+++ b/
src/files/outtable.py
@@
-23,7
+23,12
@@
#==============================================================================
class Cli_Presentation(object):
#==============================================================================
class Cli_Presentation(object):
- pass
+ def __init__(self, filelist): ###
+ self.toplevel = self.print_results(filelist)
+
+ def print_results(self, filelist):
+ for bsize, path, size in filelist:
+ print '%10d' % bsize, path
#==============================================================================
#==============================================================================
@@
-40,10
+45,6
@@
class Gtk_Presentation(object):
treeview = gtk.TreeView(self.liststore)
treeview = gtk.TreeView(self.liststore)
- # На таблетке не отображаються заголовки столбцов по умолчанию -
- # след строка заставляет их отображаться принудительно
- treeview.set_headers_visible(1)
-
# Создаем и настраиваем колонку с размером файла
size_col = gtk.TreeViewColumn( 'Size')
cell1 = gtk.CellRendererText()
# Создаем и настраиваем колонку с размером файла
size_col = gtk.TreeViewColumn( 'Size')
cell1 = gtk.CellRendererText()
@@
-75,3
+76,15
@@
class Gtk_Presentation(object):
# for path, size, bsize in filelist:
# print path, size, bsize
# self.liststore.append([path, size, bsize])
# for path, size, bsize in filelist:
# print path, size, bsize
# self.liststore.append([path, size, bsize])
+
+#==============================================================================
+
+class Hildon_Presentation(object):
+ def __init__(self, filelist): ###
+ import gtk
+ import gobject
+ import hildon
+
+ # На таблетке не отображаються заголовки столбцов по умолчанию -
+ # след строка заставляет их отображаться принудительно
+ treeview.set_headers_visible(1)