[gnome-documents] embed: Not every toolbar has a searchbar
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] embed: Not every toolbar has a searchbar
- Date: Sat, 15 Mar 2014 14:55:21 +0000 (UTC)
commit b3d7ceb1d4af8b501217f0d8b232e7953907f416
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Mar 14 11:04:27 2014 +0100
embed: Not every toolbar has a searchbar
For example, EditToolbar does not have one.
Fallout from 13954c74f593806a5111bea2129bbaa28423fab0
https://bugzilla.gnome.org/show_bug.cgi?id=719920
src/embed.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index 8249c9b..5f09657 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -358,8 +358,11 @@ const Embed = new Lang.Class({
throw(new Error('Not handled'));
break;
}
- this._toolbar.searchbar.connect('activate-result',
- Lang.bind(this, this._onActivateResult));
+
+ if (this._toolbar.searchbar) {
+ this._toolbar.searchbar.connect('activate-result',
+ Lang.bind(this, this._onActivateResult));
+ }
},
_onActiveItemChanged: function(manager, doc) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]