2007-10-18 Benny Malengier <benny.malengier@gramps-project.org>
* src/DisplayTabs/__init__.py: add note backref * src/glade/gramps.glade: add notebook to note editor to show backref * src/DisplayTabs/_NoteTab.py: import editnote in method to avoid import loop * src/Editors/_EditNote.py: add notetab of backreferences * src/DisplayTabs/_NoteBackRefList.py: note backreferences list * src/DisplayTabs/Makefile.am: new backref file * po/POTFILES.in: new backref file svn: r9209
This commit is contained in:
@@ -28,6 +28,7 @@ pkgdata_PYTHON = \
|
||||
_MediaBackRefList.py \
|
||||
_NameEmbedList.py \
|
||||
_NameModel.py \
|
||||
_NoteBackRefList.py \
|
||||
_NoteTab.py \
|
||||
_NoteModel.py \
|
||||
_TextTab.py \
|
||||
|
||||
39
src/DisplayTabs/_NoteBackRefList.py
Normal file
39
src/DisplayTabs/_NoteBackRefList.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-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: _NoteBackRefList.py 7068 2006-07-24 23:06:49Z rshura $
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
from _BackRefModel import BackRefModel
|
||||
from _BackRefList import BackRefList
|
||||
|
||||
class NoteBackRefList(BackRefList):
|
||||
|
||||
def __init__(self, dbstate, uistate, track, obj, callback=None):
|
||||
BackRefList.__init__(self, dbstate, uistate, track, obj,
|
||||
BackRefModel, callback=callback)
|
||||
|
||||
def get_icon_name(self):
|
||||
return 'gramps-notes'
|
||||
@@ -46,7 +46,6 @@ import gen.lib
|
||||
from DisplayTabs import log
|
||||
from _NoteModel import NoteModel
|
||||
from _EmbeddedList import EmbeddedList
|
||||
from Editors import EditNote
|
||||
from DdTargets import DdTargets
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -108,6 +107,7 @@ class NoteTab(EmbeddedList):
|
||||
if self.notetype :
|
||||
note.set_type(self.notetype)
|
||||
try:
|
||||
from Editors import EditNote
|
||||
EditNote(self.dbstate, self.uistate, self.track,
|
||||
note, self.add_callback,
|
||||
self.callertitle, extratype = [self.notetype])
|
||||
@@ -124,6 +124,7 @@ class NoteTab(EmbeddedList):
|
||||
if handle:
|
||||
note = self.dbstate.db.get_note_from_handle(handle)
|
||||
try:
|
||||
from Editors import EditNote
|
||||
EditNote(self.dbstate, self.uistate, self.track, note,
|
||||
self.edit_callback, self.callertitle,
|
||||
extratype = [self.notetype] )
|
||||
|
||||
@@ -47,6 +47,7 @@ from _LdsEmbedList import LdsEmbedList
|
||||
from _LocationEmbedList import LocationEmbedList
|
||||
from _MediaBackRefList import MediaBackRefList
|
||||
from _NameEmbedList import NameEmbedList
|
||||
from _NoteBackRefList import NoteBackRefList
|
||||
from _NoteTab import NoteTab
|
||||
from _TextTab import TextTab
|
||||
from _PersonEventEmbedList import PersonEventEmbedList
|
||||
|
||||
Reference in New Issue
Block a user