* 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
cfed82ed87
commit
906482c21d
@ -1,4 +1,10 @@
|
|||||||
2006-07-25 Alex Roitman <shura@gramps-project.org>
|
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/_SearchBar.py (get_value,apply_filter): Force unicode.
|
||||||
* src/Filters/_PersonSidebarFilter.py (get_filter): Force unicode.
|
* src/Filters/_PersonSidebarFilter.py (get_filter): Force unicode.
|
||||||
* src/Filters/_FamilySidebarFilter.py (get_filter): Force unicode.
|
* src/Filters/_FamilySidebarFilter.py (get_filter): Force unicode.
|
||||||
|
@ -266,7 +266,7 @@ class MySelect(gtk.ComboBoxEntry):
|
|||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def get_text(self):
|
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):
|
def set_text(self,val):
|
||||||
self.child.set_text(_(val))
|
self.child.set_text(_(val))
|
||||||
|
@ -70,7 +70,7 @@ class HasFamilyEvent(Rule):
|
|||||||
event_handle = event_ref.ref
|
event_handle = event_ref.ref
|
||||||
event = db.get_event_from_handle(event_handle)
|
event = db.get_event_from_handle(event_handle)
|
||||||
val = 1
|
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
|
val = 0
|
||||||
v = self.list[3]
|
v = self.list[3]
|
||||||
if v and event.get_description().upper().find(v.upper())==-1:
|
if v and event.get_description().upper().find(v.upper())==-1:
|
||||||
|
@ -53,7 +53,7 @@ class GrampsType:
|
|||||||
elif type(value) == int:
|
elif type(value) == int:
|
||||||
self.val = value
|
self.val = value
|
||||||
self.string = ''
|
self.string = ''
|
||||||
elif type(value) == str:
|
elif type(value) in (str,unicode):
|
||||||
self.val = self._S2IMAP.get(value,self._CUSTOM)
|
self.val = self._S2IMAP.get(value,self._CUSTOM)
|
||||||
if self.val == self._CUSTOM:
|
if self.val == self._CUSTOM:
|
||||||
self.string = value
|
self.string = value
|
||||||
@ -115,7 +115,7 @@ class GrampsType:
|
|||||||
def __cmp__(self, value):
|
def __cmp__(self, value):
|
||||||
if type(value) == int:
|
if type(value) == int:
|
||||||
return cmp(self.val,value)
|
return cmp(self.val,value)
|
||||||
elif type(value) == str:
|
elif type(value) in (str,unicode):
|
||||||
if self.val == self._CUSTOM:
|
if self.val == self._CUSTOM:
|
||||||
return cmp(self.string,value)
|
return cmp(self.string,value)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user