Code optimizations wrt handling of None - bug 2212

svn: r10811
This commit is contained in:
Gerald Britton
2008-06-16 15:01:46 +00:00
parent 47095b4e98
commit 4982292774
124 changed files with 379 additions and 377 deletions

View File

@ -141,7 +141,7 @@ class StandardCustomSelector:
self.selector.set_text_column(1)
else:
self.selector = gtk.ComboBoxEntry(self.store, 1)
if self.active_key != None:
if self.active_key is not None:
self.selector.set_active(self.active_index)
# make autocompletion work
@ -222,7 +222,7 @@ class StandardCustomSelector:
key, text = val
if key in self.mapping.keys() and key != self.custom_key:
self.store.foreach(self.set_int_value, key)
elif self.custom_key != None:
elif self.custom_key is not None:
self.selector.child.set_text(text)
else:
print "StandardCustomSelector.set(): Option not available:", val