/[ascend]/trunk/pygtk/canvas/obrowser.py
ViewVC logotype

Diff of /trunk/pygtk/canvas/obrowser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1964 by jpye, Mon Dec 1 03:00:25 2008 UTC revision 1965 by jpye, Mon Dec 1 03:07:20 2008 UTC
# Line 30  class Browser: Line 30  class Browser:
30                  _path = self.treestore.get_path( _piter )                  _path = self.treestore.get_path( _piter )
31                  self.otank[ _path ] = (_name, v)                  self.otank[ _path ] = (_name, v)
32              return              return
33            elif hasattr(value,'__getitem__') and hasattr(value,'__len__'):
34                keys = range(len(value))
35          elif hasattr(value,"__iter__"):          elif hasattr(value,"__iter__"):
36              # handle 'set' objects...              # handle 'set' objects...
37              for v in value:              for v in value:
# Line 38  class Browser: Line 40  class Browser:
40                  _path = self.treestore.get_path(_piter)                  _path = self.treestore.get_path(_piter)
41                  self.otank[_path] = (_name,v)                  self.otank[_path] = (_name,v)
42              return              return
43          elif hasattr(value,'__len__'):  
             keys = range(len(value))  
44          for key in keys:          for key in keys:
45              _name = "[%s]"%str(key)              _name = "[%s]"%str(key)
46              _piter = self.make_row( piter, _name, value[key] )              _piter = self.make_row( piter, _name, value[key] )
# Line 72  class Browser: Line 73  class Browser:
73              gtk.main_quit()              gtk.main_quit()
74          return False          return False
75    
76      def __init__(self, name, value):      def __init__(self, name, value, quit):
77          self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)          self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
78          self.window.set_title("Browser")          self.window.set_title("Browser")
79          self.window.set_size_request(512, 320)          self.window.set_size_request(512, 320)

Legend:
Removed from v.1964  
changed lines
  Added in v.1965

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22