From f75a8f9497224ba0fc456b48dfc48f4c30ab089c Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Mon, 11 Dec 2017 22:18:39 +0000 Subject: [PATCH] Enable Sqlite backend for all users --- gramps/grampsapp.py | 9 +++---- gramps/gui/aboutdialog.py | 6 ++--- gramps/gui/configure.py | 31 +++++++++++----------- gramps/gui/dbman.py | 3 --- gramps/gui/logger/_errorreportassistant.py | 6 ++--- 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/gramps/grampsapp.py b/gramps/grampsapp.py index 8244e5c02..3e7feb5df 100644 --- a/gramps/grampsapp.py +++ b/gramps/grampsapp.py @@ -399,11 +399,10 @@ def show_settings(): print(' version : %s' % bsddb_str) print(' db version : %s' % bsddb_db_str) print(' location : %s' % bsddb_location_str) - if __debug__: - print(' sqlite3 :') - print(' version : %s' % sqlite3_version_str) - print(' py version : %s' % sqlite3_py_version_str) - print(' location : %s' % sqlite3_location_str) + print(' sqlite3 :') + print(' version : %s' % sqlite3_version_str) + print(' py version : %s' % sqlite3_py_version_str) + print(' location : %s' % sqlite3_location_str) print('') def run(): diff --git a/gramps/gui/aboutdialog.py b/gramps/gui/aboutdialog.py index 76f66a62a..f2b28a036 100644 --- a/gramps/gui/aboutdialog.py +++ b/gramps/gui/aboutdialog.py @@ -130,10 +130,8 @@ class GrampsAboutDialog(Gtk.AboutDialog): if hasattr(os, "uname"): distro = "\n" + _("Distribution: %s") % ellipses(os.uname()[2]) - sqlite = '' - if __debug__: - sqlite = "sqlite" + COLON + " %s (%s)\n" % (sqlite3_version_str, - sqlite3_py_version_str) + sqlite = "sqlite" + COLON + " %s (%s)\n" % (sqlite3_version_str, + sqlite3_py_version_str) return (("\n\n" + "GRAMPS" + COLON + " %s \n" + diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index a51f7c708..d8e7d3ab6 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -1463,23 +1463,22 @@ class GrampsPreferences(ConfigureDialog): current_line = 0 - if __debug__: - lwidget = BasicLabel(_("%s: ") % _('Database backend')) - grid.attach(lwidget, 1, current_line, 1, 1) - obox = self.__create_backend_combo() - grid.attach(obox, 2, current_line, 1, 1) - current_line += 1 + lwidget = BasicLabel(_("%s: ") % _('Database backend')) + grid.attach(lwidget, 1, current_line, 1, 1) + obox = self.__create_backend_combo() + grid.attach(obox, 2, current_line, 1, 1) + current_line += 1 - self.connection_widgets = [] - entry = self.add_entry(grid, _('Host'), current_line, - 'database.host', col_attach=1) - self.connection_widgets.append(entry) - current_line += 1 - entry = self.add_entry(grid, _('Port'), current_line, - 'database.port', col_attach=1) - self.connection_widgets.append(entry) - current_line += 1 - self.set_connection_widgets(config.get('database.backend')) + self.connection_widgets = [] + entry = self.add_entry(grid, _('Host'), current_line, + 'database.host', col_attach=1) + self.connection_widgets.append(entry) + current_line += 1 + entry = self.add_entry(grid, _('Port'), current_line, + 'database.port', col_attach=1) + self.connection_widgets.append(entry) + current_line += 1 + self.set_connection_widgets(config.get('database.backend')) self.dbpath_entry = Gtk.Entry() self.add_path_box(grid, diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py index afa8df8b2..79c998914 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -285,9 +285,6 @@ class DbManager(CLIDbManager, ManagedWindow): # Get the current selection store, node = selection.get_selected() - if not __debug__: - self.convert_btn.set_visible(False) - if not _RCS_FOUND: # it's not in Windows self.rcs_btn.set_visible(False) diff --git a/gramps/gui/logger/_errorreportassistant.py b/gramps/gui/logger/_errorreportassistant.py index ded48f076..af9979693 100644 --- a/gramps/gui/logger/_errorreportassistant.py +++ b/gramps/gui/logger/_errorreportassistant.py @@ -173,10 +173,8 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant): if hasattr(os, "uname"): distribution = "Distribution: %s\n" % os.uname()[2] - sqlite = '' - if __debug__: - sqlite = "sqlite version: %s (%s) \n" % (sqlite3_version_str, - sqlite3_py_version_str) + sqlite = "sqlite version: %s (%s) \n" % (sqlite3_version_str, + sqlite3_py_version_str) return "Gramps version: %s \n"\ "Python version: %s \n"\