diff --git a/ChangeLog b/ChangeLog index a887b78e3..c0ee9681d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-11-29 Benny Malengier + * src/DataViews/_RepositoryView.py: + * src/gen/db/base.py: + * src/DisplayModels/_RepositoryModel.py: + Added a change column in repoview, model, database column storage + 2007-11-29 Douglas S.Blank * po//POTFILES.in: renamed PluginStatus.py -> PluginWindows.py diff --git a/src/DataViews/_RepositoryView.py b/src/DataViews/_RepositoryView.py index 5a652501b..28e2ea613 100644 --- a/src/DataViews/_RepositoryView.py +++ b/src/DataViews/_RepositoryView.py @@ -79,6 +79,7 @@ class RepositoryView(PageView.ListView): _('Country'), _('Email'), _('Search URL'), + _('Last Changed'), ] ADD_MSG = _("Add a new repository") diff --git a/src/DisplayModels/_RepositoryModel.py b/src/DisplayModels/_RepositoryModel.py index 2d3b2eabd..f2e7c99f2 100644 --- a/src/DisplayModels/_RepositoryModel.py +++ b/src/DisplayModels/_RepositoryModel.py @@ -24,6 +24,7 @@ # python modules # #------------------------------------------------------------------------- +import time import logging log = logging.getLogger(".") @@ -40,6 +41,7 @@ import gtk # #------------------------------------------------------------------------- import gen.lib +import GrampsLocale from _BaseModel import BaseModel #------------------------------------------------------------------------- @@ -66,7 +68,8 @@ class RepositoryModel(BaseModel): self.column_state, self.column_country, self.column_email, - self.column_search_url, + self.column_search_url, + self.column_change, self.column_handle, self.column_tooltip ] @@ -83,11 +86,12 @@ class RepositoryModel(BaseModel): self.column_state, self.column_country, self.column_email, - self.column_search_url, + self.column_search_url, + self.column_change, self.column_handle, ] - BaseModel.__init__(self, db, scol, order, tooltip_column=12, + BaseModel.__init__(self, db, scol, order, tooltip_column=14, search=search, skip=skip, sort_map=sort_map) def on_get_n_columns(self): @@ -211,3 +215,7 @@ class RepositoryModel(BaseModel): def column_tooltip(self,data): return "" + + def column_change(self,data): + return unicode(time.strftime('%x %X',time.localtime(data[7])), + GrampsLocale.codeset) diff --git a/src/gen/db/base.py b/src/gen/db/base.py index b6a5f1b64..2b1a241ae 100644 --- a/src/gen/db/base.py +++ b/src/gen/db/base.py @@ -615,7 +615,6 @@ class GrampsDbBase(GrampsDBCallback): Commits the specified Repository to the database, storing the changes as part of the transaction. """ - self.commit_base(repository, self.repository_map, REPOSITORY_KEY, transaction.repository_update, transaction.repository_add, @@ -2266,7 +2265,7 @@ class GrampsDbBase(GrampsDBCallback): """ default = [(1, 0, 200), (1, 1, 75), (0, 5, 100), (0, 6, 100), (1, 2, 100), (1, 3, 250), (1, 4, 100), (0, 7, 100), - (0, 8, 100), (0, 9, 100), (0, 10, 100)] + (0, 8, 100), (0, 9, 100), (0, 10, 100), (0, 12, 100)] return self.__get_columns(REPOSITORY_COL_KEY, default) def get_note_column_order(self):