diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-11-27 20:02:25 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-11-28 11:07:13 (GMT) |
commit | 5765d9303cc58f3c476dfb74fc6470e6ec8ea3e4 (patch) | |
tree | f36dc6e4f7e841469b39da1ac55e8da015d65a8e | |
parent | f960e63ec090cc0b796dc3b8cb3c3da1f49ff09c (diff) |
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 <humitos@gmail.com>
-rw-r--r-- | logviewer.py | 6 |
1 files changed, 6 insertions, 0 deletions
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: |