2006-09-25 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsDBCallback.py: catch db transaction problem * src/GrampsCfg.py: reset PORT_WARN when TRANSACTION re-enabled * src/QuestionDialog.py: sync changes to config value * src/GrampsLogger/_ErrorReportAssistant.py: fix typo svn: r7330
This commit is contained in:
parent
64b29cee3a
commit
17431a9f82
@ -1,3 +1,9 @@
|
|||||||
|
2006-09-25 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsDb/_GrampsDBCallback.py: catch db transaction problem
|
||||||
|
* src/GrampsCfg.py: reset PORT_WARN when TRANSACTION re-enabled
|
||||||
|
* src/QuestionDialog.py: sync changes to config value
|
||||||
|
* src/GrampsLogger/_ErrorReportAssistant.py: fix typo
|
||||||
|
|
||||||
2006-09-24 Don Allingham <don@gramps-project.org>
|
2006-09-24 Don Allingham <don@gramps-project.org>
|
||||||
* src/ViewManager.py: fix call to warning dialog
|
* src/ViewManager.py: fix call to warning dialog
|
||||||
* src/QuestionDialog.py: Don't do internal check on value
|
* src/QuestionDialog.py: Don't do internal check on value
|
||||||
|
@ -106,6 +106,9 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
|||||||
tlabel, _('Preferences'), None)
|
tlabel, _('Preferences'), None)
|
||||||
|
|
||||||
panel = gtk.Notebook()
|
panel = gtk.Notebook()
|
||||||
|
|
||||||
|
self.original = Config.get(Config.TRANSACTIONS)
|
||||||
|
|
||||||
self.window.vbox.pack_start(tlabel, padding=12)
|
self.window.vbox.pack_start(tlabel, padding=12)
|
||||||
self.window.vbox.add(panel)
|
self.window.vbox.add(panel)
|
||||||
self.window.connect('response',self.done)
|
self.window.connect('response',self.done)
|
||||||
@ -128,6 +131,8 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
|
|||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def done(self, obj, value):
|
def done(self, obj, value):
|
||||||
|
if not self.original and Config.get(Config.TRANSACTIONS):
|
||||||
|
Config.set(Config.PORT_WARN, True)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def add_researcher_panel(self):
|
def add_researcher_panel(self):
|
||||||
|
@ -41,6 +41,8 @@ import types
|
|||||||
import traceback
|
import traceback
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
|
from bsddb import db
|
||||||
|
|
||||||
log = sys.stderr.write
|
log = sys.stderr.write
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -409,7 +411,10 @@ class GrampsDBCallback(object):
|
|||||||
cb[0](fn[1],*args)
|
cb[0](fn[1],*args)
|
||||||
elif type(fn) == types.FunctionType or \
|
elif type(fn) == types.FunctionType or \
|
||||||
type(fn) == types.MethodType: # call func
|
type(fn) == types.MethodType: # call func
|
||||||
fn(*args)
|
try:
|
||||||
|
fn(*args)
|
||||||
|
except db.DBRunRecoveryError:
|
||||||
|
display_error()
|
||||||
else:
|
else:
|
||||||
self._warn("Badly formed entry in callback map.\n")
|
self._warn("Badly formed entry in callback map.\n")
|
||||||
except:
|
except:
|
||||||
@ -457,6 +462,17 @@ class GrampsDBCallback(object):
|
|||||||
|
|
||||||
enable_all_signals = classmethod(__enable_all_signals)
|
enable_all_signals = classmethod(__enable_all_signals)
|
||||||
|
|
||||||
|
|
||||||
|
def display_error():
|
||||||
|
from QuestionDialog import ErrorDialog
|
||||||
|
ErrorDialog(
|
||||||
|
_('Database error'),
|
||||||
|
_('A problem as been detected in your database. '
|
||||||
|
'This is probably caused by opening a database that was '
|
||||||
|
'created with one transaction setting when the database was '
|
||||||
|
'created with another, or by moving a non-portable database '
|
||||||
|
'to a different machine.'))
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Testing code below this point
|
# Testing code below this point
|
||||||
@ -756,3 +772,4 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
|
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class ErrorReportAssistant:
|
|||||||
GrampsDisplay.url('mailto:gramps-bugs@lists.sourceforge.net?subject="bug report"&body="%s"' \
|
GrampsDisplay.url('mailto:gramps-bugs@lists.sourceforge.net?subject="bug report"&body="%s"' \
|
||||||
% self._final_report_text_buffer.get_text(
|
% self._final_report_text_buffer.get_text(
|
||||||
self._final_report_text_buffer.get_start_iter(),
|
self._final_report_text_buffer.get_start_iter(),
|
||||||
self._final_report_text_buffer.get_end_iter()))
|
self._final_report_text_buffer.get_end_iter())))
|
||||||
|
|
||||||
def _get_sys_information(self):
|
def _get_sys_information(self):
|
||||||
if hasattr(os, "uname"):
|
if hasattr(os, "uname"):
|
||||||
|
@ -275,3 +275,4 @@ class MessageHideDialog:
|
|||||||
|
|
||||||
def update_checkbox(self, obj, constant):
|
def update_checkbox(self, obj, constant):
|
||||||
Config.set(constant, obj.get_active())
|
Config.set(constant, obj.get_active())
|
||||||
|
Config.sync()
|
||||||
|
Loading…
Reference in New Issue
Block a user