* 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:
Alex Roitman 2006-07-25 19:52:28 +00:00
parent a34a20409a
commit 865be0198b
4 changed files with 10 additions and 4 deletions

View File

@ -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.

View File

@ -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))

View File

@ -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:

View File

@ -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: