diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index f2750f079..6f779c7a3 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,10 @@ 2006-07-25 Alex Roitman + * src/FilterEditor/_EditRule.py (MySelect.get_text): Dirty hack to + prevent rule editor from crashing. NEEDS REPAIR to stop relying on + the localized text. + * src/Filters/Rules/Person/_HasFamilyEvent.py (apply): Use new API. + * src/RelLib/_GrampsType.py (set,__cmp__): Consider unicode type + along with the str. * src/Filters/_SearchBar.py (get_value,apply_filter): Force unicode. * src/Filters/_PersonSidebarFilter.py (get_filter): Force unicode. * src/Filters/_FamilySidebarFilter.py (get_filter): Force unicode. diff --git a/gramps2/src/FilterEditor/_EditRule.py b/gramps2/src/FilterEditor/_EditRule.py index 53006ec3a..19a09cdd5 100644 --- a/gramps2/src/FilterEditor/_EditRule.py +++ b/gramps2/src/FilterEditor/_EditRule.py @@ -266,7 +266,7 @@ class MySelect(gtk.ComboBoxEntry): self.show() def get_text(self): - return self.transtable.find_key(unicode(self.child.get_text())) + return unicode(self.child.get_text()) def set_text(self,val): self.child.set_text(_(val)) diff --git a/gramps2/src/Filters/Rules/Person/_HasFamilyEvent.py b/gramps2/src/Filters/Rules/Person/_HasFamilyEvent.py index 1381f9aee..b55663d17 100644 --- a/gramps2/src/Filters/Rules/Person/_HasFamilyEvent.py +++ b/gramps2/src/Filters/Rules/Person/_HasFamilyEvent.py @@ -70,7 +70,7 @@ class HasFamilyEvent(Rule): event_handle = event_ref.ref event = db.get_event_from_handle(event_handle) val = 1 - if self.list[0] and event.get_name() != self.list[0]: + if self.list[0] and event.get_type() != self.list[0]: val = 0 v = self.list[3] if v and event.get_description().upper().find(v.upper())==-1: diff --git a/gramps2/src/RelLib/_GrampsType.py b/gramps2/src/RelLib/_GrampsType.py index ba4c3eb4d..b1273bb31 100644 --- a/gramps2/src/RelLib/_GrampsType.py +++ b/gramps2/src/RelLib/_GrampsType.py @@ -53,7 +53,7 @@ class GrampsType: elif type(value) == int: self.val = value self.string = '' - elif type(value) == str: + elif type(value) in (str,unicode): self.val = self._S2IMAP.get(value,self._CUSTOM) if self.val == self._CUSTOM: self.string = value @@ -115,7 +115,7 @@ class GrampsType: def __cmp__(self, value): if type(value) == int: return cmp(self.val,value) - elif type(value) == str: + elif type(value) in (str,unicode): if self.val == self._CUSTOM: return cmp(self.string,value) else: