* 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 45a3f7a364
commit 7d779c25a8
10 changed files with 125 additions and 29 deletions

View File

@ -7,6 +7,17 @@
* src/docgen/HtmlDoc.py (write_note): Use styles for preformatted note.
* src/edit_person.glade: Add tooltips and hotkeys to the radiobuttons.
* 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.
2003-12-10 Don Allingham <dallingham@users.sourceforge.net>
* src/GrampsCfg.py: Make sure to return "BOTH" if the gnome
toolbar gconf entry is not set. Appears that this can happen

View File

@ -349,6 +349,7 @@ class EditPerson:
"on_add_attr_clicked" : self.on_add_attr_clicked,
"on_add_url_clicked" : self.on_add_url_clicked,
"on_addphoto_clicked" : self.gallery.on_add_photo_clicked,
"on_selectphoto_clicked" : self.gallery.on_select_photo_clicked,
"on_aka_delete_clicked" : self.on_aka_delete_clicked,
"on_aka_update_clicked" : self.on_aka_update_clicked,
"on_apply_person_clicked" : self.on_apply_person_clicked,

View File

@ -156,9 +156,13 @@ class EditPlace:
self.note_buffer.set_text(place.getNote())
Utils.bold_label(self.notes_label)
if self.place.getPhotoList():
Utils.bold_label(self.gallery_label)
self.top_window.signal_autoconnect({
"on_switch_page" : self.on_switch_page,
"on_addphoto_clicked" : self.glry.on_add_photo_clicked,
"on_selectphoto_clicked" : self.glry.on_select_photo_clicked,
"on_deletephoto_clicked" : self.glry.on_delete_photo_clicked,
"on_edit_photo_clicked" : self.glry.on_edit_photo_clicked,
"on_edit_properties_clicked": self.glry.popup_change_description,

View File

@ -86,9 +86,13 @@ class EditSource:
self.notes_buffer.set_text(source.getNote())
Utils.bold_label(self.notes_label)
if self.source.getPhotoList():
Utils.bold_label(self.gallery_label)
self.top_window.signal_autoconnect({
"on_switch_page" : self.on_switch_page,
"on_addphoto_clicked" : self.gallery.on_add_photo_clicked,
"on_selectphoto_clicked" : self.gallery.on_select_photo_clicked,
"on_deletephoto_clicked" : self.gallery.on_delete_photo_clicked,
"on_edit_properties_clicked": self.gallery.popup_change_description,
"on_sourceEditor_help_clicked" : self.on_help_clicked,

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

View File

@ -107,6 +107,7 @@ class Marriage:
"on_add_attr_clicked" : self.on_add_attr_clicked,
"on_delete_attr_clicked" : self.on_delete_attr_clicked,
"on_addphoto_clicked" : self.gallery.on_add_photo_clicked,
"on_selectphoto_clicked" : self.gallery.on_select_photo_clicked,
"on_close_marriage_editor" : self.on_close_marriage_editor,
"on_delete_event" : self.on_delete_event,
"on_lds_src_clicked" : self.lds_src_clicked,

View File

@ -3827,10 +3827,10 @@ kjhkjhk</property>
<child>
<widget class="GtkButton" id="button76">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Place new media object in this gallery</property>
<property name="tooltip" translatable="yes">Add a new media object to the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Add...</property>
<property name="label" translatable="yes">_Add from file...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_addphoto_clicked" object="editPerson"/>
@ -3842,6 +3842,24 @@ kjhkjhk</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button135">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Select an existing media object from the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Add from _database...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_selectphoto_clicked" object="editPerson" last_modification_time="Fri, 12 Dec 2003 04:11:28 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="image_edit_btn">
<property name="visible">True</property>
@ -3876,10 +3894,6 @@ kjhkjhk</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -5965,10 +5965,10 @@
<child>
<widget class="GtkButton" id="add_photo">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Place new media object in this gallery</property>
<property name="tooltip" translatable="yes">Add a new media object to the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Add...</property>
<property name="label" translatable="yes">_Add from file...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_addphoto_clicked" object="sourceEditor"/>
@ -5980,16 +5980,32 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="button169">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Select an existing media object from the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Add from _database...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_selectphoto_clicked" object="sourceEditor" last_modification_time="Fri, 12 Dec 2003 05:21:39 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="edit_photo">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Edit the properties of the selected object</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<accessibility>
<atkproperty name="AtkObject::accessible_description" translatable="yes">Edit the properties of the selected object</atkproperty>
</accessibility>
</widget>
<packing>
<property name="padding">0</property>
@ -6004,7 +6020,7 @@
<property name="tooltip" translatable="yes">Remove selected object from this gallery only</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Delete</property>
<property name="label" translatable="yes">_Remove</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_deletephoto_clicked" object="sourceEditor"/>
@ -6015,10 +6031,6 @@
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -1478,10 +1478,10 @@
<child>
<widget class="GtkButton" id="button100">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Place new media object in this gallery</property>
<property name="tooltip" translatable="yes">Add a new media object to the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Add...</property>
<property name="label" translatable="yes">_Add from file...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_addphoto_clicked" object="marriageEditor"/>
@ -1493,9 +1493,28 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="button120">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Select an existing media object from the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Add from _database...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_selectphoto_clicked" object="marriageEditor" last_modification_time="Fri, 12 Dec 2003 04:57:01 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button117">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Edit the properties of the selected objects</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
@ -1515,7 +1534,7 @@
<property name="tooltip" translatable="yes">Remove selected object from this gallery only</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Delete</property>
<property name="label" translatable="yes">_Remove</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_deletephoto_clicked" object="marriageEditor"/>
@ -1526,10 +1545,6 @@
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -1445,9 +1445,10 @@
<child>
<widget class="GtkButton" id="add_photo">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Add a new media object to the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Add...</property>
<property name="label" translatable="yes">_Add from file...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_addphoto_clicked" object="placeEditor"/>
@ -1459,9 +1460,28 @@
</packing>
</child>
<child>
<widget class="GtkButton" id="button136">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Select an existing media object from the database and place it in this gallery</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Add from _database...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_selectphoto_clicked" object="placeEditor" last_modification_time="Fri, 12 Dec 2003 05:12:18 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button134">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Edit the properties of the selected object</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
@ -1478,9 +1498,10 @@
<child>
<widget class="GtkButton" id="delete_photo">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Remove selected object from this gallery only</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Delete</property>
<property name="label" translatable="yes">_Remove</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_deletephoto_clicked" object="placeEditor"/>
@ -1491,10 +1512,6 @@
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>