[gnome-documents/wip/skydrive: 15/28] application: refresh the SkyDrive cache on startup
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/skydrive: 15/28] application: refresh the SkyDrive cache on startup
- Date: Mon, 4 Jun 2012 17:33:35 +0000 (UTC)
commit 12a1dc7b0519ca96e3ba27ac91a959988b1f6310
Author: Debarshi Ray <debarshir gnome org>
Date: Wed May 30 18:30:11 2012 +0200
application: refresh the SkyDrive cache on startup
Fixes: https://bugzilla.gnome.org/666535
src/application.js | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index afab1f4..5625007 100644
--- a/src/application.js
+++ b/src/application.js
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Red Hat, Inc.
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
*
* Gnome Documents is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
@@ -52,6 +52,7 @@ const TrackerController = imports.trackerController;
const Tweener = imports.util.tweener;
const Utils = imports.utils;
const WindowMode = imports.windowMode;
+const ZpjMiner = imports.zpjMiner;
const MINER_REFRESH_TIMEOUT = 60; /* seconds */
@@ -140,16 +141,18 @@ Application.prototype = {
this.application.set_app_menu(menu);
},
- _refreshMinerNow: function() {
- this._miner.RefreshDBRemote(DBus.CALL_FLAG_START, Lang.bind(this,
+ _refreshMinerNow: function(miner) {
+ miner.RefreshDBRemote(DBus.CALL_FLAG_START, Lang.bind(this,
function(res, error) {
if (error) {
- log('Error updating the GData cache: ' + error.toString());
+ log('Error updating the cache: ' + error.toString());
return;
}
Mainloop.timeout_add_seconds(MINER_REFRESH_TIMEOUT,
- Lang.bind(this, this._refreshMinerNow));
+ Lang.bind(this, function() {
+ this._refreshMinerNow(miner)
+ }));
}));
return false;
@@ -190,8 +193,12 @@ Application.prototype = {
Global.notificationManager = new Notifications.NotificationManager();
// startup a refresh of the gdocs cache
- this._miner = new GDataMiner.GDataMiner();
- this._refreshMinerNow();
+ this._gdataMiner = new GDataMiner.GDataMiner();
+ this._refreshMinerNow(this._gdataMiner);
+
+ // startup a refresh of the skydrive cache
+ this._zpjMiner = new ZpjMiner.ZpjMiner();
+ this._refreshMinerNow(this._zpjMiner);
this._initMenus();
this._mainWindow = new MainWindow.MainWindow(this.application);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]