Changeset 32 for page.py

Show
Ignore:
Timestamp:
07/09/06 14:53:14 (2 years ago)
Author:
ploum
Message:

#11 Bookmarks are not stored

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • page.py

    r31 r32  
    1616        # spank me ! 
    1717        string = widget.get_name() 
    18         # this must be modified if we change the string representation 
    19         doc = xml.dom.minidom.parseString(string) 
    20         bmark = doc.getElementsByTagName("bookmark")[0] 
    21         stype = int(bmark.getAttribute("type")) 
    22         title = bmark.getAttribute("title") 
    23         return [title, stype, string] 
     18        return string 
    2419 
    2520def read_descr(string) : 
     
    3025class page : 
    3126 
    32         def __init__(self, zewidget, search_type, args) : 
     27        def __init__(self, zewidget, args) : 
    3328                self.widget = zewidget 
    34                 temp = self.__makeTitle(search_type, args) 
     29                temp = self.__makeTitle(args) 
    3530                self.title = temp[0] 
    3631                self.descr = temp[1] 
     
    4944 
    5045############## here start how to store description in a string ############## 
     46############## We also define tab title ##################################### 
    5147 
    5248 
     
    5450        # [0] is the "nice" title of the displayed bug. 
    5551        # [1] is the hacky name with all needed informations 
    56         def __makeTitle(self, search_type, args) : 
     52        def __makeTitle(self, args) : 
    5753                zename='' 
    5854                title='' 
     
    6056                bmark = doc.createElement("bookmark") 
    6157                doc.appendChild(bmark) 
     58                search_type = args["method"] 
    6259                if search_type == 1 : 
    6360                        bmark.setAttribute("type","1") 
    64                         title = "bug #%s"%args 
     61                        bug = args["bug"] 
     62                        title = "bug #%s"%bug 
    6563                        bmark.setAttribute("title", title) 
    6664                        node = doc.createElement("bug") 
    67                         node_text = doc.createTextNode(args) 
     65                        node_text = doc.createTextNode(bug) 
    6866                        node.appendChild(node_text) 
    6967                        bmark.appendChild(node)