* 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:
parent
9b38528e44
commit
08c1a4865b
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user