From 642392bbf35a6d84089bd937017e3d751d24dba9 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Wed, 5 Nov 2008 12:36:02 +0000 Subject: [PATCH] #2465 default to equal to, and cleanup hasnote svn: r11252 --- src/FilterEditor/_EditRule.py | 10 +++++----- src/Filters/Rules/Event/_HasNote.py | 4 ++-- src/Filters/Rules/Family/_HasNote.py | 4 ++-- src/Filters/Rules/Person/_HasNote.py | 4 ++-- src/Filters/Rules/Place/_HasNote.py | 4 ++-- src/Filters/Rules/Source/_HasNote.py | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/FilterEditor/_EditRule.py b/src/FilterEditor/_EditRule.py index 7e34e657a..61a4e9b7b 100644 --- a/src/FilterEditor/_EditRule.py +++ b/src/FilterEditor/_EditRule.py @@ -188,7 +188,7 @@ class MyFilters(gtk.ComboBox): #------------------------------------------------------------------------- class MyLesserEqualGreater(gtk.ComboBox): - def __init__(self): + def __init__(self, default=0): gtk.ComboBox.__init__(self) store = gtk.ListStore(gobject.TYPE_STRING) self.set_model(store) @@ -198,7 +198,7 @@ class MyLesserEqualGreater(gtk.ComboBox): self.clist = [_('lesser than'), _('equal to'), _('greater than')] for name in self.clist: store.append(row=[name]) - self.set_active(0) + self.set_active(default) self.show() def get_text(self): @@ -475,10 +475,10 @@ class EditRule(ManagedWindow.ManagedWindow): _('Number of instances:') ]: t = MyInteger(0, 999) - elif v in [_('Reference count must be:'), - _('Number must be') - ]: + elif v == _('Reference count must be:'): t = MyLesserEqualGreater() + elif v == _('Number must be'): + t = MyLesserEqualGreater(1) elif v == _('Number of generations:'): t = MyInteger(1, 32) elif v == _('ID:'): diff --git a/src/Filters/Rules/Event/_HasNote.py b/src/Filters/Rules/Event/_HasNote.py index c99e637ad..48406c764 100755 --- a/src/Filters/Rules/Event/_HasNote.py +++ b/src/Filters/Rules/Event/_HasNote.py @@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase class HasNote(HasNoteBase): """Events having notes""" - name = _('Events having note') - description = _("Matches events having a certain number of items in note") + name = _('Events having notes') + description = _("Matches events having a certain number of notes") diff --git a/src/Filters/Rules/Family/_HasNote.py b/src/Filters/Rules/Family/_HasNote.py index 7a57f987d..209c66638 100755 --- a/src/Filters/Rules/Family/_HasNote.py +++ b/src/Filters/Rules/Family/_HasNote.py @@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase class HasNote(HasNoteBase): """Families having notes""" - name = _('Families having note') - description = _("Matches families having a certain number of items in note") + name = _('Families having notes') + description = _("Matches families having a certain number notes") diff --git a/src/Filters/Rules/Person/_HasNote.py b/src/Filters/Rules/Person/_HasNote.py index c16b73505..806362b55 100644 --- a/src/Filters/Rules/Person/_HasNote.py +++ b/src/Filters/Rules/Person/_HasNote.py @@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase class HasNote(HasNoteBase): """People having notes""" - name = _('People having note') - description = _("Matches people having a certain number of items in note") + name = _('People having notes') + description = _("Matches people having a certain number of notes") diff --git a/src/Filters/Rules/Place/_HasNote.py b/src/Filters/Rules/Place/_HasNote.py index 2142843ad..fd47912bf 100755 --- a/src/Filters/Rules/Place/_HasNote.py +++ b/src/Filters/Rules/Place/_HasNote.py @@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase class HasNote(HasNoteBase): """Places having notes""" - name = _('Places having note') - description = _("Matches places having a certain number of items in note") + name = _('Places having notes') + description = _("Matches places having a certain number of notes") diff --git a/src/Filters/Rules/Source/_HasNote.py b/src/Filters/Rules/Source/_HasNote.py index 05b94581c..2707cad40 100755 --- a/src/Filters/Rules/Source/_HasNote.py +++ b/src/Filters/Rules/Source/_HasNote.py @@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase class HasNote(HasNoteBase): """Sources having notes""" - name = _('Sources having note') - description = _("Matches sources having a certain number of items in note") + name = _('Sources having notes') + description = _("Matches sources having a certain number of notes")