[bijiben] controller : sort items before refreshing the view
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] controller : sort items before refreshing the view
- Date: Thu, 5 Sep 2013 00:04:40 +0000 (UTC)
commit 87b01a190908f87a79a5b94cc40f2529058d8dea
Author: Pierre-Yves Luyten <py luyten fr>
Date: Thu Sep 5 02:03:18 2013 +0200
controller : sort items before refreshing the view
src/bjb-controller.c | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index 00fbe63..1f8eab7 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -347,23 +347,6 @@ bjb_controller_add_item_if_needed (BjbController *self,
bjb_controller_add_item (self, item, prepend, sibling);
}
-void
-bjb_controller_update_view (BjbController *self)
-{
- GList *items, *l;
-
- /* Do not update if nothing to show */
- if (bjb_window_base_get_view_type (self->priv->window) != BJB_WINDOW_BASE_MAIN_VIEW)
- return;
-
- items = self->priv->items_to_show ;
- free_items_store (self);
-
- for (l = items; l != NULL; l = l->next)
- {
- bjb_controller_add_item (self, l->data, FALSE, NULL);
- }
-}
static gint
most_recent_item_first (gconstpointer a, gconstpointer b)
@@ -404,6 +387,27 @@ sort_items (GList **to_show)
}
+void
+bjb_controller_update_view (BjbController *self)
+{
+ GList *items, *l;
+
+ /* Do not update if nothing to show */
+ if (bjb_window_base_get_view_type (self->priv->window) != BJB_WINDOW_BASE_MAIN_VIEW)
+ return;
+
+ items = self->priv->items_to_show ;
+ free_items_store (self);
+
+ sort_items (&items);
+
+ for (l = items; l != NULL; l = l->next)
+ {
+ bjb_controller_add_item (self, l->data, FALSE, NULL);
+ }
+}
+
+
static void
notify_displayed_items_changed (BjbController *self)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]