2007-04-30 Benny Malengier <bm@cage.ugent.be>
* src/Editors/_EditPlace.py: * src/Editors/_EditSource.py: * src/Editors/_EditNote.py: * src/Editors/_EditPerson.py: * src/Editors/_EditRepository.py: * src/Editors/_EditFamily.py: * src/DisplayTabs/_NoteTab.py: Add meaningfull title to the note dialog instead of only the note number, when called from place, source, person, family or repo svn: r8432
This commit is contained in:
parent
d7423fff15
commit
37255a3b02
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2007-04-30 Benny Malengier <bm@cage.ugent.be>
|
||||
* src/Editors/_EditPlace.py:
|
||||
* src/Editors/_EditSource.py:
|
||||
* src/Editors/_EditNote.py:
|
||||
* src/Editors/_EditPerson.py:
|
||||
* src/Editors/_EditRepository.py:
|
||||
* src/Editors/_EditFamily.py:
|
||||
* src/DisplayTabs/_NoteTab.py:
|
||||
Add meaningfull title to the note dialog instead of only the note number, when called from place, source, person, family or repo
|
||||
|
||||
2007-04-29 Brian Matherly <brian@gramps-project.org>
|
||||
* src/ReportBase/_Report.py:
|
||||
* src/BaseDoc.py:
|
||||
|
@ -71,8 +71,9 @@ class NoteTab(EmbeddedList):
|
||||
(_('Preview'), 1, 200),
|
||||
]
|
||||
|
||||
def __init__(self, dbstate, uistate, track, data):
|
||||
def __init__(self, dbstate, uistate, track, data, callertitle=None):
|
||||
self.data = data
|
||||
self.callertitle = callertitle
|
||||
EmbeddedList.__init__(self, dbstate, uistate, track,
|
||||
_("Notes"), NoteModel, move=True)
|
||||
|
||||
@ -103,7 +104,8 @@ class NoteTab(EmbeddedList):
|
||||
def add_button_clicked(self, obj):
|
||||
note = RelLib.Note()
|
||||
try:
|
||||
EditNote(self.dbstate, self.uistate, [], note, self.add_callback)
|
||||
EditNote(self.dbstate, self.uistate, [], note, self.add_callback,
|
||||
self.callertitle)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
@ -118,7 +120,7 @@ class NoteTab(EmbeddedList):
|
||||
note = self.dbstate.db.get_note_from_handle(handle)
|
||||
try:
|
||||
EditNote(self.dbstate, self.uistate, [], note,
|
||||
self.edit_callback)
|
||||
self.edit_callback, self.callertitle )
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
|
@ -570,7 +570,7 @@ class EditFamily(EditPrimary):
|
||||
self.note_tab = self._add_tab(
|
||||
notebook,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_note_list()))
|
||||
self.obj.get_note_list(), self.get_menu_title()))
|
||||
|
||||
self.gallery_tab = self._add_tab(
|
||||
notebook,
|
||||
|
@ -54,8 +54,10 @@ from RelLib import Note
|
||||
#-------------------------------------------------------------------------
|
||||
class EditNote(EditPrimary):
|
||||
|
||||
def __init__(self, state, uistate, track, note, callback=None):
|
||||
def __init__(self, state, uistate, track, note, callback=None
|
||||
, callertitle = None):
|
||||
"""Create an EditNote window. Associate a note with the window."""
|
||||
self.callertitle = callertitle
|
||||
EditPrimary.__init__(self, state, uistate, track, note,
|
||||
state.db.get_note_from_handle, callback)
|
||||
|
||||
@ -72,6 +74,9 @@ class EditNote(EditPrimary):
|
||||
title = _('Note') + ': %s' % self.obj.get_gramps_id()
|
||||
else:
|
||||
title = _('New Note')
|
||||
if self.callertitle :
|
||||
title += ' - ' + self.callertitle
|
||||
|
||||
return title
|
||||
|
||||
def _local_init(self):
|
||||
|
@ -308,7 +308,7 @@ class EditPerson(EditPrimary):
|
||||
self.note_tab = self._add_tab(
|
||||
notebook,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_note_list()))
|
||||
self.obj.get_note_list(), self.get_menu_title()))
|
||||
|
||||
self.gallery_tab = self._add_tab(
|
||||
notebook,
|
||||
|
@ -179,7 +179,7 @@ class EditPlace(EditPrimary):
|
||||
self.note_tab = self._add_tab(
|
||||
notebook,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_note_list()))
|
||||
self.obj.get_note_list(), self.get_menu_title()))
|
||||
|
||||
self.gallery_tab = self._add_tab(
|
||||
notebook,
|
||||
|
@ -124,7 +124,7 @@ class EditRepository(EditPrimary):
|
||||
self.note_tab = self._add_tab(
|
||||
notebook,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_note_list()))
|
||||
self.obj.get_note_list(), self.get_menu_title()))
|
||||
|
||||
self.backref_tab = self._add_tab(
|
||||
notebook,
|
||||
|
@ -130,7 +130,7 @@ class EditSource(EditPrimary):
|
||||
self.note_tab = self._add_tab(
|
||||
notebook,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_note_list()))
|
||||
self.obj.get_note_list(), self.get_menu_title()))
|
||||
|
||||
self.gallery_tab = self._add_tab(
|
||||
notebook,
|
||||
|
Loading…
Reference in New Issue
Block a user