| | 35 | |
| | 36 | def add(self,title,searchMethod, args) : |
| | 37 | #TODO : do not forget to also add the bookmarks to |
| | 38 | #the stored bookmarks. (sync with storage) |
| | 39 | self.listing.insert_before(None, [title, searchMethod, args]) |
| | 40 | |
| | 41 | def delete(self, to_delete) : |
| | 42 | #TODO : do not forget to also remove the bookmarks from |
| | 43 | #the stored bookmarks. (sync with storage) |
| | 44 | self.listing.remove(to_delete) |
| | 45 | |
| | 46 | # this function returns two strings in a tuple : |
| | 47 | # [0] is the "nice" title of the displayed bug. |
| | 48 | # [1] is the hacky name with all needed informations |
| | 49 | def makeTitle(self, search_type, args) : |
| | 50 | zename='' |
| | 51 | title='' |
| | 52 | if search_type == 1 : |
| | 53 | title = "bug #%s"%args |
| | 54 | zename= "%s\n\n1\n\n%s" %(title,args) |
| | 55 | elif search_type == 2 : |
| | 56 | title = "%s" %args |
| | 57 | zename = "%s\n\n2\n\n%s"%(title,args) |
| | 58 | elif search_type == 3 : |
| | 59 | array= args.split("\n",1) |
| | 60 | title = "(%s) %s"%(array[0],array[1]) |
| | 61 | zename = "%s\n\n3\n\n%s"%(title,args) |
| | 62 | return [title, zename] |