diff --git a/gramps/src/Filter.py b/gramps/src/Filter.py
index 92bdac432..f1cc9c46d 100644
--- a/gramps/src/Filter.py
+++ b/gramps/src/Filter.py
@@ -70,17 +70,19 @@ class Filter:
#
#-------------------------------------------------------------------------
-_filter_list = [(Filter, _("All people"), 0)]
+_filter_list = [(Filter, _("All people"), 0, _("Qualifier"))]
_filter2class = {}
_filter2descr = {}
-def register_filter(class_name, description=None, qualifier=0):
+def register_filter(class_name, description=None, qualifier=0, label=None):
name = str(class_name)
+ if label == None:
+ label = _("Qualifier")
if description == None:
description = _("No description")
_filter2class[name] = class_name
_filter2descr[name] = description
- _filter_list.append((class_name,description,qualifier))
+ _filter_list.append((class_name,description,qualifier,label))
def get_filter_description(name):
if _filter2descr.has_key(name):
@@ -132,6 +134,7 @@ def build_filter_menu(callback,fw):
menuitem.set_data("name",filter[1])
menuitem.set_data("function",filter[0])
menuitem.set_data("qual",filter[2])
+ menuitem.set_data("label",filter[3])
menuitem.connect("activate",callback)
menuitem.show()
return myMenu
diff --git a/gramps/src/filters/After.py b/gramps/src/filters/After.py
index 575ecc492..634c3010a 100644
--- a/gramps/src/filters/After.py
+++ b/gramps/src/filters/After.py
@@ -54,5 +54,6 @@ class EventAfter(Filter.Filter):
#--------------------------------------------------------------------
Filter.register_filter(EventAfter,
description=_("People with an event after ..."),
+ label=_("Date"),
qualifier=1)
diff --git a/gramps/src/filters/Before.py b/gramps/src/filters/Before.py
index a538b56c7..e97518550 100644
--- a/gramps/src/filters/Before.py
+++ b/gramps/src/filters/Before.py
@@ -54,5 +54,6 @@ class EventBefore(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(EventBefore,
description=_("People with an event before ..."),
+ label=_("Date"),
qualifier=1)
diff --git a/gramps/src/filters/EventPlace.py b/gramps/src/filters/EventPlace.py
index 823cf8c7f..fefa83dbc 100644
--- a/gramps/src/filters/EventPlace.py
+++ b/gramps/src/filters/EventPlace.py
@@ -69,4 +69,5 @@ class EventPlace(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(EventPlace,
description=_("People with an event location of ..."),
+ label=_("Place"),
qualifier=1)
diff --git a/gramps/src/filters/EventType.py b/gramps/src/filters/EventType.py
index 267326328..76a11b939 100644
--- a/gramps/src/filters/EventType.py
+++ b/gramps/src/filters/EventType.py
@@ -39,4 +39,5 @@ class EventType(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(EventType,
description=_("People who have an event type of ..."),
+ label=_("Event"),
qualifier=1)
diff --git a/gramps/src/filters/MatchSndEx.py b/gramps/src/filters/MatchSndEx.py
index 98cb93035..644873e2c 100644
--- a/gramps/src/filters/MatchSndEx.py
+++ b/gramps/src/filters/MatchSndEx.py
@@ -43,4 +43,5 @@ class MatchSndEx(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(MatchSndEx,
description=_("Names with same SoundEx code as ..."),
+ label=_("Surname"),
qualifier=1)
diff --git a/gramps/src/filters/MatchSndEx2.py b/gramps/src/filters/MatchSndEx2.py
index 2b6d84b4d..4d5f2bf6d 100644
--- a/gramps/src/filters/MatchSndEx2.py
+++ b/gramps/src/filters/MatchSndEx2.py
@@ -39,4 +39,5 @@ class MatchSndEx2(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(MatchSndEx2,
description=_("Names with the specified SoundEx code"),
+ label=_("SoundEx Code"),
qualifier=1)
diff --git a/gramps/src/filters/RegExMatch.py b/gramps/src/filters/RegExMatch.py
index 1a12896d4..754562c26 100644
--- a/gramps/src/filters/RegExMatch.py
+++ b/gramps/src/filters/RegExMatch.py
@@ -50,6 +50,7 @@ class RegExMatch(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(RegExMatch,
description=_("Names that match a regular expression"),
+ label=_("Text"),
qualifier=1)
diff --git a/gramps/src/filters/SubString.py b/gramps/src/filters/SubString.py
index 6f445a4d2..93fae4ff8 100644
--- a/gramps/src/filters/SubString.py
+++ b/gramps/src/filters/SubString.py
@@ -39,5 +39,6 @@ class SubString(Filter.Filter):
#------------------------------------------------------------------------
Filter.register_filter(SubString,
description=_("Names that contain a substring"),
+ label=_("Text"),
qualifier=1)
diff --git a/gramps/src/gramps.glade b/gramps/src/gramps.glade
index e46609803..9a77ccb3a 100644
--- a/gramps/src/gramps.glade
+++ b/gramps/src/gramps.glade
@@ -792,13 +792,14 @@
0
5
- False
- False
+ True
+ True
GtkLabel
- label185
+ qual
+ False
GTK_JUSTIFY_CENTER
False
@@ -816,56 +817,69 @@
GtkEntry
filter
+ False
True
activate
on_apply_filter_clicked
Thu, 06 Sep 2001 23:02:43 GMT
- True
+ False
True
0
+
+ 0
+ True
+ True
+
+
+
+
+
+ GtkHBox
+ hbox74
+ False
+ 0
+
+ 3
+ False
+ False
+
+
+
+ GtkCheckButton
+ invert
+ Show persons that do not match the filtering rule
+ True
+
+ False
+ True
0
False
False
-
-
- GtkCheckButton
- invert
- Show persons that do not match the filtering rule
- True
-
- False
- True
-
- 5
- False
- False
-
-
-
-
- GtkButton
- apply_filter
- True
-
- clicked
- on_apply_filter_clicked
-
- Sat, 21 Oct 2000 03:36:06 GMT
-
- GNOME_STOCK_BUTTON_APPLY
- GTK_RELIEF_NORMAL
-
- 4
- False
- False
-
+
+ GtkButton
+ apply_filter
+ True
+
+ clicked
+ on_apply_filter_clicked
+
+ Sat, 21 Oct 2000 03:36:06 GMT
+
+ GNOME_STOCK_BUTTON_APPLY
+ GTK_RELIEF_NORMAL
+
+ 0
+ False
+ False
+
+
diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py
index 9fea1f877..bb02e56e7 100755
--- a/gramps/src/gramps_main.py
+++ b/gramps/src/gramps_main.py
@@ -1323,7 +1323,17 @@ def on_apply_filter_clicked(obj):
#
#-------------------------------------------------------------------------
def on_filter_name_changed(obj):
+ qlabel = gtop.get_widget("qual")
filter = obj.get_data("filter")
+ if obj.get_data("qual"):
+ qlabel.show()
+ qlabel.set_sensitive(1)
+ qlabel.set_text(obj.get_data("label"))
+ filter.show()
+ else:
+ qlabel.hide()
+ filter.hide()
+
filter.set_sensitive(obj.get_data("qual"))
#-------------------------------------------------------------------------