[Xfce4-commits] <postler:master> Scroll to the last cell, this works more reliably

Christian Dywan noreply at xfce.org
Sat Nov 6 01:36:01 CET 2010


Updating branch refs/heads/master
         to eb38eef045284b731912f4d1497510c3531ba3f8 (commit)
       from a102caa4a8fb4f809386f50eb46046636f7020f6 (commit)

commit eb38eef045284b731912f4d1497510c3531ba3f8
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Nov 6 01:35:07 2010 +0100

    Scroll to the last cell, this works more reliably

 postler/postler-messages.vala |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index 4a9574f..e43a601 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -582,12 +582,9 @@ public class Postler.Messages : Gtk.TreeView {
 
             /* Scroll to the bottom */
             int last_child = sort.iter_n_children (null) - 1;
-            if (last_child > -1) {
-                Gtk.TreeIter sort_iter;
-                if (sort.iter_nth_child (out sort_iter, null, last_child)) {
-                    set_cursor (sort.get_path (sort_iter), null, false);
-                }
-            }
+            if (last_child > 0)
+                scroll_to_cell (new Gtk.TreePath.from_indices (last_child),
+                                null, false, 0, 0);
 
         } catch (GLib.Error error) {
             sort = new Gtk.TreeModelSort.with_model (store);



More information about the Xfce4-commits mailing list