Code optimizations wrt handling of None - bug 2212
svn: r10811
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)):
|
||||
|
||||
Reference in New Issue
Block a user