[gnome-documents] application: refresh the SkyDrive cache on startup
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] application: refresh the SkyDrive cache on startup
- Date: Mon, 4 Jun 2012 19:22:51 +0000 (UTC)
commit 04acc771775dd86c5ec11e082d942de183016dee
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 3ad529c..cdf5ee0 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 */
@@ -145,16 +146,18 @@ const Application = new Lang.Class({
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;
@@ -195,8 +198,12 @@ const Application = new Lang.Class({
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]