[gnome-shell] viewSelector: Move the loupe icon to the primary slot
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] viewSelector: Move the loupe icon to the primary slot
- Date: Sun, 3 Mar 2013 20:42:09 +0000 (UTC)
commit 39610e6933c1fa3bc3a43ad6742ca4122ffaf862
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Mar 3 13:56:12 2013 -0500
viewSelector: Move the loupe icon to the primary slot
This matches the behavior in GTK+. See the rationale there.
https://bugzilla.gnome.org/show_bug.cgi?id=695069
js/ui/viewSelector.js | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 011855f..0fd242d 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -83,11 +83,10 @@ const ViewSelector = new Lang.Class({
this._entry.connect('notify::mapped', Lang.bind(this, this._onMapped));
global.stage.connect('notify::key-focus', Lang.bind(this, this._onStageKeyFocusChanged));
- this._inactiveIcon = new St.Icon({ style_class: 'search-entry-icon',
- icon_name: 'edit-find-symbolic' });
- this._activeIcon = new St.Icon({ style_class: 'search-entry-icon',
- icon_name: 'edit-clear-symbolic' });
- this._entry.set_secondary_icon(this._inactiveIcon);
+ this._entry.set_primary_icon(new St.Icon({ style_class: 'search-entry-icon',
+ icon_name: 'edit-find-symbolic' }));
+ this._clearIcon = new St.Icon({ style_class: 'search-entry-icon',
+ icon_name: 'edit-clear-symbolic' });
this._iconClickedId = 0;
this._capturedEventId = 0;
@@ -376,7 +375,7 @@ const ViewSelector = new Lang.Class({
this._searchResults.startingSearch();
if (this._searchActive) {
- this._entry.set_secondary_icon(this._activeIcon);
+ this._entry.set_secondary_icon(this._clearIcon);
if (this._iconClickedId == 0)
this._iconClickedId = this._entry.connect('secondary-icon-clicked',
@@ -396,7 +395,7 @@ const ViewSelector = new Lang.Class({
this._searchTimeoutId = 0;
}
- this._entry.set_secondary_icon(this._inactiveIcon);
+ this._entry.set_secondary_icon(null);
this._searchCancelled();
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]