[gnome-documents/wip/cosimoc/view-rework: 6/20] embed: use widget reference directly
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/cosimoc/view-rework: 6/20] embed: use widget reference directly
- Date: Mon, 8 Aug 2016 15:06:59 +0000 (UTC)
commit 6738db7cd69a26c1a57c7ec16e09b4c8ed9b1f28
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Jul 31 21:25:18 2016 -0700
embed: use widget reference directly
This will be useful in a later commit.
src/embed.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index e8c072d..3443d5a 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -393,17 +393,17 @@ const Embed = new Lang.Class({
oldMode != WindowMode.WindowMode.DOCUMENTS &&
oldMode != WindowMode.WindowMode.SEARCH);
- let visibleChildName;
+ let visibleChild;
switch (newMode) {
case WindowMode.WindowMode.COLLECTIONS:
- visibleChildName = 'collections';
+ visibleChild = this._collections;
break;
case WindowMode.WindowMode.DOCUMENTS:
- visibleChildName = 'documents';
+ visibleChild = this._documents;
break;
case WindowMode.WindowMode.SEARCH:
- visibleChildName = 'search';
+ visibleChild = this._search;
break;
default:
throw(new Error('Not handled'));
@@ -422,7 +422,7 @@ const Embed = new Lang.Class({
}
this._spinner.stop();
- this._stack.set_visible_child_name(visibleChildName);
+ this._stack.set_visible_child(visibleChild);
},
_prepareForPreview: function(constructor) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]