diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 9dc8637cc..b93909322 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,10 @@ +2004-02-21 Alex Roitman + * src/ImageSelect.py: Corrections. + * src/RelLib.py: Corrections. + * src/Sources.py: Corrections. + * src/gramps_main.py: Corrections. + * src/Bookmarks.py: Corrections. + 2004-02-20 Alex Roitman * src/EditPerson.py: Corrections. * src/EditSource.py: Use parent class. Use windows menu. diff --git a/gramps2/src/Bookmarks.py b/gramps2/src/Bookmarks.py index eb2fd6eb5..9db898cb9 100644 --- a/gramps2/src/Bookmarks.py +++ b/gramps2/src/Bookmarks.py @@ -49,7 +49,7 @@ from gettext import gettext as _ class Bookmarks : "Handle the bookmarks interface for Gramps" - def __init__(self,bookmarks,menu,callback): + def __init__(self,db,bookmarks,menu,callback): """ Creates a the bookmark editor @@ -57,6 +57,7 @@ class Bookmarks : menu - parent menu to attach users callback - task to connect to the menu item as a callback """ + self.db = db self.menu = menu self.bookmarks = bookmarks self.callback = callback @@ -81,8 +82,9 @@ class Bookmarks : self.bookmarks.append(person) self.redraw() - def add_to_menu(self,person): + def add_to_menu(self,person_id): """adds a person's name to the drop down menu""" + person = self.db.find_person_from_id(person_id) item = gtk.MenuItem(person.get_primary_name().get_name()) item.connect("activate", self.callback, person) item.show() diff --git a/gramps2/src/ImageSelect.py b/gramps2/src/ImageSelect.py index a5b5a8572..b472116e2 100644 --- a/gramps2/src/ImageSelect.py +++ b/gramps2/src/ImageSelect.py @@ -277,6 +277,7 @@ class Gallery(ImageSelect): """ Handle resize events over the canvas, redrawing if the size changes """ + pass def on_drag_begin(self,obj,context): if const.dnd_images: @@ -562,7 +563,7 @@ class Gallery(ImageSelect): selection_data.set(selection_data.target, 8, id[4]) self.drag_item = None - def on_add_media_object_clicked(self, obj): + def on_add_photo_clicked(self, obj): """User wants to add a new photo. Create a dialog to find out which photo they want.""" self.create_add_dialog() diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index 470e34edf..b5598360a 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -2736,7 +2736,7 @@ class GrampsDB: def find_event_from_id(self,val): """finds a Family in the database from the passed gramps' ID. If no such Family exists, a new Family is added to the database.""" -# data = self.event_map.get(str(val)) + data = self.event_map.get(str(val)) if data: event = Event() event.unserialize(data) diff --git a/gramps2/src/Sources.py b/gramps2/src/Sources.py index 9b3344ff5..7546a75e1 100644 --- a/gramps2/src/Sources.py +++ b/gramps2/src/Sources.py @@ -331,7 +331,6 @@ class SourceEditor: def on_delete_event(self,obj,b): self.close_child_windows() - self.win_parent.child_windows.remove(self) self.remove_itself_from_menu() def close(self,obj): @@ -407,7 +406,7 @@ class SourceEditor: self.author_field.set_text("") self.pub_field.set_text("") - values = self.db.get_source_map().values() + values = self.db.source_map.values() values.sort(by_title) sel_child = None diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 5da6c39d7..80d139d2b 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -1764,7 +1764,7 @@ class Gramps: return self.post_load(name) def setup_bookmarks(self): - self.bookmarks = Bookmarks.Bookmarks(self.db.get_bookmarks(), + self.bookmarks = Bookmarks.Bookmarks(self.db,self.db.get_bookmarks(), self.gtop.get_widget("jump_to"), self.bookmark_callback)