diff --git a/gramps/gen/db/base.py b/gramps/gen/db/base.py index e3a51afa9..5b37a3527 100644 --- a/gramps/gen/db/base.py +++ b/gramps/gen/db/base.py @@ -700,12 +700,6 @@ class DbReadBase: """ raise NotImplementedError - def get_reference_map_cursor(self): - """ - Returns a reference to a cursor over the reference map - """ - raise NotImplementedError - def get_reference_map_primary_cursor(self): """ Returns a reference to a cursor over the reference map primary map @@ -1226,16 +1220,6 @@ class DbReadBase: """ raise NotImplementedError - def set_redo_callback(self, callback): - """ - Define the callback function that is called whenever an redo operation - is executed. - - The callback function receives a single argument that is a text string - that defines the operation. - """ - raise NotImplementedError - def set_researcher(self, owner): """ Set the information about the owner of the database. @@ -1248,16 +1232,6 @@ class DbReadBase: """ raise NotImplementedError - def set_undo_callback(self, callback): - """ - Define the callback function that is called whenever an undo operation - is executed. - - The callback function receives a single argument that is a text string - that defines the operation. - """ - raise NotImplementedError - def get_dbid(self): """ A unique ID for this database on this computer. @@ -1777,12 +1751,6 @@ class DbWriteBase(DbReadBase): """ raise NotImplementedError - def sort_surname_list(self): - """ - Sort the list of surnames contained in the database by locale ordering. - """ - raise NotImplementedError - def transaction_begin(self, transaction): """ Prepare the database for the start of a new transaction. diff --git a/gramps/plugins/database/bsddb_support/read.py b/gramps/plugins/database/bsddb_support/read.py index cb5d1f99b..4e2eb67ae 100644 --- a/gramps/plugins/database/bsddb_support/read.py +++ b/gramps/plugins/database/bsddb_support/read.py @@ -1488,26 +1488,6 @@ class DbBsddbRead(DbReadBase, Callback): self.note_prefix = self._validated_id_prefix(val, "N") self.nid2user_format = self.__id2user_format(self.note_prefix) - def set_undo_callback(self, callback): - """ - Define the callback function that is called whenever an undo operation - is executed. - - The callback function receives a single argument that is a text string - that defines the operation. - """ - self.undo_callback = callback - - def set_redo_callback(self, callback): - """ - Define the callback function that is called whenever an redo operation - is executed. - - The callback function receives a single argument that is a text string - that defines the operation. - """ - self.redo_callback = callback - def get_surname_list(self): """ Return the list of locale-sorted surnames contained in the database. diff --git a/gramps/plugins/database/bsddb_support/test/db_test.py b/gramps/plugins/database/bsddb_support/test/db_test.py index 87a84eda9..3930e14cc 100644 --- a/gramps/plugins/database/bsddb_support/test/db_test.py +++ b/gramps/plugins/database/bsddb_support/test/db_test.py @@ -104,7 +104,6 @@ class DbTest(unittest.TestCase): "get_raw_repository_data", "get_raw_source_data", "get_raw_tag_data", - "get_reference_map_cursor", "get_reference_map_primary_cursor", "get_reference_map_referenced_cursor", "get_repo_bookmarks", @@ -173,10 +172,8 @@ class DbTest(unittest.TestCase): "set_source_id_prefix", # Other set methods: "set_mediapath", - "set_redo_callback", "set_researcher", "set_save_path", - "set_undo_callback", "version_supported", ] @@ -219,7 +216,6 @@ class DbTest(unittest.TestCase): "set_auto_remove", "set_default_person_handle", "set_name_group_mapping", - "sort_surname_list", "transaction_begin", "transaction_commit", "update_reference_map", diff --git a/gramps/plugins/database/bsddb_support/write.py b/gramps/plugins/database/bsddb_support/write.py index 759d2ee30..e60d2e9fb 100644 --- a/gramps/plugins/database/bsddb_support/write.py +++ b/gramps/plugins/database/bsddb_support/write.py @@ -485,13 +485,6 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback): # the referenced_handle index: the referenced_handle # the main index is unique, the others allow duplicate entries. - @catch_db_error - def get_reference_map_cursor(self): - """ - Returns a reference to a cursor over the reference map - """ - return DbBsddbAssocCursor(self.reference_map, self.txn) - @catch_db_error def get_reference_map_primary_cursor(self): """ @@ -1844,9 +1837,6 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback): grouppar = group self.emit('person-groupname-rebuild', (name, grouppar)) - def sort_surname_list(self): - self.surname_list.sort(key=glocale.sort_key) - @catch_db_error def build_surname_list(self): """ diff --git a/gramps/plugins/database/dummydb.py b/gramps/plugins/database/dummydb.py index 5f1608460..a87d4848a 100644 --- a/gramps/plugins/database/dummydb.py +++ b/gramps/plugins/database/dummydb.py @@ -1008,14 +1008,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): LOG.warn("handle %s does not exist in the dummy database" % handle) raise HandleError('Handle %s not found' % handle.decode('utf-8')) - def get_reference_map_cursor(self): - """ - Returns a reference to a cursor over the reference map - """ - if not self.db_is_open: - LOG.warn("database is closed") - return [] - def get_reference_map_primary_cursor(self): """ Returns a reference to a cursor over the reference map primary map @@ -1666,17 +1658,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): if not self.db_is_open: LOG.warn("database is closed") - def set_redo_callback(self, callback): - """ - Define the callback function that is called whenever an redo operation - is executed. - - The callback function receives a single argument that is a text string - that defines the operation. - """ - if not self.db_is_open: - LOG.warn("database is closed") - def set_researcher(self, owner): """ Set the information about the owner of the database. @@ -1691,17 +1672,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): if not self.db_is_open: LOG.warn("database is closed") - def set_undo_callback(self, callback): - """ - Define the callback function that is called whenever an undo operation - is executed. - - The callback function receives a single argument that is a text string - that defines the operation. - """ - if not self.db_is_open: - LOG.warn("database is closed") - def get_dbid(self): """ A unique ID for this database on this computer.