* 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:
Alex Roitman
2003-12-12 05:36:38 +00:00
parent e3251b9966
commit 0f273ef5ea
10 changed files with 125 additions and 29 deletions

View File

@@ -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."""