[polari/wip/kunaljain/polari-search-merge-results] resultView: Add separator between results
- From: Kunal Jain <kunaljain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/kunaljain/polari-search-merge-results] resultView: Add separator between results
- Date: Sat, 13 Aug 2016 10:49:18 +0000 (UTC)
commit 728b3e293401bb710fa14a179419e16f520de033
Author: Kunaal Jain <kunaalus gmail com>
Date: Sat Aug 13 16:18:08 2016 +0530
resultView: Add separator between results
src/resultView.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/resultView.js b/src/resultView.js
index 2075d0a..68813e6 100644
--- a/src/resultView.js
+++ b/src/resultView.js
@@ -231,7 +231,8 @@ const ResultView = new Lang.Class({
// if(!exists)
if(!exists) {
- buffer.create_mark('view-start' + rank, iter, false);
+ buffer.insert(iter, '\n', -1);
+ buffer.create_mark('view-start' + rank, iter, true);
let obj = { top_query: null,
bottom_query: null,
rank: rank };
@@ -246,7 +247,7 @@ const ResultView = new Lang.Class({
if(exists)
buffer.move_mark_by_name('view-end'+rank, iter);
else
- buffer.create_mark('view-end' + rank, iter, true);
+ buffer.create_mark('view-end' + rank, iter, false);
let index;
for(let i = 0; i < this._resultsAvailable.length; i++) {
@@ -255,6 +256,7 @@ const ResultView = new Lang.Class({
break;
}
}
+ this._rank = rank;
this._rowactivated(uid, this._channelName, timestamp, rank);
},
@@ -626,6 +628,7 @@ const ResultView = new Lang.Class({
},
_onScroll: function(w, event) {
+ print("was onscroll" +this.vadjustment.value);
let [hasDir, dir] = event.get_scroll_direction();
if (hasDir && (dir != Gdk.ScrollDirection.UP || dir != Gdk.ScrollDirection.DOWN) )
return Gdk.EVENT_PROPAGATE;
@@ -669,6 +672,7 @@ const ResultView = new Lang.Class({
},
_fetchBacklog: function() {
+ print("was at backlog" + this.vadjustment.value + this._fetchingBacklog);
if (this.vadjustment.value != 0 &&
this.vadjustment.value != this._scrollBottom)
return Gdk.EVENT_PROPAGATE;
@@ -682,9 +686,11 @@ const ResultView = new Lang.Class({
this._showLoadingIndicator();
Mainloop.timeout_add(500, Lang.bind(this,
function() {
- this._startQuery.next(10,this._cancellable,Lang.bind(this, this._onLogEventsReady));
+ this._startQuery.next(10,this._cancellable,Lang.bind(this, this._onLogEventsReady,
this._rank));
}));
} else {
+ this._fetchingBacklog = false;
+ return Gdk.EVENT_STOP;
this._showLoadingIndicator1();
Mainloop.timeout_add(500, Lang.bind(this,
function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]