185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
def iter_cats(self, name, model, iter):
while iter:
val = model.get_value(iter, 0)
if val == name:
#log.UI("FOUND CATEGORY", name, "βselect")
self.gtk_cat.get_selection().select_iter(iter)
self.gtk_cat.set_cursor(model.get_path(iter))
return True
if model.iter_has_child(iter):
found = self.iter_cats(name, model, model.iter_children(iter))
if found:
self.gtk_cat.expand_row(model.get_path(iter), 0)
return True
iter = model.iter_next(iter)
|
>
|
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
def iter_cats(self, name, model, iter):
while iter:
val = model.get_value(iter, 0)
if val == name:
#log.UI("FOUND CATEGORY", name, "βselect")
self.gtk_cat.get_selection().select_iter(iter)
self.gtk_cat.set_cursor(model.get_path(iter))
self.gtk_cat.scroll_to_cell(model.get_path(iter), None)
return True
if model.iter_has_child(iter):
found = self.iter_cats(name, model, model.iter_children(iter))
if found:
self.gtk_cat.expand_row(model.get_path(iter), 0)
return True
iter = model.iter_next(iter)
|