[Xfce4-commits] <postler:master> Move cursor to more recent message after deleting

Christian Dywan noreply at xfce.org
Tue Nov 23 23:12:03 CET 2010


Updating branch refs/heads/master
         to d84b7d716e6acdc6e81bf26cb3e539bba1738519 (commit)
       from faf23217df841343c44425552c87108da5fba409 (commit)

commit d84b7d716e6acdc6e81bf26cb3e539bba1738519
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Nov 23 23:11:30 2010 +0100

    Move cursor to more recent message after deleting

 postler/postler-messages.vala |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index 9f9beca..c801315 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -915,11 +915,14 @@ public class Postler.Messages : Gtk.TreeView {
                         file.move (destination_file, 0, null, null);
                     }
 
+                    /* Move to next, more recent message row */
                     Gtk.TreeIter child_iter;
                     sort.convert_iter_to_child_iter (out child_iter, sort_iter);
-                    string next_path = sort.get_string_from_iter (sort_iter);
+                    Gtk.TreePath next_path = sort.get_path (sort_iter);
                     if (store.remove (child_iter)) {
-                        if (sort.get_iter_from_string (out sort_iter, next_path))
+                        if (!newest_at_the_bottom)
+                            next_path.prev ();
+                        if (sort.get_iter (out sort_iter, next_path))
                             set_cursor (sort.get_path (sort_iter), null, false);
                     }
                     content.clear ();



More information about the Xfce4-commits mailing list