[gnome-documents] application: Initialize tracker/goa synchronously
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] application: Initialize tracker/goa synchronously
- Date: Tue, 29 Nov 2011 21:42:48 +0000 (UTC)
commit 88b42484b6edb6dba5b5a2b9d290ac04d019ee46
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri Nov 18 03:10:26 2011 +0100
application: Initialize tracker/goa synchronously
Initialization is done before any UI is shown, so there is no benefit
in using asynchronous IO.
https://bugzilla.gnome.org/show_bug.cgi?id=665157
src/application.js | 64 +++++++++++++++++++++++----------------------------
1 files changed, 29 insertions(+), 35 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 97022d5..0cc7268 100644
--- a/src/application.js
+++ b/src/application.js
@@ -115,41 +115,35 @@ Application.prototype = {
Global.errorHandler = new Error.ErrorHandler();
// connect to tracker
- Tracker.SparqlConnection.get_async(null, Lang.bind(this,
- function(object, res) {
- try {
- Global.connection = Tracker.SparqlConnection.get_finish(res);
- } catch (e) {
- log('Unable to connect to the tracker database: ' + e.toString());
- this.quit();
- }
-
- Goa.Client.new(null, Lang.bind(this,
- function(object, res) {
- try {
- Global.goaClient = Goa.Client.new_finish(res);
- } catch (e) {
- log('Unable to create the GOA client: ' + e.toString());
- this.quit();
- }
-
- Global.connectionQueue = new TrackerController.TrackerConnectionQueue();
- Global.sourceManager = new Sources.SourceManager();
- Global.searchCategoryManager = new Searchbar.SearchCategoryManager();
- Global.searchMatchManager = new Searchbar.SearchMatchManager();
- Global.searchTypeManager = new Searchbar.SearchTypeManager();
- Global.queryBuilder = new Query.QueryBuilder();
- Global.changeMonitor = new ChangeMonitor.TrackerChangeMonitor();
- Global.collectionManager = new Manager.BaseManager();
- Global.documentManager = new Documents.DocumentManager();
- Global.trackerController = new TrackerController.TrackerController();
- Global.selectionController = new Selections.SelectionController();
- Global.modeController = new WindowMode.ModeController();
-
- this._mainWindow = new MainWindow.MainWindow();
- this.activate();
- }));
- }));
+ try {
+ Global.connection = Tracker.SparqlConnection.get(null);
+ } catch (e) {
+ log('Unable to connect to the tracker database: ' + e.toString());
+ this.quit();
+ }
+
+ try {
+ Global.goaClient = Goa.Client.new_sync(null);
+ } catch (e) {
+ log('Unable to create the GOA client: ' + e.toString());
+ this.quit();
+ }
+
+ Global.connectionQueue = new TrackerController.TrackerConnectionQueue();
+ Global.sourceManager = new Sources.SourceManager();
+ Global.searchCategoryManager = new Searchbar.SearchCategoryManager();
+ Global.searchMatchManager = new Searchbar.SearchMatchManager();
+ Global.searchTypeManager = new Searchbar.SearchTypeManager();
+ Global.queryBuilder = new Query.QueryBuilder();
+ Global.changeMonitor = new ChangeMonitor.TrackerChangeMonitor();
+ Global.collectionManager = new Manager.BaseManager();
+ Global.documentManager = new Documents.DocumentManager();
+ Global.trackerController = new TrackerController.TrackerController();
+ Global.selectionController = new Selections.SelectionController();
+ Global.modeController = new WindowMode.ModeController();
+
+ this._mainWindow = new MainWindow.MainWindow();
+ this.activate();
},
activate: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]