Check for GtkTreeIter in selection tuple before using to lookup option; closes #893

This commit is contained in:
Travis Shirk 2005-09-21 03:19:45 +00:00
parent e39f1a30e8
commit 238cc2171c
1 changed files with 9 additions and 7 deletions

View File

@ -99,13 +99,15 @@ class AdvancedConfigurationWindow:
def on_advanced_treeview_selection_changed(self, treeselection):
iter = treeselection.get_selected()
# Get text from first column in this row
opt = iter[0][iter[1]][0]
desc = gajim.config.get_desc(opt)
if desc:
self.desc_label.set_text(_(desc))
else:
self.desc_label.set_text(_('(None)'))
# Check for GtkTreeIter
if iter[1]:
# Get text from first column in this row
opt = iter[0][iter[1]][0]
desc = gajim.config.get_desc(opt)
if desc:
self.desc_label.set_text(_(desc))
else:
self.desc_label.set_text(_('(None)'))
def on_advanced_treeview_row_activated(self, treeview, path, column):
modelpath = self.modelfilter.convert_path_to_child_path(path)