r36031 - in /desktop/experimental/gnome-shell/debian: changelog patches/series patches/telepathyClient-Fix-auto-scroll-to-bottom.patch

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Sun Oct 21 12:43:05 UTC 2012


Author: sjoerd
Date: Sun Oct 21 12:43:05 2012
New Revision: 36031

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36031
Log:
* debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch:
  + Added. Fix auto-scroll down in the builtin telepathy message view (bgo:
    #686571)

Added:
    desktop/experimental/gnome-shell/debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch
Modified:
    desktop/experimental/gnome-shell/debian/changelog
    desktop/experimental/gnome-shell/debian/patches/series

Modified: desktop/experimental/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-shell/debian/changelog?rev=36031&op=diff
==============================================================================
--- desktop/experimental/gnome-shell/debian/changelog [utf-8] (original)
+++ desktop/experimental/gnome-shell/debian/changelog [utf-8] Sun Oct 21 12:43:05 2012
@@ -7,8 +7,11 @@
     annotation updates needed by gnome-shell
   * debian/rules: gir1.2-ibus-1.0 (> 1.4.99) needed for
     the ibus related functionality
-
- -- Sjoerd Simons <sjoerd at debian.org>  Sun, 21 Oct 2012 14:36:00 +0200
+  * debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch:
+    + Added. Fix auto-scroll down in the builtin telepathy message view (bgo:
+      #686571)
+
+ -- Sjoerd Simons <sjoerd at debian.org>  Sun, 21 Oct 2012 14:42:00 +0200
 
 gnome-shell (3.6.1-2) experimental; urgency=low
 

Modified: desktop/experimental/gnome-shell/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-shell/debian/patches/series?rev=36031&op=diff
==============================================================================
--- desktop/experimental/gnome-shell/debian/patches/series [utf-8] (original)
+++ desktop/experimental/gnome-shell/debian/patches/series [utf-8] Sun Oct 21 12:43:05 2012
@@ -4,3 +4,4 @@
 27-nm-libexec-path.patch
 29-Cope-with-clutter-being-built-with-both-new-and-old-.patch
 30-remoteMenu-Prevent-the-shell-from-becoming-unrespons.patch
+telepathyClient-Fix-auto-scroll-to-bottom.patch

Added: desktop/experimental/gnome-shell/debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-shell/debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch?rev=36031&op=file
==============================================================================
--- desktop/experimental/gnome-shell/debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch (added)
+++ desktop/experimental/gnome-shell/debian/patches/telepathyClient-Fix-auto-scroll-to-bottom.patch [utf-8] Sun Oct 21 12:43:05 2012
@@ -1,0 +1,45 @@
+From 048b54eb84891975f138dfdbf796113a0fb7f07f Mon Sep 17 00:00:00 2001
+From: Sjoerd Simons <sjoerd at luon.net>
+Date: Sun, 21 Oct 2012 14:11:45 +0200
+Subject: [PATCH] telepathyClient: Fix auto-scroll to bottom
+
+Instead of keeping track of the old adjustment.upper keep track of the
+old adjustment.value that corresponded to the bottom scroll position.
+
+This fixes the integrated chatview not always scrolling to the bottom
+by removing the assumption that page_size is constant between updates,
+which is not the case as the view is presented in various different ways.
+---
+ js/ui/components/telepathyClient.js |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js
+index 4231706..fb54722 100644
+--- a/js/ui/components/telepathyClient.js
++++ b/js/ui/components/telepathyClient.js
+@@ -778,16 +778,18 @@ const ChatNotification = new Lang.Class({
+             this.emit('unfocused');
+         }));
+ 
+-        this._oldMaxScrollAdjustment = 0;
+         this._createScrollArea();
+         this._lastGroup = null;
+         this._lastGroupActor = null;
+ 
++        // Keep track of the bottom position for the current adjustment and
++        // force a scroll to the bottom if things change while we were at the
++        // bottom
++        this._oldMaxScrollValue = this._scrollArea.vscroll.adjustment.value;
+         this._scrollArea.vscroll.adjustment.connect('changed', Lang.bind(this, function(adjustment) {
+-            let currentValue = adjustment.value + adjustment.page_size;
+-            if (currentValue == this._oldMaxScrollAdjustment)
++            if (adjustment.value == this._oldMaxScrollValue)
+                 this.scrollTo(St.Side.BOTTOM);
+-            this._oldMaxScrollAdjustment = adjustment.upper;
++            this._oldMaxScrollValue = Math.max(adjustment.lower, adjustment.upper - adjustment.page_size);
+         }));
+ 
+         this._inputHistory = new History.HistoryManager({ entry: this._responseEntry.clutter_text });
+-- 
+1.7.10.4
+




More information about the pkg-gnome-commits mailing list