* src/DataViews/_NoteView.py: Enable filter editor
* src/FilterEditor/_FilterEditor.py: Note Filter Editor * src/FilterEditor/_EditRule.py: Note Filter Editor * src/Filters/Rules/Note/_HasNote.py: Rename label * src/Filters/Rules/Note/__init__.py: Add more rules * src/Filters/Rules/__init__.py: Add Note Rules svn: r8232
This commit is contained in:
parent
706916af15
commit
ac3e84d207
@ -1,3 +1,11 @@
|
||||
2007-02-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/DataViews/_NoteView.py: Enable filter editor
|
||||
* src/FilterEditor/_FilterEditor.py: Note Filter Editor
|
||||
* src/FilterEditor/_EditRule.py: Note Filter Editor
|
||||
* src/Filters/Rules/Note/_HasNote.py: Rename label
|
||||
* src/Filters/Rules/Note/__init__.py: Add more rules
|
||||
* src/Filters/Rules/__init__.py: Add Note Rules
|
||||
|
||||
2007-02-24 Don Allingham <don@gramps-project.org>
|
||||
* src/DisplayTabs/_NoteModel.py: added
|
||||
* src/DisplayTabs/_NoteTab.py: support new list
|
||||
|
@ -106,8 +106,8 @@ class NoteView(PageView.ListView):
|
||||
PageView.ListView.define_actions(self)
|
||||
# self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
# _('_Column Editor'), callback=self.column_editor)
|
||||
# self.add_action('FilterEdit', None, _('Place Filter Editor'),
|
||||
# callback=self.filter_editor,)
|
||||
self.add_action('FilterEdit', None, _('Note Filter Editor'),
|
||||
callback=self.filter_editor,)
|
||||
|
||||
# def drag_info(self):
|
||||
# return DdTargets.PLACE_LINK
|
||||
@ -149,6 +149,7 @@ class NoteView(PageView.ListView):
|
||||
<menuitem action="Remove"/>
|
||||
</placeholder>
|
||||
<menuitem action="ColumnEdit"/>
|
||||
<menuitem action="FilterEdit"/>
|
||||
</menu>
|
||||
</menubar>
|
||||
<toolbar name="ToolBar">
|
||||
|
@ -85,6 +85,7 @@ _name2typeclass = {
|
||||
_('Family attribute:') : RelLib.AttributeType,
|
||||
_('Relationship type:') : RelLib.FamilyRelType,
|
||||
_('Marker type:') : RelLib.MarkerType,
|
||||
_('Note type:') : RelLib.NoteType,
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -232,6 +233,7 @@ class MyID(gtk.HBox):
|
||||
'Source' : _('Source'),
|
||||
'MediaObject' : _('Media Object'),
|
||||
'Repository' : _('Repository'),
|
||||
'Note' : _('Note'),
|
||||
}
|
||||
|
||||
def __init__(self, dbstate, uistate, track, namespace='Person'):
|
||||
@ -292,6 +294,9 @@ class MyID(gtk.HBox):
|
||||
elif self.namespace == 'Repository':
|
||||
repo = self.db.get_repository_from_gramps_id(gramps_id)
|
||||
name = repo.get_name()
|
||||
elif self.namespace == 'Note':
|
||||
note = self.db.get_note_from_gramps_id(gramps_id)
|
||||
name = note.get()
|
||||
return name
|
||||
|
||||
def set_text(self,val):
|
||||
@ -388,6 +393,8 @@ class EditRule(ManagedWindow.ManagedWindow):
|
||||
class_list = Rules.MediaObject.editor_rule_list
|
||||
elif self.space == 'Repository':
|
||||
class_list = Rules.Repository.editor_rule_list
|
||||
elif self.space == 'Note':
|
||||
class_list = Rules.Note.editor_rule_list
|
||||
|
||||
for class_obj in class_list:
|
||||
arglist = class_obj.labels
|
||||
|
@ -199,3 +199,5 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
return self.db.get_media_object_handles()
|
||||
elif self.space == 'Repository':
|
||||
return self.db.get_repository_handles()
|
||||
elif self.space == 'Note':
|
||||
return self.db.get_note_handles()
|
||||
|
@ -45,7 +45,7 @@ class HasNote(Rule):
|
||||
|
||||
|
||||
labels = [ _('Text:'),
|
||||
_('Type:'),
|
||||
_('Note type:'),
|
||||
]
|
||||
name = _('Notes matching parameters')
|
||||
description = _("Matches Notes with particular parameters")
|
||||
|
@ -29,8 +29,8 @@ __author__ = "Don Allingham"
|
||||
from _AllNotes import AllNotes
|
||||
from _HasIdOf import HasIdOf
|
||||
from _RegExpIdOf import RegExpIdOf
|
||||
#from _HasNoteRegexp import HasNoteRegexp
|
||||
#from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
|
||||
from _HasNoteRegexp import HasNoteRegexp
|
||||
from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
|
||||
from _NotePrivate import NotePrivate
|
||||
from _MatchesFilter import MatchesFilter
|
||||
from _HasNote import HasNote
|
||||
@ -39,8 +39,9 @@ editor_rule_list = [
|
||||
AllNotes,
|
||||
HasIdOf,
|
||||
RegExpIdOf,
|
||||
# HasNoteRegexp,
|
||||
# HasNoteMatchingSubstringOf,
|
||||
HasNote,
|
||||
HasNoteRegexp,
|
||||
HasNoteMatchingSubstringOf,
|
||||
NotePrivate,
|
||||
MatchesFilter,
|
||||
]
|
||||
|
@ -43,3 +43,4 @@ import Source
|
||||
import Place
|
||||
import MediaObject
|
||||
import Repository
|
||||
import Note
|
||||
|
Loading…
Reference in New Issue
Block a user