[gnome-documents] main-toolbar: don't call hide/show directly on the searchbar
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] main-toolbar: don't call hide/show directly on the searchbar
- Date: Wed, 25 Jul 2012 17:23:20 +0000 (UTC)
commit 4c8f8bebcd7701634835c17520f1c8fdeba42374
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jul 25 19:20:27 2012 +0200
main-toolbar: don't call hide/show directly on the searchbar
Change the action state instead, since that automatically keeps the
state in sync with the toolbutton.
src/mainToolbar.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 7b94f85..29f0ace 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -228,7 +228,7 @@ const OverviewToolbar = new Lang.Class({
}
this._setToolbarTitle();
- this._searchbar.hide();
+ Global.application.change_action_state('search', GLib.Variant.new('b', false));
},
_populateForOverview: function() {
@@ -282,7 +282,7 @@ const OverviewToolbar = new Lang.Class({
this.widget.show_all();
if (Global.searchController.getString() != '')
- this._searchbar.show();
+ Global.application.change_action_state('search', GLib.Variant.new('b', true));
},
createSearchbar: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]