[gnome-documents] embed: workaround a GTK bug
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] embed: workaround a GTK bug
- Date: Thu, 13 Dec 2012 14:03:37 +0000 (UTC)
commit c374235939f6c7edc298b76f8ccbcad084646b93
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Nov 28 18:49:26 2012 -0500
embed: workaround a GTK bug
Apparently the actions associated with a button also get activated if
the widget is hidden.
Work this around by also making it insensitive, until the bug is fixed
in GTK.
src/embed.js | 1 +
src/preview.js | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index 5b734bc..572a4f0 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -450,6 +450,7 @@ const Embed = new Lang.Class({
_onFullscreenChanged: function(controller, fullscreen) {
Gtk.Settings.get_default().gtk_application_prefer_dark_theme = fullscreen;
this._toolbar.widget.visible = !fullscreen;
+ this._toolbar.widget.sensitive = !fullscreen;
},
_onWindowModeChanged: function(object, newMode, oldMode) {
diff --git a/src/preview.js b/src/preview.js
index 8030eac..9b7f1bd 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -464,11 +464,13 @@ const PreviewFullscreenToolbar = new Lang.Class({
this.parent(previewView);
this.actor.visible = false;
+ this.widget.sensitive = false;
this.actor.y = -(this.widget.get_preferred_height()[1]);
},
show: function() {
this.actor.show();
+ this.widget.sensitive = true;
Tweener.addTween(this.actor,
{ y: 0,
time: 0.20,
@@ -482,6 +484,7 @@ const PreviewFullscreenToolbar = new Lang.Class({
transition: 'easeOutQuad',
onComplete: function() {
this.actor.hide();
+ this.widget.sensitive = false;
},
onCompleteScope: this });
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]