Changeset 15 for conseil.py
- Timestamp:
- 07/05/06 11:26:25 (3 years ago)
- Files:
-
- 1 modified
-
conseil.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
conseil.py
r14 r15 32 32 "on_window1_destroy" : gtk.main_quit, 33 33 "on_bookmarks_row_activated": self.bookmarkClicked, 34 "on_addBookmark_clicked" : self.addBookmark_clicked } 34 "on_addBookmark_clicked" : self.addBookmark_clicked, 35 "on_bookmarks_button_press_event" : self.bookmarks_button_press } 35 36 self.wTree.signal_autoconnect(dic) 36 37 #Wich BTS are we using ? … … 88 89 return listing 89 90 91 92 def bookmarks_button_press(self,widget, event) : 93 #middle click, we open the bug 94 if event.button == 2 : 95 #self.bookmarkClicked() 96 print "TODO : open the bug on middle click" 97 #right click menu 98 elif event.button == 3 : 99 # callback for delete right click menu 100 def del_callback(menuitem) : 101 model = widget.get_model() 102 zetuple = widget.get_selection().get_selected() 103 model.remove(zetuple[1]) 104 #TODO : do not forget to also remove the bookmarks from 105 #the stored bookmarks. (sync with storage) 106 #callback for rename TODO 107 def ren_callback(menuitem) : 108 print "TODO rename function" 109 #définition du right click menu 110 # TODO : use a widget as the MenuItem 111 delete = gtk.MenuItem("delete") 112 delete.connect("activate", del_callback) 113 delete.show() 114 rename = gtk.MenuItem("rename") 115 rename.connect("activate", ren_callback) 116 rename.show() 117 menu = gtk.Menu() 118 menu.append(delete) 119 menu.append(rename) 120 menu.popup(None, None, None, event.button, event.time) 121 90 122 91 123 def bookmarkClicked(widget, path, view_column,user_param1): … … 116 148 def addBookmark(self,title,searchMethod, args) : 117 149 self.bookmarks.insert_before(None, [title, searchMethod, args]) 150 # TODO : do not forget to also add the bookmark in the store ! 118 151 119 152 … … 139 172 #First, we ask for the result as it can takes some times 140 173 tree=self.__treeInit__() 141 handler =tree.connect("row-activated", self.__row_clicked, tree.get_selection())174 tree.connect("row-activated", self.__row_clicked, tree.get_selection()) 142 175 if search_type == 3 : 143 176 array= args.split("\n",1)
