* src/AddMedia.py: fix issue #1350, relative path not working addmedia

* src/Editors/_EditPerson.py: family rebuild callback error

2007-11-07 Benny Malengier <benny.malengier@gramps-project.org>


svn: r9318
This commit is contained in:
Benny Malengier 2007-11-07 18:50:57 +00:00
parent 805103387d
commit e9db9568cb
3 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2007-11-07 Benny Malengier <benny.malengier@gramps-project.org>
* src/AddMedia.py: fix issue #1350, relative path not working addmedia
* src/Editors/_EditPerson.py: family rebuild callback error
2007-11-07 Benny Malengier <benny.malengier@gramps-project.org>
* src/AddMedia.py: add media crash, fix issue #1349

View File

@ -58,7 +58,14 @@ import Mime
import GrampsDisplay
import ManagedWindow
#-------------------------------------------------------------------------
#
# global variables
#
#-------------------------------------------------------------------------
_last_directory = None
_relative_path = False
#-------------------------------------------------------------------------
#
@ -97,6 +104,7 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
self.internal = self.glade.get_widget('internal')
self.internal.connect('toggled', self.internal_toggled)
self.relpath = self.glade.get_widget('relpath')
self.relpath.set_active(_relative_path)
self.temp_name = ""
self.object = None
@ -120,7 +128,7 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
Callback function called with the save button is pressed.
A new media object is created, and added to the database.
"""
global _last_directory
global _last_directory, _relative_path
description = unicode(self.description.get_text())
@ -160,7 +168,8 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
mobj.set_mime_type(mtype)
name = filename
mobj.set_path(name)
_last_directory = os.path.dirname(filename)
_last_directory = os.path.dirname(full_file)
_relative_path = self.relpath.get_active()
mobj.set_handle(Utils.create_id())
if not mobj.get_gramps_id():

View File

@ -165,7 +165,7 @@ class EditPerson(EditPrimary):
self._add_db_signal('family-update', self.family_change)
self._add_db_signal('family-add', self.family_change)
def family_change(self, handle_list):
def family_change(self, handle_list=[]):
"""Callback for family change signals. This should rebuild the
backreferences to family in person when:
1)a family the person is parent of changes. Person could have