* src/gramps_main.py: Disable fast merge on a readonly db

* src/plugins/Check.py: Disable on readonly db
* src/plugins/TestcaseGenerator.py: Disable on readonly db


svn: r4457
This commit is contained in:
Martin Hawlisch 2005-05-02 21:20:08 +00:00
parent 9b38528e44
commit 08c1a4865b
4 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-05-02 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/gramps_main.py: Disable fast merge on a readonly db
* src/plugins/Check.py: Disable on readonly db
* src/plugins/TestcaseGenerator.py: Disable on readonly db
2005-05-01 Alex Roitman <shura@gramps-project.org>
* src/EditPerson.py (on_help_clicked): Call appropriate manual section.
* doc/gramps-manual/C/usage.xml: Update.

View File

@ -1250,6 +1250,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
self.gtop.get_widget('add_item').set_sensitive(not self.db.readonly)
self.gtop.get_widget('remove_item').set_sensitive(not self.db.readonly)
self.gtop.get_widget('merge').set_sensitive(not self.db.readonly)
self.gtop.get_widget('fast_merge1').set_sensitive(not self.db.readonly)
self.gtop.get_widget('default_person1').set_sensitive(not self.db.readonly)
self.gtop.get_widget('edit_bookmarks').set_sensitive(not self.db.readonly)
self.gtop.get_widget('tools_menu').set_sensitive(not self.db.readonly)

View File

@ -57,6 +57,11 @@ from QuestionDialog import OkDialog, MissingMediaDialog
def runTool(database,active_person,callback,parent=None):
try:
if database.readonly:
# TODO: split plugin in a check and repair part to support
# checking of a read only database
return
trans = database.transaction_begin()
trans.set_batch(True)
database.disable_signals()

View File

@ -522,7 +522,7 @@ class TestcaseGenerator:
#
#-------------------------------------------------------------------------
def TestcaseGeneratorPlugin(database,active_person,callback,parent=None):
print "TestcaseGeneratorPlugin"
if not database.readonly:
fg = TestcaseGenerator(database,active_person,callback,parent)
fg.run()