[gnome-documents] Update zoom actions to reflect zoom limits
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] Update zoom actions to reflect zoom limits
- Date: Fri, 21 Dec 2012 14:29:40 +0000 (UTC)
commit ce4986e699e805582ec436bcad40d6ca44f136ae
Author: William Jon McCann <jmccann redhat com>
Date: Wed Dec 19 15:53:48 2012 -0500
Update zoom actions to reflect zoom limits
https://bugzilla.gnome.org/show_bug.cgi?id=690511
src/preview.js | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index 5e2573f..2dba493 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -119,11 +119,23 @@ const PreviewView = new Lang.Class({
}));
},
+ _onCanZoomInChanged: function() {
+ this._zoomIn.enabled = this.view.can_zoom_in;
+ },
+
+ _onCanZoomOutChanged: function() {
+ this._zoomOut.enabled = this.view.can_zoom_out;
+ },
+
_createView: function() {
this.view = EvView.View.new();
this.widget.add(this.view);
this.view.show();
+ this.view.connect('notify::can-zoom-in',
+ Lang.bind(this, this._onCanZoomInChanged));
+ this.view.connect('notify::can-zoom-out',
+ Lang.bind(this, this._onCanZoomOutChanged));
this.view.connect('button-release-event',
Lang.bind(this, this._onButtonReleaseEvent));
this.view.connect('key-press-event',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]