[gnome-documents] application: Set priority rdf:types only when a window is created
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] application: Set priority rdf:types only when a window is created
- Date: Wed, 18 Feb 2015 09:06:14 +0000 (UTC)
commit ec5ec93b093678242e2278a376f8204e8f3c1ae6
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 17 09:28:15 2015 +0100
application: Set priority rdf:types only when a window is created
The startup is shared between the application and the search provider.
There is no need to set the priority for the search provider because we
want to use whatever is already there in tracker's database. Moreoever,
searching in gnome-shell spawns a bunch of search provider processes,
and having all of them set their own priorities will be ineffective.
https://bugzilla.gnome.org/show_bug.cgi?id=744625
src/application.js | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 0c86d93..262b27f 100644
--- a/src/application.js
+++ b/src/application.js
@@ -458,14 +458,6 @@ const Application = new Lang.Class({
return;
}
- try {
- this._extractPriority = TrackerExtractPriority();
- this._extractPriority.SetRdfTypesRemote(['nfo:Document']);
- } catch (e) {
- log('Unable to connect to the tracker extractor: ' + e.toString());
- return;
- }
-
if (!application.isBooks) {
try {
goaClient = Goa.Client.new_sync(null);
@@ -588,11 +580,6 @@ const Application = new Lang.Class({
this._initGettingStarted();
},
- vfunc_shutdown: function() {
- this._extractPriority.ClearRdfTypesRemote();
- this.parent();
- },
-
_createWindow: function() {
if (this._mainWindow)
return;
@@ -602,6 +589,13 @@ const Application = new Lang.Class({
this._mainWindow = new MainWindow.MainWindow(this);
this._mainWindow.window.connect('destroy', Lang.bind(this, this._onWindowDestroy));
+ try {
+ this._extractPriority = TrackerExtractPriority();
+ this._extractPriority.SetRdfTypesRemote(['nfo:Document']);
+ } catch (e) {
+ log('Unable to connect to the tracker extractor: ' + e.toString());
+ }
+
// start miners
this._startMiners();
},
@@ -646,6 +640,9 @@ const Application = new Lang.Class({
// stop miners
this._stopMiners();
+
+ if (this._extractPriority)
+ this._extractPriority.ClearRdfTypesRemote();
},
_onWindowDestroy: function(window) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]