* src/gramps.glade: Typos.

* src/ImageSelect.py: Correctly update property editors on OK
and Cancel.
* src/EventEdit.py: Typo.
* src/Sources.py: Set change flag on deletion of the source reference.
* src/RelLib.py: Add media list into serialization and restore.


svn: r3206
This commit is contained in:
Alex Roitman 2004-06-13 06:18:20 +00:00
parent 02a0fc3072
commit a6bf7bd5a1
5 changed files with 22 additions and 9 deletions

View File

@ -2,6 +2,14 @@
* src/filters/*: removed
* src/plugins/WritePkg.py: brought up to date
2004-06-12 Alex Roitman <shura@alex.neuro.umn.edu>
* src/gramps.glade: Typos.
* src/ImageSelect.py: Correctly update property editors on OK
and Cancel.
* src/EventEdit.py: Typo.
* src/Sources.py: Set change flag on deletion of the source reference.
* src/RelLib.py: Add media list into serialization and restore.
2004-06-09 Don Allingham <dallingham@users.sourceforge.net>
* src/plugins/WriteGedcom.py: brought up to date
* src/gramps_main.py: beta warning

View File

@ -171,7 +171,7 @@ class EventEditor:
self.place_field.set_text(def_placename)
else:
place_id = event.get_place_id()
if place_id:
if not place_id:
place_name = u""
else:
place_name = self.db.try_to_find_place_from_id(place_id).get_title()
@ -333,9 +333,9 @@ class EventEditor:
self.update_event(ename,self.date,eplace_obj,edesc,enote,eformat,
epriv,ecause,trans)
self.db.add_transaction(trans,_("Edit Event"))
self.close(obj,1)
self.parent.redraw_event_list()
self.callback(self.event)
self.close(obj,1)
def update_event(self,name,date,place,desc,note,format,priv,cause,trans):
if place:

View File

@ -239,7 +239,7 @@ class Gallery(ImageSelect):
self.dataobj = dataobj;
self.iconlist = icon_list;
self.root = self.iconlist.root()
self.old_media_list = self.dataobj.get_media_list()[:]
self.old_media_list = [RelLib.MediaRef(ref) for ref in self.dataobj.get_media_list()]
# Local object variables
self.y = 0
@ -697,10 +697,10 @@ class LocalMediaProperties:
self.on_attr_list_select_row,
self.on_update_attr_clicked)
self.slist = self.change_dialog.get_widget("src_slist")
self.slist = self.change_dialog.get_widget("src_list")
self.sources_label = self.change_dialog.get_widget("source_label")
if self.object:
self.srcreflist = self.photo.get_source_references()
self.srcreflist = [RelLib.SourceRef(ref) for ref in self.photo.get_source_references()]
else:
self.srcreflist = []
@ -818,11 +818,14 @@ class LocalMediaProperties:
self.photo.set_note(text)
self.photo.set_privacy(priv)
self.parent.lists_changed = 1
self.parent.parent.lists_changed = 1
if format != self.photo.get_note_format():
self.photo.set_note_format(format)
if self.lists_changed:
self.photo.set_attribute_list(self.alist)
self.photo.set_source_reference_list(self.srcreflist)
self.parent.lists_changed = 1
self.parent.parent.lists_changed = 1
trans = self.db.start_transaction()
self.db.commit_media_object(self.object,trans)
@ -930,7 +933,7 @@ class GlobalMediaProperties:
self.slist = self.change_dialog.get_widget("src_list")
self.sources_label = self.change_dialog.get_widget("sourcesGlobal")
if self.object:
self.srcreflist = self.object.get_source_references()
self.srcreflist = [RelLib.SourceRef(ref) for ref in self.object.get_source_references()]
else:
self.srcreflist = []
@ -1113,6 +1116,7 @@ class GlobalMediaProperties:
self.object.set_note_format(format)
if self.lists_changed:
self.object.set_attribute_list(self.alist)
self.object.set_source_reference_list(self.srcreflist)
if self.update != None:
self.update()
trans = self.db.start_transaction()
@ -1125,7 +1129,7 @@ class GlobalMediaProperties:
def on_ok_clicked(self, obj):
self.on_apply_clicked(obj)
Utils.destroy_passed_object(obj)
self.close(obj)
def on_attr_list_select_row(self,obj):
store,iter = self.atree.get_selected()

View File

@ -1687,12 +1687,12 @@ class Event(DataObj):
def serialize(self):
return (self.id, self.name, self.date, self.description,
self.place, self.cause, self.private, self.source_list,
self.note, self.witness)
self.note, self.witness, self.media_list)
def unserialize(self,data):
(self.id, self.name, self.date, self.description,
self.place, self.cause, self.private, self.source_list,
self.note, self.witness) = data
self.note, self.witness, self.media_list) = data
def add_media_reference(self,media_id):
"""Adds a Photo object to the Event object's image list"""

View File

@ -276,6 +276,7 @@ class SourceTab:
if iter:
path = store.get_path(iter)
del self.list[path[0]]
self.parent.lists_changed = 1
self.redraw()
#-------------------------------------------------------------------------