2007-09-26 Benny Malengier <benny.malengier@gramps-project.org>
* src/Selectors/_SelectNote.py:a note selector for the reports * src/Selectors/Makefile.am: add selectNote * po/POTFILES.in: add selectNote svn: r9009
This commit is contained in:
parent
26aa0f83d0
commit
bb2350ce9a
@ -1,3 +1,8 @@
|
||||
2007-09-26 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/Selectors/_SelectNote.py:a note selector for the reports
|
||||
* src/Selectors/Makefile.am: add selectNote
|
||||
* po/POTFILES.in: add selectNote
|
||||
|
||||
2007-09-26 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/Selectors/_BaseSelector.py: add column sorting
|
||||
* src/Selectors/_SelectEvent.py:remove whitespace
|
||||
|
@ -274,6 +274,7 @@ src/Mime/_PythonMime.py
|
||||
src/Selectors/_BaseSelector.py
|
||||
src/Selectors/_SelectEvent.py
|
||||
src/Selectors/_SelectFamily.py
|
||||
src/Selectors/_SelectNote.py
|
||||
src/Selectors/_SelectObject.py
|
||||
src/Selectors/_SelectPerson.py
|
||||
src/Selectors/_SelectPlace.py
|
||||
|
@ -10,6 +10,7 @@ pkgdata_PYTHON = \
|
||||
_BaseSelector.py \
|
||||
_SelectEvent.py \
|
||||
_SelectFamily.py \
|
||||
_SelectNote.py \
|
||||
_SelectObject.py \
|
||||
_SelectPerson.py \
|
||||
_SelectRepository.py \
|
||||
|
85
src/Selectors/_SelectNote.py
Normal file
85
src/Selectors/_SelectNote.py
Normal file
@ -0,0 +1,85 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: _SelectNote.py $
|
||||
|
||||
"""Handling of selection dialog for selecting notes
|
||||
"""
|
||||
|
||||
__author__ = "Benny Malengier"
|
||||
__revision__ = "$Revision$"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from DisplayModels import NoteModel
|
||||
from _BaseSelector import BaseSelector
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# SelectNote
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class SelectNote(BaseSelector):
|
||||
""" Class that handles the selection of a note
|
||||
"""
|
||||
|
||||
def get_window_title(self):
|
||||
return _("Select General Note")
|
||||
|
||||
def get_model_class(self):
|
||||
return NoteModel
|
||||
|
||||
def get_column_titles(self):
|
||||
return [
|
||||
(_('ID'), 75, BaseSelector.TEXT),
|
||||
(_('Type'), 0, BaseSelector.NONE),
|
||||
(_('Marker'), 0, BaseSelector.NONE),
|
||||
(_('Preview'), 350, BaseSelector.TEXT)
|
||||
]
|
||||
|
||||
def get_from_handle_func(self):
|
||||
return self.db.get_note_from_handle
|
||||
|
||||
def get_handle_column(self):
|
||||
return 4
|
||||
|
||||
def column_order(self):
|
||||
"""
|
||||
returns a tuple indicating the column order
|
||||
"""
|
||||
return self.db.get_note_column_order()
|
||||
|
||||
def column_view_names(self):
|
||||
"""
|
||||
Get correct column view names on which model is based
|
||||
"""
|
||||
import DataViews
|
||||
return DataViews.NoteView.COLUMN_NAMES
|
||||
|
Loading…
Reference in New Issue
Block a user