* 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 5d01154b88
commit f5206ae5cd
5 changed files with 22 additions and 9 deletions

View File

@ -2,6 +2,14 @@
* src/filters/*: removed * src/filters/*: removed
* src/plugins/WritePkg.py: brought up to date * 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> 2004-06-09 Don Allingham <dallingham@users.sourceforge.net>
* src/plugins/WriteGedcom.py: brought up to date * src/plugins/WriteGedcom.py: brought up to date
* src/gramps_main.py: beta warning * src/gramps_main.py: beta warning

View File

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

View File

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

View File

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

View File

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