Changeset 29 for page.py

Show
Ignore:
Timestamp:
07/08/06 23:34:03 (2 years ago)
Author:
ploum
Message:

first XML tests. We will store bookmarks in XML

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • page.py

    r28 r29  
    55try: 
    66        import gtk 
    7         import gtk.glade 
    87        import gobject 
    98except: 
    109        sys.exit(1) 
     10 
     11####################### description_in_the_widget_name hack ################## 
     12####################### We want to change this ############################### 
     13 
     14# functions related but not in the object 
     15def tab_descr(widget) : 
     16        # this is part of the ugliest hack 
     17        # spank me ! 
     18        string = widget.get_name() 
     19        # this must be modified if we change the string representation 
     20        array=string.split("\n\n",2) 
     21        return array 
     22 
     23def read_descr(string) : 
     24        # return the widget to open 
     25        # needed when reading bookmarks from file 
     26        print "to implement" 
    1127 
    1228class page : 
     
    2339                # naughty naughty zout ! 
    2440                self.widget.set_name(self.descr) 
     41                # in the future, the idea is to create an invisible widget 
     42                # and put it in a hbox or something with our widget 
     43                # but, as long as no one complains... 
     44 
     45############################################################################# 
     46############### We are in object "page" ##################################### 
     47 
     48############## here start how to store description in a string ############## 
     49 
    2550 
    2651        # this function returns two strings in a tuple : 
     
    4570                return [title, zename] 
    4671 
    47         #def readTitle(self,string) : 
    48         #       array=string.split("\n\n",2) 
    49         #       return array 
     72 
     73############## No need to modify below this line, public methods ############ 
    5074 
    5175        def get_widget(self) : 
     
    5781        def get_title(self) : 
    5882                return self.title 
    59  
    60 # functions related but not in the object 
    61 def tab_descr(widget) : 
    62         # this is part of the ugliest hack 
    63         # spank me ! 
    64         string = widget.get_name() 
    65         array=string.split("\n\n",2) 
    66         return array