[gnome-documents] preview: Don't show the places dialog if there is only one page
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] preview: Don't show the places dialog if there is only one page
- Date: Thu, 20 Aug 2015 04:58:37 +0000 (UTC)
commit c02ce2fc7708d26c34c0d82b145d3bd1b5426bb8
Author: Alessandro Bono <shadow openaliasbox org>
Date: Wed Aug 19 17:15:53 2015 +0200
preview: Don't show the places dialog if there is only one page
Fall out from b0eb19903f9db0802bfcc1b10747071360087e23 and
f14758b1c296cf566895c179fe11e0e3e353d0e9
https://bugzilla.gnome.org/show_bug.cgi?id=753199
src/preview.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index 1e78b86..d888d30 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -137,8 +137,8 @@ const PreviewView = new Lang.Class({
function() {
this._changeRotation(90);
}));
- let showPlaces = Application.application.lookup_action('places');
- let showPlacesId = showPlaces.connect('activate', Lang.bind(this, this._showPlaces));
+ this._places = Application.application.lookup_action('places');
+ let placesId = this._places.connect('activate', Lang.bind(this, this._showPlaces));
let nightModeId = Application.application.connect('action-state-changed::night-mode',
Lang.bind(this, this._updateNightMode));
@@ -162,7 +162,7 @@ const PreviewView = new Lang.Class({
this._copy.disconnect(copyId);
rotLeft.disconnect(rotLeftId);
rotRight.disconnect(rotRightId);
- showPlaces.disconnect(showPlacesId);
+ this._places.disconnect(placesId);
Application.application.disconnect(presentCurrentId);
Application.application.disconnect(nightModeId);
}));
@@ -170,7 +170,7 @@ const PreviewView = new Lang.Class({
_onLoadStarted: function() {
this._bookmarkPage.enabled = false;
- this._showPlaces.enabled = false;
+ this._places.enabled = false;
this._copy.enabled = false;
},
@@ -561,7 +561,7 @@ const PreviewView = new Lang.Class({
let hasMultiplePages = (this._model.document.get_n_pages() > 1);
this._bookmarkPage.enabled = hasMultiplePages && this._bookmarks;
- this._showPlaces.enabled = hasMultiplePages;
+ this._places.enabled = hasMultiplePages;
this._model.connect('page-changed', Lang.bind(this, this._onPageChanged));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]