* 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. svn: r7075
This commit is contained in:
parent
a34a20409a
commit
865be0198b
@ -1,4 +1,10 @@
|
||||
2006-07-25 Alex Roitman <shura@gramps-project.org>
|
||||
* 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.
|
||||
|
@ -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))
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user