[epiphany] suggestion-model: Append to the model instead of prepending
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [epiphany] suggestion-model: Append to the model instead of prepending
- Date: Fri, 27 Oct 2017 04:46:01 +0000 (UTC)
commit 3d7ccd70485fdf82ba72fadf1ff260dcec7310b2
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Thu Oct 26 23:36:51 2017 -0500
    suggestion-model: Append to the model instead of prepending
    
    So we have bookmarks first, then history, then search engines.
 src/ephy-suggestion-model.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-suggestion-model.c b/src/ephy-suggestion-model.c
index c77bdbe..539278c 100644
--- a/src/ephy-suggestion-model.c
+++ b/src/ephy-suggestion-model.c
@@ -330,12 +330,12 @@ add_history (EphySuggestionModel *self,
 {
   guint added = 0;
 
-  for (const GList *p = g_list_last (urls); p != NULL; p = p->prev) {
+  for (const GList *p = urls; p != NULL; p = p->next) {
     EphyHistoryURL *url = (EphyHistoryURL *)p->data;
     EphySuggestion *suggestion;
 
     suggestion = ephy_suggestion_new (url->title, url->url);
-    g_sequence_prepend (self->items, suggestion);
+    g_sequence_append (self->items, suggestion);
     added++;
   }
 
@@ -364,7 +364,7 @@ add_search_engines (EphySuggestionModel *self,
     address = ephy_search_engine_manager_build_search_address (manager, engines[i], query);
     suggestion = ephy_suggestion_new (engines[i], address);
 
-    g_sequence_prepend (self->items, suggestion);
+    g_sequence_append (self->items, suggestion);
     added++;
 
     g_free (address);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]