[gnome-documents] toolbar: add back button if required when populating
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] toolbar: add back button if required when populating
- Date: Wed, 12 Sep 2012 21:32:10 +0000 (UTC)
commit f47d4fe8c02629975ef0b4f0d9b85dce9d5ccde1
Author: Volker Sobek <reklov live com>
Date: Wed Sep 12 17:14:31 2012 -0400
toolbar: add back button if required when populating
When populating the toolbar for the overview, make sure to add a back
button if there's an active collection.
The back button currently always takes you to the start page, it does
not use a stack for navigating nested collections. See bug #680000
for that.
https://bugzilla.gnome.org/show_bug.cgi?id=680001
src/mainToolbar.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index e1eb8e4..1883c94 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -218,7 +218,7 @@ const OverviewToolbar = new Lang.Class({
Lang.bind(this, this._setToolbarTitle));
},
- _onActiveCollectionChanged: function() {
+ _checkCollectionBackButton: function() {
let item = Global.collectionManager.getActiveItem();
if (item && !this._collBackButton) {
@@ -232,12 +232,16 @@ const OverviewToolbar = new Lang.Class({
this._collBackButton.destroy();
this._collBackButton = null;
}
+ },
+ _onActiveCollectionChanged: function() {
+ this._checkCollectionBackButton();
this._setToolbarTitle();
Global.application.change_action_state('search', GLib.Variant.new('b', false));
},
_populateForOverview: function() {
+ this._checkCollectionBackButton();
this.addSearchButton();
let selectionButton =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]