Ticket #4197: 0001-Expand-rows-on-tap-click.patch

File 0001-Expand-rows-on-tap-click.patch, 1.2 KB (added by humitos, 11 years ago)

A 5-minutes patch for Log

  • logviewer.py

    From 9118698a63dd31ec8f71556828d5ab20812a6035 Mon Sep 17 00:00:00 2001
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Tue, 27 Nov 2012 17:02:25 -0300
    Subject: [PATCH Log] 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>
    ---
     logviewer.py | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/logviewer.py b/logviewer.py
    index 1a77df0..dbe6418 100644
    a b class MultiLogView(Gtk.HPaned): 
    185185            treestore, text_iter = selection.get_selected()
    186186            if text_iter is not None:
    187187                self._show_log(treestore.get_value(text_iter, 0))
     188                if treestore.iter_has_child(text_iter):
     189                    path = treestore.get_path(text_iter)
     190                    if treeview.row_expanded(path):
     191                        treeview.collapse_row(path)
     192                    else:
     193                        treeview.expand_row(path, False)
    188194
    189195    def _show_log(self, logfile):
    190196        if logfile in self.logs: