diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index e679d8134..f1d4122e1 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2005-05-02 Martin Hawlisch + * 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 * src/EditPerson.py (on_help_clicked): Call appropriate manual section. * doc/gramps-manual/C/usage.xml: Update. diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index e386bc30f..da4366c72 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -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) diff --git a/gramps2/src/plugins/Check.py b/gramps2/src/plugins/Check.py index 20f8fa582..d477eed19 100644 --- a/gramps2/src/plugins/Check.py +++ b/gramps2/src/plugins/Check.py @@ -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() diff --git a/gramps2/src/plugins/TestcaseGenerator.py b/gramps2/src/plugins/TestcaseGenerator.py index 315015a45..89d799cef 100644 --- a/gramps2/src/plugins/TestcaseGenerator.py +++ b/gramps2/src/plugins/TestcaseGenerator.py @@ -522,9 +522,9 @@ class TestcaseGenerator: # #------------------------------------------------------------------------- def TestcaseGeneratorPlugin(database,active_person,callback,parent=None): - print "TestcaseGeneratorPlugin" - fg = TestcaseGenerator(database,active_person,callback,parent) - fg.run() + if not database.readonly: + fg = TestcaseGenerator(database,active_person,callback,parent) + fg.run() #------------------------------------------------------------------------- #