Changeset 35 for conseil.py
- Timestamp:
- 07/10/06 16:22:28 (2 years ago)
- Files:
-
- 1 modified
-
conseil.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
conseil.py
r33 r35 37 37 "on_bookmarks_row_activated": self.bookmarkClicked, 38 38 "on_addBookmark_clicked" : self.addBookmark_clicked, 39 "on_bookmarks_button_press_event" : self.bookmarks_button_press } 39 "on_bookmarks_button_press_event" : self.bookmarks_button_press, 40 "on_quitter1_activate": gtk.main_quit, 41 "on_importer_activate" : self.import_bookmarks } 40 42 self.wTree.signal_autoconnect(dic) 41 43 #Wich BTS are we using ? … … 63 65 def __edited_callback(self, cellrenderertext, path, new_text) : 64 66 self.bookmarks.rename(path,new_text) 67 68 def import_bookmarks(self,a) : 69 def callback(dial,zeid,bmarks): 70 if zeid == -5 : 71 if bmarks.import_file(dial.get_filename()) == 0 : 72 print "Not valid Conseil XML file" 73 dial.destroy() 74 else : 75 dial.destroy() 76 dialog = gtk.FileChooserDialog() 77 cancel_button = dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) 78 ok_button = dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 79 ok_button.grab_default() 80 dialog.connect("response", callback, self.bookmarks) 81 dialog.show() 65 82 66 83 # This function initialize an empty result tree
