[gnome-documents] mainToolbar: Fix item positions



commit 84e554d318775fbac94d9bbc01bf419eb8cfdcba
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Wed Jan 8 00:03:15 2014 +0200

    mainToolbar: Fix item positions

 src/mainToolbar.js |    7 ++++---
 src/preview.js     |    6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 4503609..f86b73d 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -196,8 +196,6 @@ const OverviewToolbar = new Lang.Class({
     _populateForSelectionMode: function() {
         this.toolbar.get_style_context().add_class('selection-mode');
 
-        this.addSearchButton();
-
         let builder = new Gtk.Builder();
         builder.add_from_resource('/org/gnome/documents/selection-menu.ui');
         let selectionMenu = builder.get_object('selection-menu');
@@ -217,6 +215,8 @@ const OverviewToolbar = new Lang.Class({
         this._selectionChangedId =
             Application.selectionController.connect('selection-changed',
                                                Lang.bind(this, this._setToolbarTitle));
+
+        this.addSearchButton();
     },
 
     _checkCollectionBackButton: function() {
@@ -244,7 +244,6 @@ const OverviewToolbar = new Lang.Class({
     _populateForOverview: function() {
         this.toolbar.set_show_close_button(true);
         this._checkCollectionBackButton();
-        this.addSearchButton();
 
         let selectionButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: 'object-select-symbolic',
                                                           label: _("Select Items") });
@@ -254,6 +253,8 @@ const OverviewToolbar = new Lang.Class({
                 Application.selectionController.setSelectionMode(true);
             }));
 
+        this.addSearchButton();
+
         // connect to active collection changes while in this mode
         this._collectionId =
             Application.collectionManager.connect('active-changed',
diff --git a/src/preview.js b/src/preview.js
index 1436354..685013d 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -826,9 +826,6 @@ const PreviewToolbar = new Lang.Class({
                 this._searchAction.enabled = true;
             }));
 
-        // search button, on the right of the toolbar
-        this.addSearchButton();
-
         // menu button, on the right of the toolbar
         let previewMenu = this._getPreviewMenu();
         let menuButton = new Gd.HeaderMenuButton({ menu_model: previewMenu,
@@ -836,6 +833,9 @@ const PreviewToolbar = new Lang.Class({
                                                    symbolic_icon_name: 'emblem-system-symbolic' });
         this.toolbar.pack_end(menuButton);
 
+        // search button, on the right of the toolbar
+        this.addSearchButton();
+
         this._setToolbarTitle();
         this.toolbar.show_all();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]