[gnome-characters/bilelmoussaoui/gtk4: 57/71] characters view: search by scripts once they are loaded
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/bilelmoussaoui/gtk4: 57/71] characters view: search by scripts once they are loaded
- Date: Thu, 25 Nov 2021 11:03:11 +0000 (UTC)
commit d35e6f017d361bcdcdd4d6e4423b0b42e3a7a221
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Wed Nov 24 19:09:12 2021 +0100
characters view: search by scripts once they are loaded
src/charactersView.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/charactersView.js b/src/charactersView.js
index 8335237..61a2500 100644
--- a/src/charactersView.js
+++ b/src/charactersView.js
@@ -231,6 +231,11 @@ var CharactersView = GObject.registerClass({
gestureClick.connect('released', this.onButtonRelease.bind(this));
this.add_controller(gestureClick);
this.add_css_class('view');
+ this.connect('notify::loading', () => {
+ log(this.loading);
+ if (!this.loading)
+ this.queue_draw();
+ });
}
get fontDescription() {
@@ -446,8 +451,10 @@ var CharactersView = GObject.registerClass({
if (category === Gc.Category.LETTER_LATIN) {
if (!this._scriptsLoaded)
- this.populateScripts();
- this._searchByScripts();
+ this.populateScripts(); // we run the search once the scripts are loaded
+ else
+ this._searchByScripts();
+
return;
}
@@ -591,5 +598,6 @@ var CharactersView = GObject.registerClass({
this._scripts = allScripts;
this._scriptsLoaded = true;
this.loading = false;
+ this._searchByScripts();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]