[polari/wip/bastianilso/error-handling: 8/10] chatroommanager restoresavedchannels is public now.
- From: Bastian Ilsø Hougaard <bastianilso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/bastianilso/error-handling: 8/10] chatroommanager restoresavedchannels is public now.
- Date: Wed, 29 Jul 2015 22:26:55 +0000 (UTC)
commit 00036fdd75bfef714b25d60dbd0a859b63714c9d
Author: Bastian Ilsø <bastianilso src gnome org>
Date: Tue Jul 28 19:20:18 2015 +0200
chatroommanager restoresavedchannels is public now.
src/application.js | 7 ++++---
src/chatroomManager.js | 11 +++++------
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index d603c5a..297fa4b 100644
--- a/src/application.js
+++ b/src/application.js
@@ -331,7 +331,7 @@ const Application = new Lang.Class({
if (!networkMonitor.network_available)
return;
log('dbus error: ' + account.connection_error);
- //let error = Tp.error_get_dbus_name(Tp.Error.CERT_NOT_ACTIVATED);
+ //let error = Tp.error_get_dbus_name(Tp.Error.SERVICE_BUSY);
if (error == ConnectionError.ALREADY_CONNECTED &&
requestData.retry++ < MAX_RETRIES) {
let params = account.dup_parameters_vardict().deep_unpack();
@@ -385,9 +385,10 @@ const Application = new Lang.Class({
let accountPath = parameter.unpack();
log(accountPath);
let account = factory.ensure_account(accountPath, []);
- account.reconnect_async(Lang.bind(this, function(a, res) {
+ this._chatroomManager.restoreSavedChannels(account);
+ /*account.reconnect_async(Lang.bind(this, function(a, res) {
account.reconnect_finish(res);
- }));
+ }));*/
},
_onMessageUser: function(action, parameter) {
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index 6ec3b95..6a94149 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -105,19 +105,19 @@ const _ChatroomManager = new Lang.Class({
Lang.bind(this, this._onAccountDisabled));
this._accountsMonitor.connect('account-status-changed', Lang.bind(this, function(monitor, account) {
if (account.connection_status == Tp.ConnectionStatus.CONNECTED)
- this._restoreSavedChannels(account);
+ this.restoreSavedChannels(account);
}));
- this._restoreSavedChannels(null);
+ this.restoreSavedChannels(null);
this._networkMonitor.connect('notify::network-available', Lang.bind(this,
function() {
if (this._networkMonitor.network_available)
- this._restoreSavedChannels(null);
+ this.restoreSavedChannels(null);
}));
},
_onAccountEnabled: function(am, account) {
- this._restoreSavedChannels(account);
+ this.restoreSavedChannels(account);
},
_onAccountDisabled: function(am, account) {
@@ -128,14 +128,13 @@ const _ChatroomManager = new Lang.Class({
}
},
- _restoreSavedChannels: function(account) {
+ restoreSavedChannels: function(account) {
let settings = new Gio.Settings({ schema_id: 'org.gnome.Polari' });
let savedChannels = settings.get_value('saved-channel-list').deep_unpack();
for (let i = 0; i < savedChannels.length; i++) {
let serializedChannel = savedChannels[i];
for (let prop in serializedChannel)
serializedChannel[prop] = serializedChannel[prop].deep_unpack();
-
if (account == null || serializedChannel.account == account.object_path)
this._restoreChannel(serializedChannel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]