#2465 default to equal to, and cleanup hasnote

svn: r11252
This commit is contained in:
Benny Malengier 2008-11-05 12:36:02 +00:00
parent 0caef9a59b
commit 642392bbf3
6 changed files with 15 additions and 15 deletions

View File

@ -188,7 +188,7 @@ class MyFilters(gtk.ComboBox):
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MyLesserEqualGreater(gtk.ComboBox): class MyLesserEqualGreater(gtk.ComboBox):
def __init__(self): def __init__(self, default=0):
gtk.ComboBox.__init__(self) gtk.ComboBox.__init__(self)
store = gtk.ListStore(gobject.TYPE_STRING) store = gtk.ListStore(gobject.TYPE_STRING)
self.set_model(store) self.set_model(store)
@ -198,7 +198,7 @@ class MyLesserEqualGreater(gtk.ComboBox):
self.clist = [_('lesser than'), _('equal to'), _('greater than')] self.clist = [_('lesser than'), _('equal to'), _('greater than')]
for name in self.clist: for name in self.clist:
store.append(row=[name]) store.append(row=[name])
self.set_active(0) self.set_active(default)
self.show() self.show()
def get_text(self): def get_text(self):
@ -475,10 +475,10 @@ class EditRule(ManagedWindow.ManagedWindow):
_('Number of instances:') _('Number of instances:')
]: ]:
t = MyInteger(0, 999) t = MyInteger(0, 999)
elif v in [_('Reference count must be:'), elif v == _('Reference count must be:'):
_('Number must be')
]:
t = MyLesserEqualGreater() t = MyLesserEqualGreater()
elif v == _('Number must be'):
t = MyLesserEqualGreater(1)
elif v == _('Number of generations:'): elif v == _('Number of generations:'):
t = MyInteger(1, 32) t = MyInteger(1, 32)
elif v == _('ID:'): elif v == _('ID:'):

View File

@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase
class HasNote(HasNoteBase): class HasNote(HasNoteBase):
"""Events having notes""" """Events having notes"""
name = _('Events having <count> note') name = _('Events having <count> notes')
description = _("Matches events having a certain number of items in note") description = _("Matches events having a certain number of notes")

View File

@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase
class HasNote(HasNoteBase): class HasNote(HasNoteBase):
"""Families having notes""" """Families having notes"""
name = _('Families having <count> note') name = _('Families having <count> notes')
description = _("Matches families having a certain number of items in note") description = _("Matches families having a certain number notes")

View File

@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase
class HasNote(HasNoteBase): class HasNote(HasNoteBase):
"""People having notes""" """People having notes"""
name = _('People having <count> note') name = _('People having <count> notes')
description = _("Matches people having a certain number of items in note") description = _("Matches people having a certain number of notes")

View File

@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase
class HasNote(HasNoteBase): class HasNote(HasNoteBase):
"""Places having notes""" """Places having notes"""
name = _('Places having <count> note') name = _('Places having <count> notes')
description = _("Matches places having a certain number of items in note") description = _("Matches places having a certain number of notes")

View File

@ -43,5 +43,5 @@ from Filters.Rules._HasNoteBase import HasNoteBase
class HasNote(HasNoteBase): class HasNote(HasNoteBase):
"""Sources having notes""" """Sources having notes"""
name = _('Sources having <count> note') name = _('Sources having <count> notes')
description = _("Matches sources having a certain number of items in note") description = _("Matches sources having a certain number of notes")