Legend:
- Unmodified
- Added
- Removed
-
page.py
r31 r32 16 16 # spank me ! 17 17 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 24 19 25 20 def read_descr(string) : … … 30 25 class page : 31 26 32 def __init__(self, zewidget, search_type,args) :27 def __init__(self, zewidget, args) : 33 28 self.widget = zewidget 34 temp = self.__makeTitle( search_type,args)29 temp = self.__makeTitle(args) 35 30 self.title = temp[0] 36 31 self.descr = temp[1] … … 49 44 50 45 ############## here start how to store description in a string ############## 46 ############## We also define tab title ##################################### 51 47 52 48 … … 54 50 # [0] is the "nice" title of the displayed bug. 55 51 # [1] is the hacky name with all needed informations 56 def __makeTitle(self, search_type,args) :52 def __makeTitle(self, args) : 57 53 zename='' 58 54 title='' … … 60 56 bmark = doc.createElement("bookmark") 61 57 doc.appendChild(bmark) 58 search_type = args["method"] 62 59 if search_type == 1 : 63 60 bmark.setAttribute("type","1") 64 title = "bug #%s"%args 61 bug = args["bug"] 62 title = "bug #%s"%bug 65 63 bmark.setAttribute("title", title) 66 64 node = doc.createElement("bug") 67 node_text = doc.createTextNode( args)65 node_text = doc.createTextNode(bug) 68 66 node.appendChild(node_text) 69 67 bmark.appendChild(node)
