* src/edit_person.glade: Add from file and Add from database buttons.
* src/EditPerson.py (__init__): Add handler for a new button. * src/ImageSelect.py (Gallery.on_select_photo_clicked): Add function. * src/marriage.glade: Add from file and Add from database buttons. * src/Marriage.py (__init__): Add handler for a new button. * src/gramps.glade (sourceEditor): Add from file and Add from database buttons. * src/EditSource.py (__init__): Add handler for a new button. * src/places.glade: Add from file and Add from database buttons. * src/EditPlace.py (__init__): Add handler for a new button. svn: r2511
This commit is contained in:
@@ -51,6 +51,7 @@ import Plugins
|
||||
import RelLib
|
||||
import RelImage
|
||||
import ListModel
|
||||
import SelectObject
|
||||
import grampslib
|
||||
|
||||
from QuestionDialog import ErrorDialog
|
||||
@@ -551,6 +552,22 @@ class Gallery(ImageSelect):
|
||||
which photo they want."""
|
||||
self.create_add_dialog()
|
||||
|
||||
def on_select_photo_clicked(self,obj):
|
||||
"""User wants to add a new object that is already in a database.
|
||||
Create a dialog to find out which object they want."""
|
||||
|
||||
s_o = SelectObject.SelectObject(self.db,_("Select an Object"))
|
||||
object = s_o.run()
|
||||
if not object:
|
||||
return
|
||||
oref = RelLib.ObjectRef()
|
||||
oref.setReference(object)
|
||||
self.dataobj.addPhoto(oref)
|
||||
self.add_thumbnail(oref)
|
||||
|
||||
self.parent.lists_changed = 1
|
||||
self.load_images()
|
||||
|
||||
def on_delete_photo_clicked(self, obj):
|
||||
"""User wants to delete a new photo. Remove it from the displayed
|
||||
thumbnails, and remove it from the dataobj photo list."""
|
||||
|
Reference in New Issue
Block a user