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>
|
2007-04-29 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/ReportBase/_Report.py:
|
* src/ReportBase/_Report.py:
|
||||||
* src/BaseDoc.py:
|
* src/BaseDoc.py:
|
||||||
|
@ -71,8 +71,9 @@ class NoteTab(EmbeddedList):
|
|||||||
(_('Preview'), 1, 200),
|
(_('Preview'), 1, 200),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, track, data):
|
def __init__(self, dbstate, uistate, track, data, callertitle=None):
|
||||||
self.data = data
|
self.data = data
|
||||||
|
self.callertitle = callertitle
|
||||||
EmbeddedList.__init__(self, dbstate, uistate, track,
|
EmbeddedList.__init__(self, dbstate, uistate, track,
|
||||||
_("Notes"), NoteModel, move=True)
|
_("Notes"), NoteModel, move=True)
|
||||||
|
|
||||||
@ -103,7 +104,8 @@ class NoteTab(EmbeddedList):
|
|||||||
def add_button_clicked(self, obj):
|
def add_button_clicked(self, obj):
|
||||||
note = RelLib.Note()
|
note = RelLib.Note()
|
||||||
try:
|
try:
|
||||||
EditNote(self.dbstate, self.uistate, [], note, self.add_callback)
|
EditNote(self.dbstate, self.uistate, [], note, self.add_callback,
|
||||||
|
self.callertitle)
|
||||||
except Errors.WindowActiveError:
|
except Errors.WindowActiveError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -118,7 +120,7 @@ class NoteTab(EmbeddedList):
|
|||||||
note = self.dbstate.db.get_note_from_handle(handle)
|
note = self.dbstate.db.get_note_from_handle(handle)
|
||||||
try:
|
try:
|
||||||
EditNote(self.dbstate, self.uistate, [], note,
|
EditNote(self.dbstate, self.uistate, [], note,
|
||||||
self.edit_callback)
|
self.edit_callback, self.callertitle )
|
||||||
except Errors.WindowActiveError:
|
except Errors.WindowActiveError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ class EditFamily(EditPrimary):
|
|||||||
self.note_tab = self._add_tab(
|
self.note_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
NoteTab(self.dbstate, self.uistate, self.track,
|
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(
|
self.gallery_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
|
@ -54,8 +54,10 @@ from RelLib import Note
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class EditNote(EditPrimary):
|
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."""
|
"""Create an EditNote window. Associate a note with the window."""
|
||||||
|
self.callertitle = callertitle
|
||||||
EditPrimary.__init__(self, state, uistate, track, note,
|
EditPrimary.__init__(self, state, uistate, track, note,
|
||||||
state.db.get_note_from_handle, callback)
|
state.db.get_note_from_handle, callback)
|
||||||
|
|
||||||
@ -72,6 +74,9 @@ class EditNote(EditPrimary):
|
|||||||
title = _('Note') + ': %s' % self.obj.get_gramps_id()
|
title = _('Note') + ': %s' % self.obj.get_gramps_id()
|
||||||
else:
|
else:
|
||||||
title = _('New Note')
|
title = _('New Note')
|
||||||
|
if self.callertitle :
|
||||||
|
title += ' - ' + self.callertitle
|
||||||
|
|
||||||
return title
|
return title
|
||||||
|
|
||||||
def _local_init(self):
|
def _local_init(self):
|
||||||
|
@ -308,7 +308,7 @@ class EditPerson(EditPrimary):
|
|||||||
self.note_tab = self._add_tab(
|
self.note_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
NoteTab(self.dbstate, self.uistate, self.track,
|
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(
|
self.gallery_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
|
@ -179,7 +179,7 @@ class EditPlace(EditPrimary):
|
|||||||
self.note_tab = self._add_tab(
|
self.note_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
NoteTab(self.dbstate, self.uistate, self.track,
|
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(
|
self.gallery_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
|
@ -124,7 +124,7 @@ class EditRepository(EditPrimary):
|
|||||||
self.note_tab = self._add_tab(
|
self.note_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
NoteTab(self.dbstate, self.uistate, self.track,
|
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(
|
self.backref_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
|
@ -130,7 +130,7 @@ class EditSource(EditPrimary):
|
|||||||
self.note_tab = self._add_tab(
|
self.note_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
NoteTab(self.dbstate, self.uistate, self.track,
|
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(
|
self.gallery_tab = self._add_tab(
|
||||||
notebook,
|
notebook,
|
||||||
|
Loading…
Reference in New Issue
Block a user