diff --git a/src/FilterEditor/_FilterEditor.py b/src/FilterEditor/_FilterEditor.py index 8276dece1..0c2eb247b 100644 --- a/src/FilterEditor/_FilterEditor.py +++ b/src/FilterEditor/_FilterEditor.py @@ -52,8 +52,7 @@ import GrampsDisplay # #------------------------------------------------------------------------- import const -from Filters import (GenericFilterFactory, FilterList, reload_custom_filters, - reload_system_filters) +from Filters import (GenericFilterFactory, FilterList, reload_custom_filters) from Filters.Rules._MatchesFilterBase import MatchesFilterBase import ListModel import ManagedWindow @@ -140,7 +139,7 @@ class FilterEditor(ManagedWindow.ManagedWindow): def close(self, *obj): self.filterdb.save() reload_custom_filters() - reload_system_filters() + #reload_system_filters() self.uistate.emit('filters-changed', (self.namespace,)) ManagedWindow.ManagedWindow.close(self, *obj) diff --git a/src/Filters/Rules/_MatchesFilterBase.py b/src/Filters/Rules/_MatchesFilterBase.py index 7f4930bdd..afbb3aafa 100644 --- a/src/Filters/Rules/_MatchesFilterBase.py +++ b/src/Filters/Rules/_MatchesFilterBase.py @@ -55,11 +55,11 @@ class MatchesFilterBase(Rule): category = _('General filters') def prepare(self, db): - if Filters.SystemFilters: - for filt in Filters.SystemFilters.get_filters(self.namespace): - if filt.get_name() == self.list[0]: - for rule in filt.flist: - rule.prepare(db) + #if Filters.SystemFilters: + #for filt in Filters.SystemFilters.get_filters(self.namespace): + #if filt.get_name() == self.list[0]: + #for rule in filt.flist: + #rule.prepare(db) if Filters.CustomFilters: for filt in Filters.CustomFilters.get_filters(self.namespace): if filt.get_name() == self.list[0]: @@ -67,11 +67,11 @@ class MatchesFilterBase(Rule): rule.prepare(db) def reset(self): - if Filters.SystemFilters: - for filt in Filters.SystemFilters.get_filters(self.namespace): - if filt.get_name() == self.list[0]: - for rule in filt.flist: - rule.reset() + #if Filters.SystemFilters: + #for filt in Filters.SystemFilters.get_filters(self.namespace): + #if filt.get_name() == self.list[0]: + #for rule in filt.flist: + #rule.reset() if Filters.CustomFilters: for filt in Filters.CustomFilters.get_filters(self.namespace): if filt.get_name() == self.list[0]: @@ -79,10 +79,10 @@ class MatchesFilterBase(Rule): rule.reset() def apply(self, db, obj): - if Filters.SystemFilters: - for filt in Filters.SystemFilters.get_filters(self.namespace): - if filt.get_name() == self.list[0]: - return filt.check(db, obj.handle) + #if Filters.SystemFilters: + #for filt in Filters.SystemFilters.get_filters(self.namespace): + #if filt.get_name() == self.list[0]: + #return filt.check(db, obj.handle) if Filters.CustomFilters: for filt in Filters.CustomFilters.get_filters(self.namespace): if filt.get_name() == self.list[0]: @@ -93,10 +93,10 @@ class MatchesFilterBase(Rule): """ Return the selected filter or None. """ - if Filters.SystemFilters: - for filt in Filters.SystemFilters.get_filters(self.namespace): - if filt.get_name() == self.list[0]: - return filt + #if Filters.SystemFilters: + #for filt in Filters.SystemFilters.get_filters(self.namespace): + #if filt.get_name() == self.list[0]: + #return filt if Filters.CustomFilters: for filt in Filters.CustomFilters.get_filters(self.namespace): if filt.get_name() == self.list[0]: diff --git a/src/Filters/_FilterComboBox.py b/src/Filters/_FilterComboBox.py index 5553f8551..8987ae6b6 100644 --- a/src/Filters/_FilterComboBox.py +++ b/src/Filters/_FilterComboBox.py @@ -37,7 +37,7 @@ import gobject # GRAMPS modules # #------------------------------------------------------------------------- -from Filters import SystemFilters, CustomFilters +from Filters import CustomFilters #------------------------------------------------------------------------- # @@ -64,12 +64,12 @@ class FilterComboBox(gtk.ComboBox): active = cnt cnt += 1 - for filt in SystemFilters.get_filters(): - self.store.append(row=[filt.get_name()]) - self.map[unicode(filt.get_name())] = filt - if default != "" and default == filt.get_name(): - active = cnt - cnt += 1 + #for filt in SystemFilters.get_filters(): + #self.store.append(row=[filt.get_name()]) + #self.map[unicode(filt.get_name())] = filt + #if default != "" and default == filt.get_name(): + #active = cnt + #cnt += 1 for filt in CustomFilters.get_filters(): self.store.append(row=[filt.get_name()]) @@ -82,10 +82,10 @@ class FilterComboBox(gtk.ComboBox): self.set_active(active) elif len(local_filters): self.set_active(2) - elif len(SystemFilters.get_filters()): - self.set_active(4 + len(local_filters)) + #elif len(SystemFilters.get_filters()): + #self.set_active(4 + len(local_filters)) elif len(CustomFilters.get_filters()): - self.set_active(6 + len(local_filters) + len(SystemFilters.get_filters())) + self.set_active(4 + len(local_filters)) else: self.set_active(0) diff --git a/src/Filters/_FilterMenu.py b/src/Filters/_FilterMenu.py index 6a10353e7..1d80c5945 100644 --- a/src/Filters/_FilterMenu.py +++ b/src/Filters/_FilterMenu.py @@ -34,13 +34,12 @@ import gobject # #------------------------------------------------------------------------- def build_filter_model(space, local = []): - from Filters import SystemFilters, CustomFilters + from Filters import CustomFilters model = gtk.ListStore(gobject.TYPE_STRING, object) if isinstance(space, basestring): - flist = local + SystemFilters.get_filters(space) + \ - CustomFilters.get_filters(space) + flist = local + CustomFilters.get_filters(space) elif isinstance(space, (list, tuple)): flist = space else: diff --git a/src/Filters/_FilterStore.py b/src/Filters/_FilterStore.py index b2b2074c3..2b17e00dd 100644 --- a/src/Filters/_FilterStore.py +++ b/src/Filters/_FilterStore.py @@ -37,7 +37,7 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Filters import SystemFilters, CustomFilters +from Filters import CustomFilters #------------------------------------------------------------------------- # @@ -60,8 +60,7 @@ class FilterStore(gtk.ListStore): self.def_index = cnt cnt += 1 - for filt in SystemFilters.get_filters(namespace) + \ - CustomFilters.get_filters(namespace): + for filt in CustomFilters.get_filters(namespace): name = _(filt.get_name()) self.append(row=[name]) self.list_map.append(filt) diff --git a/src/Filters/__init__.py b/src/Filters/__init__.py index 109eea271..bad84f70b 100644 --- a/src/Filters/__init__.py +++ b/src/Filters/__init__.py @@ -24,26 +24,26 @@ Package providing filtering framework for GRAMPS. """ -SystemFilters = None +#SystemFilters = None CustomFilters = None -from const import SYSTEM_FILTERS, CUSTOM_FILTERS +from const import CUSTOM_FILTERS from _FilterList import FilterList from _GenericFilter import GenericFilter, GenericFilterFactory from _ParamFilter import ParamFilter -def reload_system_filters(): - global SystemFilters - SystemFilters = FilterList(SYSTEM_FILTERS) - SystemFilters.load() +#def reload_system_filters(): + #global SystemFilters + #SystemFilters = FilterList(SYSTEM_FILTERS) + #SystemFilters.load() def reload_custom_filters(): global CustomFilters CustomFilters = FilterList(CUSTOM_FILTERS) CustomFilters.load() -if not SystemFilters: - reload_system_filters() +#if not SystemFilters: + #reload_system_filters() if not CustomFilters: reload_custom_filters() diff --git a/src/const.py.in b/src/const.py.in index 638d6e0bf..ed5272281 100644 --- a/src/const.py.in +++ b/src/const.py.in @@ -136,7 +136,7 @@ RULE_GLADE = os.path.join(GLADE_DIR, "rule.glade") PLUGINS_DIR = os.path.join(ROOT_DIR, "plugins") DATA_DIR = os.path.join(ROOT_DIR, "data") -SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml") +#SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml") TIP_DATA = os.path.join(DATA_DIR, "tips.xml") PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml") diff --git a/src/data/Makefile.am b/src/data/Makefile.am index 097079e65..a47e247f8 100644 --- a/src/data/Makefile.am +++ b/src/data/Makefile.am @@ -9,7 +9,6 @@ dist_pkgdata_DATA = \ authors.xml \ gedcom.xml \ papersize.xml \ - system_filters.xml \ tips.xml\ lds.xml\ behaviour.css\