From a76fa8d0c779b332686d09b3f1f68954391e21f5 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 11 Aug 2015 11:22:01 -0400 Subject: [PATCH] DbManager and -L: show counts of all primary objects --- gramps/gen/db/generic.py | 9 +++++++++ gramps/gui/dbman.py | 2 +- gramps/plugins/database/bsddb_support/read.py | 9 +++++++++ gramps/plugins/database/bsddb_support/write.py | 9 +++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py index 76b0a031b..dd9c21a94 100644 --- a/gramps/gen/db/generic.py +++ b/gramps/gen/db/generic.py @@ -1895,6 +1895,15 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): """ return { _("Number of people"): self.get_number_of_people(), + _("Number of families"): self.get_number_of_families(), + _("Number of sources"): self.get_number_of_sources(), + _("Number of citations"): self.get_number_of_citations(), + _("Number of events"): self.get_number_of_events(), + _("Number of media"): self.get_number_of_media_objects(), + _("Number of places"): self.get_number_of_places(), + _("Number of repositories"): self.get_number_of_repositories(), + _("Number of notes"): self.get_number_of_notes(), + _("Number of tags"): self.get_number_of_tags(), } def get_dbname(self): diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py index 997203c51..890c93f8e 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -119,7 +119,7 @@ class Information(ManagedWindow): s = Gtk.ScrolledWindow() titles = [ (_('Setting'),0,150), - (_('Value'),1,450) + (_('Value'),1,400) ] treeview = Gtk.TreeView() model = ListModel(treeview, titles) diff --git a/gramps/plugins/database/bsddb_support/read.py b/gramps/plugins/database/bsddb_support/read.py index 9280dbc09..07b712e4f 100644 --- a/gramps/plugins/database/bsddb_support/read.py +++ b/gramps/plugins/database/bsddb_support/read.py @@ -1988,4 +1988,13 @@ class DbBsddbRead(DbReadBase, Callback): """ return { _("Number of people"): self.get_number_of_people(), + _("Number of families"): self.get_number_of_families(), + _("Number of sources"): self.get_number_of_sources(), + _("Number of citations"): self.get_number_of_citations(), + _("Number of events"): self.get_number_of_events(), + _("Number of media"): self.get_number_of_media_objects(), + _("Number of places"): self.get_number_of_places(), + _("Number of repositories"): self.get_number_of_repositories(), + _("Number of notes"): self.get_number_of_notes(), + _("Number of tags"): self.get_number_of_tags(), } diff --git a/gramps/plugins/database/bsddb_support/write.py b/gramps/plugins/database/bsddb_support/write.py index 75fe19d19..673d33e54 100644 --- a/gramps/plugins/database/bsddb_support/write.py +++ b/gramps/plugins/database/bsddb_support/write.py @@ -2480,6 +2480,15 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback): bsddb_version = _("Unknown") return { _("Number of people"): self.get_number_of_people(), + _("Number of families"): self.get_number_of_families(), + _("Number of sources"): self.get_number_of_sources(), + _("Number of citations"): self.get_number_of_citations(), + _("Number of events"): self.get_number_of_events(), + _("Number of media"): self.get_number_of_media_objects(), + _("Number of places"): self.get_number_of_places(), + _("Number of repositories"): self.get_number_of_repositories(), + _("Number of notes"): self.get_number_of_notes(), + _("Number of tags"): self.get_number_of_tags(), _("Schema version"): schema_version, _("Version"): bsddb_version, }