[gnome-maps/gnome-3-36] sidebar: Use 'run' signal to control spinner
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-36] sidebar: Use 'run' signal to control spinner
- Date: Fri, 3 Apr 2020 21:18:10 +0000 (UTC)
commit 6416418f87a54d2ca3357b1cd090042e6406b396
Author: Marcus Lundblad <ml update uu se>
Date: Thu Apr 2 22:18:12 2020 +0200
sidebar: Use 'run' signal to control spinner
Rely on the query's 'run' signal to determine
when to show the progress spinner.
src/sidebar.js | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index ffa409d8..f5e5f880 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -243,16 +243,13 @@ var Sidebar = GObject.registerClass({
loadMoreRow.showNoMore();
});
- // reset error label when mode changes
- this._query.connect('notify::transportation', () => {
- this._errorLabel.label = '';
+ this._query.connect('run', () => {
+ this._instructionStack.visible_child = this._instructionSpinner;
});
this._query.connect('notify', () => {
- if (this._query.isValid()) {
- if (this._errorLabel.label === '')
- this._instructionStack.visible_child = this._instructionSpinner;
- } else if (this._instructionStack.visible_child !== this._errorLabel) {
+ if (this._instructionStack.visible_child !== this._instructionSpinner &&
+ this._instructionStack.visible_child !== this._errorLabel) {
if (this._query.transportation === RouteQuery.Transportation.TRANSIT) {
this._clearTransitOverview();
this._showTransitOverview();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]