From 5765d9303cc58f3c476dfb74fc6470e6ec8ea3e4 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 27 Nov 2012 20:02:25 +0000 Subject: Expand rows on tap/click This patch changes the normal behaviour of the clicks on rows, so they are expanded just tapping/clicking once on them. This is helpful when the XO is used in eBook mode because the arrows are really small and difficult to tap with the finger. Signed-off-by: Manuel Kaufmann --- diff --git a/logviewer.py b/logviewer.py index 1a77df0..dbe6418 100644 --- a/logviewer.py +++ b/logviewer.py @@ -185,6 +185,12 @@ class MultiLogView(Gtk.HPaned): treestore, text_iter = selection.get_selected() if text_iter is not None: self._show_log(treestore.get_value(text_iter, 0)) + if treestore.iter_has_child(text_iter): + path = treestore.get_path(text_iter) + if treeview.row_expanded(path): + treeview.collapse_row(path) + else: + treeview.expand_row(path, False) def _show_log(self, logfile): if logfile in self.logs: -- cgit v0.9.1