[sushi/wip/cosimoc/no-clutter: 62/67] spinnerBox: simplify code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/wip/cosimoc/no-clutter: 62/67] spinnerBox: simplify code
- Date: Mon, 30 Apr 2018 15:18:51 +0000 (UTC)
commit a7e3d702d4a86c0d0b7d508714354ff431344514
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Apr 9 11:59:11 2017 -0700
spinnerBox: simplify code
Make it use the same render/destroy API that other renderers use.
src/js/ui/mainWindow.js | 4 ----
src/js/ui/spinnerBox.js | 9 +--------
2 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index f74848d..a5e2dfa 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -182,7 +182,6 @@ const MainWindow = new Lang.Class({
* if the loading takes too long.
*/
this._renderer = new SpinnerBox.SpinnerBox();
- this._renderer.start();
file.query_info_async
(Gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + ',' +
@@ -205,9 +204,6 @@ const MainWindow = new Lang.Class({
},
_onRendererPrepared : function() {
- /* destroy the spinner renderer */
- this._renderer.destroy();
-
this._renderer = this._pendingRenderer;
this._pendingRenderer = null;
diff --git a/src/js/ui/spinnerBox.js b/src/js/ui/spinnerBox.js
index fef97a5..f0c12f8 100644
--- a/src/js/ui/spinnerBox.js
+++ b/src/js/ui/spinnerBox.js
@@ -54,6 +54,7 @@ const SpinnerBox = new Lang.Class({
},
render : function() {
+ this._spinner.start();
return this._spinnerBox;
},
@@ -61,13 +62,5 @@ const SpinnerBox = new Lang.Class({
let spinnerSize = this._spinnerBox.get_preferred_size();
return [ spinnerSize[0].width,
spinnerSize[0].height ];
- },
-
- start : function() {
- this._spinner.start();
- },
-
- destroy : function() {
- this._spinnerBox.destroy();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]