2008-01-30 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/FilterEditor/_FilterEditor.py: pylint fixes and work on 0001660: Title for all Edit Filter windows not translated correctly svn: r9965
This commit is contained in:
parent
e16c8973c5
commit
6374fa2163
@ -1,3 +1,7 @@
|
||||
2008-01-30 Raphael Ackermann <raphael.ackermann@gmail.com>
|
||||
* src/FilterEditor/_FilterEditor.py: pylint fixes and
|
||||
work on 0001660: Title for all Edit Filter windows not translated correctly
|
||||
|
||||
2008-01-30 Raphael Ackermann <raphael.ackermann@gmail.com>
|
||||
* src/FilterEditor/_EditFilter.py: self.space --> self.namespace
|
||||
* src/FilterEditor/_FilterEditor.py: self.space --> self.namespace
|
||||
|
@ -58,12 +58,20 @@ from Filters.Rules._MatchesFilterBase import MatchesFilterBase
|
||||
import ListModel
|
||||
import ManagedWindow
|
||||
from QuestionDialog import QuestionDialog
|
||||
from FilterEditor._EditFilter import EditFilter
|
||||
|
||||
# dictionary mapping FILTER_TYPE of views to Filter window name
|
||||
_TITLES = {
|
||||
'Person' : _("Person Filters"),
|
||||
'Family' : _('Family Filters'),
|
||||
'Event' : _('Event Filters'),
|
||||
'Place' : _('Place Filters'),
|
||||
'Source' : _('Source Filters'),
|
||||
'MediaObject' : _('Media Object Filters'),
|
||||
'Repository' : _('Repository Filters'),
|
||||
'Note' : _('Note Filters'),
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
def __init__(self, namespace, filterdb, dbstate, uistate):
|
||||
|
||||
@ -88,7 +96,8 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
|
||||
self.set_window(self.get_widget('filter_list'),
|
||||
self.get_widget('title'),
|
||||
_('%s filters') % _(self.namespace))
|
||||
_TITLES[self.namespace])
|
||||
# _('%s filters') % _(self.namespace))
|
||||
|
||||
self.edit.connect('clicked', self.edit_filter)
|
||||
self.clone.connect('clicked', self.clone_filter)
|
||||
@ -142,8 +151,6 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
self.clist.add([f.get_name(), f.get_comment()], f)
|
||||
|
||||
def add_new_filter(self, obj):
|
||||
from _EditFilter import EditFilter
|
||||
|
||||
the_filter = GenericFilterFactory(self.namespace)()
|
||||
EditFilter(self.namespace, self.dbstate, self.uistate, self.track,
|
||||
the_filter, self.filterdb, self.draw_filters)
|
||||
@ -151,8 +158,6 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
def edit_filter(self, obj):
|
||||
store, node = self.clist.get_selected()
|
||||
if node:
|
||||
from _EditFilter import EditFilter
|
||||
|
||||
gfilter = self.clist.get_object(node)
|
||||
EditFilter(self.namespace, self.dbstate, self.uistate, self.track,
|
||||
gfilter, self.filterdb, self.draw_filters)
|
||||
@ -160,8 +165,6 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
def clone_filter(self, obj):
|
||||
store, node = self.clist.get_selected()
|
||||
if node:
|
||||
from _EditFilter import EditFilter
|
||||
|
||||
old_filter = self.clist.get_object(node)
|
||||
the_filter = GenericFilterFactory(self.namespace)(old_filter)
|
||||
the_filter.set_name('')
|
||||
@ -171,7 +174,7 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
def test_clicked(self, obj):
|
||||
store, node = self.clist.get_selected()
|
||||
if node:
|
||||
from _ShowResults import ShowResults
|
||||
from FilterEditor._ShowResults import ShowResults
|
||||
|
||||
filt = self.clist.get_object(node)
|
||||
handle_list = filt.apply(self.db, self.get_all_handles())
|
||||
|
Loading…
Reference in New Issue
Block a user