Bug 591624 - dash: Rename searchId to searchTimeoutId
From review comments.
This commit is contained in:
parent
28517e4c34
commit
1e41f869de
@ -447,7 +447,7 @@ Dash.prototype = {
|
|||||||
this._searchAreaApps = null;
|
this._searchAreaApps = null;
|
||||||
this._searchAreaDocs = null;
|
this._searchAreaDocs = null;
|
||||||
|
|
||||||
this._searchId = 0;
|
this._searchTimeoutId = 0;
|
||||||
this._searchEntry.entry.connect('text-changed', Lang.bind(this, function (se, prop) {
|
this._searchEntry.entry.connect('text-changed', Lang.bind(this, function (se, prop) {
|
||||||
let text = this._searchEntry.getText();
|
let text = this._searchEntry.getText();
|
||||||
text = text.replace(/^\s+/g, "").replace(/\s+$/g, "")
|
text = text.replace(/^\s+/g, "").replace(/\s+$/g, "")
|
||||||
@ -455,11 +455,11 @@ Dash.prototype = {
|
|||||||
if (!this._searchActive) {
|
if (!this._searchActive) {
|
||||||
if (this._searchPane != null)
|
if (this._searchPane != null)
|
||||||
this._searchPane.close();
|
this._searchPane.close();
|
||||||
if (this._searchId > 0)
|
if (this._searchTimeoutId > 0)
|
||||||
Mainloop.source_remove(this._searchId);
|
Mainloop.source_remove(this._searchTimeoutId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this._searchId > 0)
|
if (this._searchTimeoutId > 0)
|
||||||
return;
|
return;
|
||||||
if (this._searchPane == null) {
|
if (this._searchPane == null) {
|
||||||
this._searchPane = new ResultPane(this);
|
this._searchPane = new ResultPane(this);
|
||||||
@ -477,8 +477,8 @@ Dash.prototype = {
|
|||||||
this._searchEntry.setPane(this._searchPane);
|
this._searchEntry.setPane(this._searchPane);
|
||||||
}
|
}
|
||||||
this._searchPane.open();
|
this._searchPane.open();
|
||||||
this._searchId = Mainloop.timeout_add(150, Lang.bind(this, function() {
|
this._searchTimeoutId = Mainloop.timeout_add(150, Lang.bind(this, function() {
|
||||||
this._searchId = 0;
|
this._searchTimeoutId = 0;
|
||||||
let text = this._searchEntry.getText();
|
let text = this._searchEntry.getText();
|
||||||
text = text.replace(/^\s+/g, "").replace(/\s+$/g, "");
|
text = text.replace(/^\s+/g, "").replace(/\s+$/g, "");
|
||||||
this._searchAreaApps.setSearch(text);
|
this._searchAreaApps.setSearch(text);
|
||||||
|
Loading…
Reference in New Issue
Block a user