[frogr] Reorder list after adding a picture if needed.



commit 9dda0e41becea1786effa2efe2b967d73232a47a
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Mon Apr 25 23:04:17 2011 -0700

    Reorder list after adding a picture if needed.
    
    This creates the "effect" of things inserting themselves in the right
    place according to the current sorting criteria and direction.

 src/frogr-main-view.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 682b7a7..ec84fae 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -1050,6 +1050,10 @@ _add_picture_to_ui (FrogrMainView *self, FrogrPicture *picture)
                       -1);
   g_object_ref (picture);
 
+  /* Reorder if needed */
+  if (priv->sorting_criteria != SORT_AS_LOADED || priv->sorting_reversed)
+    _reorder_pictures (self, priv->sorting_criteria, priv->sorting_reversed);
+
   /* Update upload size in state description */
   _update_state_description (self);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]