* 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:
parent
805103387d
commit
e9db9568cb
@ -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>
|
2007-11-07 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/AddMedia.py: add media crash, fix issue #1349
|
* src/AddMedia.py: add media crash, fix issue #1349
|
||||||
|
|
||||||
|
@ -58,7 +58,14 @@ import Mime
|
|||||||
import GrampsDisplay
|
import GrampsDisplay
|
||||||
import ManagedWindow
|
import ManagedWindow
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# global variables
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
_last_directory = None
|
_last_directory = None
|
||||||
|
_relative_path = False
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -97,6 +104,7 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
|
|||||||
self.internal = self.glade.get_widget('internal')
|
self.internal = self.glade.get_widget('internal')
|
||||||
self.internal.connect('toggled', self.internal_toggled)
|
self.internal.connect('toggled', self.internal_toggled)
|
||||||
self.relpath = self.glade.get_widget('relpath')
|
self.relpath = self.glade.get_widget('relpath')
|
||||||
|
self.relpath.set_active(_relative_path)
|
||||||
self.temp_name = ""
|
self.temp_name = ""
|
||||||
self.object = None
|
self.object = None
|
||||||
|
|
||||||
@ -120,7 +128,7 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
|
|||||||
Callback function called with the save button is pressed.
|
Callback function called with the save button is pressed.
|
||||||
A new media object is created, and added to the database.
|
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())
|
description = unicode(self.description.get_text())
|
||||||
|
|
||||||
@ -160,7 +168,8 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
|
|||||||
mobj.set_mime_type(mtype)
|
mobj.set_mime_type(mtype)
|
||||||
name = filename
|
name = filename
|
||||||
mobj.set_path(name)
|
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())
|
mobj.set_handle(Utils.create_id())
|
||||||
if not mobj.get_gramps_id():
|
if not mobj.get_gramps_id():
|
||||||
|
@ -165,7 +165,7 @@ class EditPerson(EditPrimary):
|
|||||||
self._add_db_signal('family-update', self.family_change)
|
self._add_db_signal('family-update', self.family_change)
|
||||||
self._add_db_signal('family-add', 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
|
"""Callback for family change signals. This should rebuild the
|
||||||
backreferences to family in person when:
|
backreferences to family in person when:
|
||||||
1)a family the person is parent of changes. Person could have
|
1)a family the person is parent of changes. Person could have
|
||||||
|
Loading…
Reference in New Issue
Block a user