* src/ImageSelect.py: Corrections.
* src/RelLib.py: Corrections. * src/Sources.py: Corrections. * src/gramps_main.py: Corrections. * src/Bookmarks.py: Corrections. svn: r2886
This commit is contained in:
parent
71f8f5476b
commit
976e854a2f
@ -1,3 +1,10 @@
|
||||
2004-02-21 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* 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 <shura@alex.neuro.umn.edu>
|
||||
* src/EditPerson.py: Corrections.
|
||||
* src/EditSource.py: Use parent class. Use windows menu.
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user