2007-11-29 Benny Malengier <benny.malengier@gramps-project.org>

* src/DataViews/_RepositoryView.py:
	* src/gen/db/base.py:
	* src/DisplayModels/_RepositoryModel.py:
	Added a change column in repoview, model, database column storage



svn: r9432
This commit is contained in:
Benny Malengier 2007-11-29 14:02:22 +00:00
parent a13f3e950c
commit 8d64c728fc
4 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2007-11-29 Benny Malengier <benny.malengier@gramps-project.org>
* 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 <dblank@cs.brynmawr.edu>
* po//POTFILES.in: renamed PluginStatus.py -> PluginWindows.py

View File

@ -79,6 +79,7 @@ class RepositoryView(PageView.ListView):
_('Country'),
_('Email'),
_('Search URL'),
_('Last Changed'),
]
ADD_MSG = _("Add a new repository")

View File

@ -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)

View File

@ -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):