Ticket #1235: sugar-1235.4.patch

File sugar-1235.4.patch, 1.5 KB (added by alsroot, 12 years ago)
  • src/jarabe/journal/listview.py

    From eb2489c546ed368ae0d35f474f5842b778389923 Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Wed, 16 Sep 2009 09:11:51 +0000
    Subject: Hard suppress requery glicthes when current row comes from top rows #1235
    
    ---
     src/jarabe/journal/listview.py |    9 ++++++---
     1 files changed, 6 insertions(+), 3 deletions(-)
    
    diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
    index 278d2cc..7189fc6 100644
    a b class BaseListView(gtk.Bin): 
    260260        self._scroll_position = self.tree_view.props.vadjustment.props.value
    261261        logging.debug('ListView.__model_ready_cb %r', self._scroll_position)
    262262
    263         # prevent glitches while later vadjustment setting
    264         self.tree_view.hide()
     263        if self.tree_view.window is not None:
     264            # prevent glitches while later vadjustment setting, see #1235
     265            self.tree_view.get_bin_window().hide()
    265266
    266267        # Cannot set it up earlier because will try to access the model
    267268        # and it needs to be ready.
    class BaseListView(gtk.Bin): 
    270271        self.tree_view.props.vadjustment.props.value = self._scroll_position
    271272        self.tree_view.props.vadjustment.value_changed()
    272273
    273         self.tree_view.show()
     274        if self.tree_view.window is not None:
     275            # prevent glitches while later vadjustment setting, see #1235
     276            self.tree_view.get_bin_window().show()
    274277
    275278        if len(tree_model) == 0:
    276279            if self._is_query_empty():