* src/plugins/FilterEditor.py: handle unicode characters

* src/PeopleStore.py: handle corrupt iter


svn: r2663
This commit is contained in:
Don Allingham 2004-01-19 23:07:10 +00:00
parent 8e5923dc58
commit 6e798635d7

View File

@ -196,18 +196,21 @@ class PeopleStore:
self.model.clear() self.model.clear()
def remove(self,iter): def remove(self,iter):
iter_parent = self.model.iter_parent (iter) try:
self.model.remove(iter) iter_parent = self.model.iter_parent (iter)
if iter_parent and not self.model.iter_has_child (iter_parent): self.model.remove(iter)
name = unicode(self.model.get_value(iter_parent,0)) if iter_parent and not self.model.iter_has_child (iter_parent):
self.model.remove (iter_parent) name = unicode(self.model.get_value(iter_parent,0))
if self.tree_roots.has_key(name): self.model.remove (iter_parent)
del self.tree_roots[name] if self.tree_roots.has_key(name):
if self.tree_open.has_key(name): del self.tree_roots[name]
del self.tree_open[name] if self.tree_open.has_key(name):
if self.tree_list.has_key(name): del self.tree_open[name]
del self.tree_list[name] if self.tree_list.has_key(name):
self.count = self.count - 1 del self.tree_list[name]
self.count = self.count - 1
except:
pass
def get_row(self,iter): def get_row(self,iter):
row = self.model.get_path(iter) row = self.model.get_path(iter)