5397: In "Check & Repair Database" the default path to missing media is always to \gramps\bin
svn: r18729
This commit is contained in:
parent
2d8c56dc6b
commit
53af0a2189
@ -62,6 +62,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import gen.lib
|
import gen.lib
|
||||||
from gen.db import DbTxn
|
from gen.db import DbTxn
|
||||||
|
import config
|
||||||
import Utils
|
import Utils
|
||||||
from gui.utils import ProgressMeter
|
from gui.utils import ProgressMeter
|
||||||
import ManagedWindow
|
import ManagedWindow
|
||||||
@ -219,6 +220,7 @@ class CheckIntegrity(object):
|
|||||||
self.invalid_dates = []
|
self.invalid_dates = []
|
||||||
self.removed_name_format = []
|
self.removed_name_format = []
|
||||||
self.empty_objects = defaultdict(list)
|
self.empty_objects = defaultdict(list)
|
||||||
|
self.last_img_dir = config.get('behavior.addmedia-image-dir')
|
||||||
self.progress = ProgressMeter(_('Checking Database'),'')
|
self.progress = ProgressMeter(_('Checking Database'),'')
|
||||||
|
|
||||||
def family_errors(self):
|
def family_errors(self):
|
||||||
@ -624,6 +626,7 @@ class CheckIntegrity(object):
|
|||||||
obj.set_path(name)
|
obj.set_path(name)
|
||||||
self.db.commit_media_object(obj, self.trans)
|
self.db.commit_media_object(obj, self.trans)
|
||||||
self.replaced_photo.append(ObjectId)
|
self.replaced_photo.append(ObjectId)
|
||||||
|
self.last_img_dir = os.path.dirname(name)
|
||||||
LOG(' FAIL: media object reselected to "%s"' % name)
|
LOG(' FAIL: media object reselected to "%s"' % name)
|
||||||
else:
|
else:
|
||||||
self.bad_photo.append(ObjectId)
|
self.bad_photo.append(ObjectId)
|
||||||
@ -633,6 +636,7 @@ class CheckIntegrity(object):
|
|||||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||||
gtk.STOCK_OK, gtk.RESPONSE_OK)
|
gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||||
)
|
)
|
||||||
|
fs_top.set_current_folder(self.last_img_dir)
|
||||||
response = fs_top.run()
|
response = fs_top.run()
|
||||||
if response == gtk.RESPONSE_OK:
|
if response == gtk.RESPONSE_OK:
|
||||||
fs_ok_clicked(fs_top)
|
fs_ok_clicked(fs_top)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user