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

@@ -274,7 +274,7 @@ class ButtonTab(GrampsTab):
# explicitly, dirty_selection must make sure they do not interact
if self.dirty_selection:
return
if self.get_selected() != None:
if self.get_selected() is not None:
self.edit_btn.set_sensitive(True)
if self.jump_btn:
self.jump_btn.set_sensitive(True)

View File

@@ -241,7 +241,7 @@ class EmbeddedList(ButtonTab):
def _find_row(self, x, y):
row = self.tree.get_path_at_pos(x, y)
if row == None:
if row is None:
return len(self.get_data())
else:
return row[0][0]

View File

@@ -203,7 +203,7 @@ class GalleryTab(ButtonTab):
def _update_internal_list(self, *obj):
newlist = []
node = self.iconmodel.get_iter_first()
while node != None:
while node is not None:
newlist.append(self.iconmodel.get_value(node, 2))
node = self.iconmodel.iter_next(node)
for i in xrange(len(self.media_list)):