2007-03-28 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/DataViews/_NoteView.py: put back column editor support. * src/GrampsDb/_GrampsDbBase.py (get_note_column_order): fix default values. * src/DisplayModels/_NoteModel.py: include marker column. svn: r8333
This commit is contained in:
parent
e8387f71c7
commit
33fedc18d4
@ -1,3 +1,9 @@
|
||||
2007-03-28 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
|
||||
* src/DataViews/_NoteView.py: put back column editor support.
|
||||
* src/GrampsDb/_GrampsDbBase.py (get_note_column_order): fix default
|
||||
values.
|
||||
* src/DisplayModels/_NoteModel.py: include marker column.
|
||||
|
||||
2007-03-27 Don Allingham <don@gramps-project.org>
|
||||
* src/ViewManager.py: pass dbstate to DbManager
|
||||
* src/DbManager.py: add icon, prevent deletion of open db, make buttons
|
||||
|
@ -59,6 +59,7 @@ from gettext import gettext as _
|
||||
column_names = [
|
||||
_('ID'),
|
||||
_('Type'),
|
||||
_('Marker'),
|
||||
_('Preview'),
|
||||
]
|
||||
|
||||
@ -104,28 +105,27 @@ class NoteView(PageView.ListView):
|
||||
|
||||
def define_actions(self):
|
||||
PageView.ListView.define_actions(self)
|
||||
# self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
# _('_Column Editor'), callback=self.column_editor)
|
||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
_('_Column Editor'), callback=self.column_editor)
|
||||
self.add_action('FilterEdit', None, _('Note Filter Editor'),
|
||||
callback=self.filter_editor,)
|
||||
|
||||
def column_editor(self, obj):
|
||||
pass
|
||||
# import ColumnOrder
|
||||
import ColumnOrder
|
||||
|
||||
# ColumnOrder.ColumnOrder(
|
||||
# _('Select Place Columns'),
|
||||
# self.uistate,
|
||||
# self.dbstate.db.get_place_column_order(),
|
||||
# column_names,
|
||||
# self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
_('Select Note Columns'),
|
||||
self.uistate,
|
||||
self.dbstate.db.get_note_column_order(),
|
||||
column_names,
|
||||
self.set_column_order)
|
||||
|
||||
def set_column_order(self, clist):
|
||||
#self.dbstate.db.set_place_column_order(clist)
|
||||
self.dbstate.db.set_note_column_order(clist)
|
||||
self.build_columns()
|
||||
|
||||
def column_order(self):
|
||||
return [(1, 0, 100), (1, 1, 100), (1, 2, 100)]
|
||||
return self.dbstate.db.get_note_column_order()
|
||||
|
||||
def get_stock(self):
|
||||
return 'gramps-notes'
|
||||
|
@ -63,12 +63,14 @@ class NoteModel(BaseModel):
|
||||
self.fmap = [
|
||||
self.column_id,
|
||||
self.column_type,
|
||||
self.column_marker,
|
||||
self.column_preview,
|
||||
self.column_handle,
|
||||
]
|
||||
self.smap = [
|
||||
self.column_id,
|
||||
self.column_type,
|
||||
self.column_marker,
|
||||
self.column_preview,
|
||||
self.column_handle,
|
||||
]
|
||||
@ -89,6 +91,11 @@ class NoteModel(BaseModel):
|
||||
temp.set(data[4])
|
||||
return unicode(str(temp))
|
||||
|
||||
def column_marker(self, data):
|
||||
temp = RelLib.MarkerType()
|
||||
temp.set(data[6])
|
||||
return unicode(str(temp))
|
||||
|
||||
def column_preview(self,data):
|
||||
note = " ".join(data[2].split())
|
||||
note = re.sub(r'(<.*?>)', '', note)
|
||||
|
@ -2279,9 +2279,7 @@ class GrampsDbBase(GrampsDBCallback):
|
||||
Returns the Note display common information stored in the
|
||||
database's metadata.
|
||||
"""
|
||||
# FIXME: These are copied from Event, must be changed
|
||||
default = [(1, 0, 200), (1, 1, 75), (1, 2, 100), (1, 3, 150),
|
||||
(1, 4, 200), (0, 5, 100)]
|
||||
default = [(1, 0, 100), (1, 1, 100), (0, 2, 100), (1, 3, 100)]
|
||||
return self._get_columns(NOTE_COL_KEY, default)
|
||||
|
||||
def _delete_primary_from_reference_map(self, handle, transaction):
|
||||
|
Loading…
Reference in New Issue
Block a user