8352 Change lesser than to less than
This commit is contained in:
parent
7c40164022
commit
a40c865c1a
@ -49,7 +49,7 @@ class HasGalleryBase(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -60,7 +60,7 @@ class HasGalleryBase(Rule):
|
|||||||
|
|
||||||
def apply(self, db, obj):
|
def apply(self, db, obj):
|
||||||
count = len( obj.get_media_list())
|
count = len( obj.get_media_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -52,7 +52,7 @@ class HasLDSBase(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -63,7 +63,7 @@ class HasLDSBase(Rule):
|
|||||||
|
|
||||||
def apply(self, db, obj):
|
def apply(self, db, obj):
|
||||||
count = len( obj.get_lds_ord_list())
|
count = len( obj.get_lds_ord_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -58,7 +58,7 @@ class HasNoteBase(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -70,7 +70,7 @@ class HasNoteBase(Rule):
|
|||||||
|
|
||||||
def apply(self, db, obj):
|
def apply(self, db, obj):
|
||||||
count = len( obj.get_note_list())
|
count = len( obj.get_note_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -47,7 +47,7 @@ class HasReferenceCountBase(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[0] == 'lesser than':
|
if self.list[0] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[0] == 'greater than':
|
elif self.list[0] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -63,7 +63,7 @@ class HasReferenceCountBase(Rule):
|
|||||||
for item in db.find_backlink_handles(handle):
|
for item in db.find_backlink_handles(handle):
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -50,7 +50,7 @@ class HasSourceCountBase(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -61,7 +61,7 @@ class HasSourceCountBase(Rule):
|
|||||||
|
|
||||||
def apply(self, db, obj):
|
def apply(self, db, obj):
|
||||||
count = len(obj.get_citation_list())
|
count = len(obj.get_citation_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -53,7 +53,7 @@ class HasAddress(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -64,7 +64,7 @@ class HasAddress(Rule):
|
|||||||
|
|
||||||
def apply(self, db, person):
|
def apply(self, db, person):
|
||||||
count = len( person.get_address_list())
|
count = len( person.get_address_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -52,7 +52,7 @@ class HasAssociation(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -63,7 +63,7 @@ class HasAssociation(Rule):
|
|||||||
|
|
||||||
def apply(self, db, person):
|
def apply(self, db, person):
|
||||||
count = len(person.get_person_ref_list())
|
count = len(person.get_person_ref_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.selected_count
|
return count < self.selected_count
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.selected_count
|
return count > self.selected_count
|
||||||
|
@ -50,7 +50,7 @@ class HasRepository(Rule):
|
|||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
if self.list[1] == 'lesser than':
|
if self.list[1] == 'less than':
|
||||||
self.count_type = 0
|
self.count_type = 0
|
||||||
elif self.list[1] == 'greater than':
|
elif self.list[1] == 'greater than':
|
||||||
self.count_type = 2
|
self.count_type = 2
|
||||||
@ -61,7 +61,7 @@ class HasRepository(Rule):
|
|||||||
|
|
||||||
def apply(self, db, obj):
|
def apply(self, db, obj):
|
||||||
count = len(obj.get_reporef_list())
|
count = len(obj.get_reporef_list())
|
||||||
if self.count_type == 0: # "lesser than"
|
if self.count_type == 0: # "less than"
|
||||||
return count < self.userSelectedCount
|
return count < self.userSelectedCount
|
||||||
elif self.count_type == 2: # "greater than"
|
elif self.count_type == 2: # "greater than"
|
||||||
return count > self.userSelectedCount
|
return count > self.userSelectedCount
|
||||||
|
@ -243,8 +243,8 @@ class MyLesserEqualGreater(Gtk.ComboBox):
|
|||||||
cell = Gtk.CellRendererText()
|
cell = Gtk.CellRendererText()
|
||||||
self.pack_start(cell, True)
|
self.pack_start(cell, True)
|
||||||
self.add_attribute(cell, 'text', 0)
|
self.add_attribute(cell, 'text', 0)
|
||||||
self.clist = ['lesser than', 'equal to', 'greater than']
|
self.clist = ['less than', 'equal to', 'greater than']
|
||||||
self.clist_trans = [_('lesser than'), _('equal to'), _('greater than')]
|
self.clist_trans = [_('less than'), _('equal to'), _('greater than')]
|
||||||
for name in self.clist_trans:
|
for name in self.clist_trans:
|
||||||
store.append(row=[name])
|
store.append(row=[name])
|
||||||
self.set_active(default)
|
self.set_active(default)
|
||||||
|
Loading…
Reference in New Issue
Block a user