[gnome-documents] Fix edit mode
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] Fix edit mode
- Date: Sun, 17 Feb 2013 15:15:20 +0000 (UTC)
commit 0272e40c21605fea943bd8fdfe6453c0f82ae56b
Author: William Jon McCann <jmccann redhat com>
Date: Sat Feb 16 17:12:33 2013 -0500
Fix edit mode
https://bugzilla.gnome.org/show_bug.cgi?id=693999
src/edit.js | 8 ++++----
src/mainToolbar.js | 7 ++-----
2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/edit.js b/src/edit.js
index 5c5b8dd..884d012 100644
--- a/src/edit.js
+++ b/src/edit.js
@@ -183,17 +183,17 @@ const EditToolbar = new Lang.Class({
// back button, on the left of the toolbar
let iconName =
- (this.widget.get_direction() == Gtk.TextDirection.RTL) ?
+ (this.toolbar.get_direction() == Gtk.TextDirection.RTL) ?
'go-next-symbolic' : 'go-previous-symbolic';
let backButton =
- this.widget.add_button(iconName, _("Back"), true);
+ this.toolbar.add_button(iconName, _("Back"), true);
backButton.connect('clicked', Lang.bind(this,
function() {
Application.documentManager.setActiveItem(null);
}));
let viewButton =
- this.widget.add_button(null, _("View"), false);
+ this.toolbar.add_button(null, _("View"), false);
viewButton.get_style_context().add_class('suggested-action');
viewButton.set_action_name('app.view-current');
@@ -215,6 +215,6 @@ const EditToolbar = new Lang.Class({
if (doc)
primary = doc.name;
- this.widget.set_labels(primary, null);
+ this.toolbar.set_labels(primary, null);
}
});
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 6b1e084..2941c30 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -49,11 +49,8 @@ const MainToolbar = new Lang.Class({
this.toolbar.show();
this._searchbar = this.createSearchbar();
- this.widget.add(this._searchbar.widget);
- },
-
- createSearchbar: function() {
- log('Error: MainToolbar subclasses must implement createSearchbar');
+ if (this._searchbar)
+ this.widget.add(this._searchbar.widget);
},
handleEvent: function(event) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]