* src/DisplayModels/_NoteModel.py:

* src/Selectors/_SelectNote.py:
	* src/DisplayViews/NoteView.py:
	* src/gen/db/base.py:
	Change the order of columns on Note View and Select Note dialog. Also
	fixed a crash. Bug #1529

2008-01-09  Gary Burton <gary.burton@zen.co.uk>


svn: r9770
This commit is contained in:
Gary Burton 2008-01-09 21:15:28 +00:00
parent de7c632edb
commit 811f40b5da
5 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2008-01-09 Gary Burton <gary.burton@zen.co.uk>
* src/DisplayModels/_NoteModel.py:
* src/Selectors/_SelectNote.py:
* src/DisplayViews/NoteView.py:
* src/gen/db/base.py:
Change the order of columns on Note View and Select Note dialog. Also
fixed a crash. Bug #1529
2008-01-09 Gary Burton <gary.burton@zen.co.uk>
* src/DisplayModels/_BaseModel.py: add self.db to match function

View File

@ -67,10 +67,10 @@ from gettext import gettext as _
class NoteView(PageView.ListView):
COLUMN_NAMES = [
_('Preview'),
_('ID'),
_('Type'),
_('Marker'),
_('Preview'),
]
ADD_MSG = _("Add a new note")

View File

@ -54,7 +54,7 @@ import gen.lib
#-------------------------------------------------------------------------
class NoteModel(BaseModel):
HANDLE_COL = 2
HANDLE_COL = 4
_MARKER_COL = 6
def __init__(self,db,scol=0,order=gtk.SORT_ASCENDING,search=None,
@ -62,20 +62,20 @@ class NoteModel(BaseModel):
self.gen_cursor = db.get_note_cursor
self.map = db.get_raw_note_data
self.fmap = [
self.column_preview,
self.column_id,
self.column_type,
self.column_marker,
self.column_preview,
self.column_handle,
self.column_marker_color,
self.column_marker_color
]
self.smap = [
self.column_preview,
self.column_id,
self.column_type,
self.column_marker,
self.column_preview,
self.column_handle,
self.column_marker_color,
self.column_marker_color
]
self.marker_color_column = 5
BaseModel.__init__(self, db, scol, order,

View File

@ -58,10 +58,10 @@ class SelectNote(BaseSelector):
def get_column_titles(self):
return [
(_('Preview'), 350, BaseSelector.TEXT),
(_('ID'), 75, BaseSelector.TEXT),
(_('Type'), 0, BaseSelector.NONE),
(_('Marker'), 0, BaseSelector.NONE),
(_('Preview'), 350, BaseSelector.TEXT)
(_('Type'), 100, BaseSelector.TEXT),
(_('Marker'), 100, BaseSelector.TEXT)
]
def get_from_handle_func(self):
@ -82,4 +82,3 @@ class SelectNote(BaseSelector):
"""
import DataViews
return DataViews.NoteView.COLUMN_NAMES

View File

@ -2289,7 +2289,7 @@ class GrampsDbBase(GrampsDBCallback):
Returns the Note display common information stored in the
database's metadata.
"""
default = [(1, 0, 100), (1, 1, 100), (0, 2, 100), (1, 3, 100)]
default = [(1, 0, 350), (1, 1, 75), (1, 2, 100), (1, 3, 100)]
return self.__get_columns(NOTE_COL_KEY, default)
def delete_primary_from_reference_map(self, handle, transaction):