Hello community,

here is the log from the commit of package polari for openSUSE:Factory checked 
in at 2019-06-02 15:13:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/polari (Old)
 and      /work/SRC/openSUSE:Factory/.polari.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "polari"

Sun Jun  2 15:13:10 2019 rev:35 rq:705587 version:3.32.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/polari/polari.changes    2019-05-03 
22:17:08.036069328 +0200
+++ /work/SRC/openSUSE:Factory/.polari.new.5148/polari.changes  2019-06-02 
15:13:16.366159037 +0200
@@ -1,0 +2,7 @@
+Sun May 26 08:55:12 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Update to version 3.32.2:
+  + Improve connectivity handling.
+  + Misc. bug fixes and cleanups.
+
+-------------------------------------------------------------------

Old:
----
  polari-3.32.1.tar.xz

New:
----
  polari-3.32.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ polari.spec ++++++
--- /var/tmp/diff_new_pack.GXvDcp/_old  2019-06-02 15:13:16.930158793 +0200
+++ /var/tmp/diff_new_pack.GXvDcp/_new  2019-06-02 15:13:16.934158792 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           polari
-Version:        3.32.1
+Version:        3.32.2
 Release:        0
 Summary:        An IRC Client for GNOME
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later

++++++ polari-3.32.1.tar.xz -> polari-3.32.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/NEWS new/polari-3.32.2/NEWS
--- old/polari-3.32.1/NEWS      2019-04-17 15:14:25.000000000 +0200
+++ new/polari-3.32.2/NEWS      2019-05-14 22:28:22.000000000 +0200
@@ -1,3 +1,11 @@
+3.32.2 — “No Penguin Kisses!”
+=============================
+* Improve connectivity handling [Florian; !120]
+* Misc. bug fixes and cleanups [Florian; !119, #768851, !115, !116, !121]
+
+Contributors:
+  Florian Müllner
+
 3.32.1 — “Style Always Wins Out In The End”
 ===========================================
 * Handle notifications for private chats if GNOME's chat integration is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/polari-3.32.1/data/appdata/org.gnome.Polari.appdata.xml.in 
new/polari-3.32.2/data/appdata/org.gnome.Polari.appdata.xml.in
--- old/polari-3.32.1/data/appdata/org.gnome.Polari.appdata.xml.in      
2019-04-17 15:14:25.000000000 +0200
+++ new/polari-3.32.2/data/appdata/org.gnome.Polari.appdata.xml.in      
2019-05-14 22:28:22.000000000 +0200
@@ -22,19 +22,19 @@
   </description>
   <screenshots>
     <screenshot type="default">
-      
<image>https://gitlab.gnome.org/GNOME/polari/raw/master/data/appdata/polari-main.png</image>
+      
<image>https://gitlab.gnome.org/GNOME/polari/raw/gnome-3-32/data/appdata/polari-main.png</image>
     </screenshot>
     <screenshot>
-      
<image>https://gitlab.gnome.org/GNOME/polari/raw/master/data/appdata/polari-user-list.png</image>
+      
<image>https://gitlab.gnome.org/GNOME/polari/raw/gnome-3-32/data/appdata/polari-user-list.png</image>
     </screenshot>
     <screenshot>
-      
<image>https://gitlab.gnome.org/GNOME/polari/raw/master/data/appdata/polari-join-dialog.png</image>
+      
<image>https://gitlab.gnome.org/GNOME/polari/raw/gnome-3-32/data/appdata/polari-join-dialog.png</image>
     </screenshot>
     <screenshot>
-      
<image>https://gitlab.gnome.org/GNOME/polari/raw/master/data/appdata/polari-connection.png</image>
+      
<image>https://gitlab.gnome.org/GNOME/polari/raw/gnome-3-32/data/appdata/polari-connection.png</image>
     </screenshot>
     <screenshot>
-      
<image>https://gitlab.gnome.org/GNOME/polari/raw/master/data/appdata/polari-connection-properties.png</image>
+      
<image>https://gitlab.gnome.org/GNOME/polari/raw/gnome-3-32/data/appdata/polari-connection-properties.png</image>
     </screenshot>
   </screenshots>
   <launchable type="desktop-id">org.gnome.Polari.desktop</launchable>
Binary files old/polari-3.32.1/data/appdata/polari-connection-properties.png 
and new/polari-3.32.2/data/appdata/polari-connection-properties.png differ
Binary files old/polari-3.32.1/data/appdata/polari-connection.png and 
new/polari-3.32.2/data/appdata/polari-connection.png differ
Binary files old/polari-3.32.1/data/appdata/polari-join-dialog.png and 
new/polari-3.32.2/data/appdata/polari-join-dialog.png differ
Binary files old/polari-3.32.1/data/appdata/polari-main.png and 
new/polari-3.32.2/data/appdata/polari-main.png differ
Binary files old/polari-3.32.1/data/appdata/polari-user-list.png and 
new/polari-3.32.2/data/appdata/polari-user-list.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/data/resources/application.css 
new/polari-3.32.2/data/resources/application.css
--- old/polari-3.32.1/data/resources/application.css    2019-04-17 
15:14:25.000000000 +0200
+++ new/polari-3.32.2/data/resources/application.css    2019-05-14 
22:28:22.000000000 +0200
@@ -1,5 +1,7 @@
 @define-color polari_dark_bg_color shade(@theme_bg_color, 0.95);
 
+.info { margin-bottom: 1px; }
+
 .polari-room-list .sidebar {
     border-style: solid;
     border-color: @borders;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/meson.build 
new/polari-3.32.2/meson.build
--- old/polari-3.32.1/meson.build       2019-04-17 15:14:25.000000000 +0200
+++ new/polari-3.32.2/meson.build       2019-05-14 22:28:22.000000000 +0200
@@ -1,5 +1,5 @@
 project('polari', 'c',
-  version: '3.32.1',
+  version: '3.32.2',
   meson_version: '>= 0.43.0',
   license: 'GPL2+'
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/accountsMonitor.js 
new/polari-3.32.2/src/accountsMonitor.js
--- old/polari-3.32.1/src/accountsMonitor.js    2019-04-17 15:14:25.000000000 
+0200
+++ new/polari-3.32.2/src/accountsMonitor.js    2019-05-14 22:28:22.000000000 
+0200
@@ -3,6 +3,8 @@
 const { Gio, GObject, Polari, TelepathyGLib: Tp } = imports.gi;
 const Signals = imports.signals;
 
+const { NetworksManager } = imports.networksManager;
+
 var AccountsMonitor = class {
     static getDefault() {
         if (!this._singleton)
@@ -12,7 +14,8 @@
 
     constructor() {
         this._accounts = new Map();
-        this._accountSettings = new Map();
+
+        this._networkMonitor = Gio.NetworkMonitor.get_default();
 
         this._app = Gio.Application.get_default();
 
@@ -49,21 +52,6 @@
         return this._accounts.get(accountPath);
     }
 
-    getAccountSettings(account) {
-        let accountPath = account.object_path;
-        let settings = this._accountSettings.get(accountPath);
-        if (settings)
-            return settings;
-
-        let path = `/org/gnome/Polari/Accounts/${account.get_path_suffix()}/`;
-        settings = new Gio.Settings({
-            schema_id: 'org.gnome.Polari.Account',
-            path: path
-        });
-        this._accountSettings.set(accountPath, settings);
-        return settings;
-    }
-
     prepare(callback) {
         let quark = Tp.AccountManager.get_feature_quark_core();
         if (this._accountManager.is_prepared(quark))
@@ -83,10 +71,12 @@
         am.dup_valid_accounts().forEach(this._addAccount.bind(this));
 
         am.connect('account-validity-changed', (am, account, valid) => {
-            if (valid)
+            if (valid) {
                 this._addAccount(account);
-            else
+                this._updateAccountReachable(account);
+            } else {
                 this._removeAccount(account);
+            }
         });
         am.connect('account-removed', (am, account) => {
             this._removeAccount(account);
@@ -95,6 +85,14 @@
         am.connect('account-disabled', this._accountEnabledChanged.bind(this));
 
         this._preparedCallbacks.forEach(callback => callback());
+
+        this._networkMonitor.connect('network-changed',
+            this._onNetworkChanged.bind(this));
+        this._onNetworkChanged();
+    }
+
+    _onNetworkChanged() {
+        this.visibleAccounts.forEach(a => this._updateAccountReachable(a));
     }
 
     _onPrepareShutdown() {
@@ -125,8 +123,13 @@
             account.connect('notify::connection-status', () => {
                 this.emit('account-status-changed', account);
             });
+        account._reachableNotifyId =
+            account.connect('notify::reachable', () => {
+                this.emit('account-reachable-changed', account);
+            });
         account._visibleNotifyId =
             account.connect('notify::visible', () => {
+                this._updateAccountReachable(account);
                 let signal = account.visible ?
                     'account-shown' : 'account-hidden';
                 this.emit(signal, account);
@@ -145,6 +148,9 @@
         account.disconnect(account._statusNotifyId);
         delete account._statusNotifyId;
 
+        account.disconnect(account._reachableNotifyId);
+        delete account._reachableNotifyId;
+
         account.disconnect(account._visibleNotifyId);
         delete account._visibleNotifyId;
 
@@ -159,6 +165,36 @@
         this.emit(signal, account);
         this.emit('accounts-changed');
     }
+
+    async _updateAccountReachable(account) {
+        if (!this._networkMonitor.state_valid)
+            return;
+
+        let servers = account.getServers();
+        for (let s of servers) {
+            let addr = new Gio.NetworkAddress({
+                hostname: s.address,
+                port: s.port
+            });
+
+            account._setReachable(await this._canReach(addr));
+
+            if (account.reachable)
+                break;
+        }
+    }
+
+    _canReach(addr) {
+        return new Promise((resolve) => {
+            this._networkMonitor.can_reach_async(addr, null, (mon, res) => {
+                try {
+                    resolve(this._networkMonitor.can_reach_finish(res));
+                } catch (e) {
+                    resolve(false);
+                }
+            });
+        });
+    }
 };
 Signals.addSignalMethods(AccountsMonitor.prototype);
 
@@ -176,17 +212,56 @@
 
 const PolariAccount = GObject.registerClass({
     Properties: {
+        predefined: GObject.ParamSpec.boolean('predefined',
+                                              'predefined',
+                                              'predefined',
+                                              GObject.ParamFlags.READABLE,
+                                              false),
+        reachable: GObject.ParamSpec.boolean('reachable',
+                                             'reachable',
+                                             'reachable',
+                                             GObject.ParamFlags.READABLE,
+                                             false),
         visible: GObject.ParamSpec.boolean('visible',
                                            'visible',
                                            'visible',
                                            GObject.ParamFlags.READWRITE,
-                                           true)
+                                           true),
+        settings: GObject.ParamSpec.object('settings',
+                                           'settings',
+                                           'settings',
+                                           GObject.ParamFlags.READABLE,
+                                           Gio.Settings.$gtype)
     }
 }, class PolariAccount extends Tp.Account {
     _init(params) {
         this._visible = true;
+        this._reachable = undefined;
+
+        this._networksManager = NetworksManager.getDefault();
 
         super._init(params);
+
+        this._settings = new Gio.Settings({
+            schema_id: 'org.gnome.Polari.Account',
+            path: `/org/gnome/Polari/Accounts/${this.get_path_suffix()}/`
+        });
+    }
+
+    get predefined() {
+        return this._networksManager.getAccountIsPredefined(this);
+    }
+
+    get reachable() {
+        return this._reachable;
+    }
+
+    _setReachable(reachable) {
+        if (this._reachable == reachable)
+            return;
+
+        this._reachable = reachable;
+        this.notify('reachable');
     }
 
     get visible() {
@@ -200,4 +275,32 @@
         this._visible = value;
         this.notify('visible');
     }
+
+    getConnectionParams() {
+        let params = this.dup_parameters_vardict().deep_unpack();
+        for (let p in params)
+            params[p] = params[p].deep_unpack();
+
+        params['use-ssl'] = !!params['use-ssl'];
+
+        let defaultPort = params['use-ssl'] ? 6697 : 6667;
+        params['port'] = params['port'] || defaultPort;
+
+        return params;
+    }
+
+    getServers() {
+        if (this.predefined)
+            return this._networksManager.getNetworkServers(this.service);
+
+        let params = this.getConnectionParams();
+        return [{
+            address: params.server,
+            port: params.port
+        }];
+    }
+
+    get settings() {
+        return this._settings;
+    }
 });
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/application.js 
new/polari-3.32.2/src/application.js
--- old/polari-3.32.1/src/application.js        2019-04-17 15:14:25.000000000 
+0200
+++ new/polari-3.32.2/src/application.js        2019-05-14 22:28:22.000000000 
+0200
@@ -53,7 +53,13 @@
                              GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
                              _('Print version and exit'), null);
         this.connect('handle-local-options', (o, dict) => {
-            let v = dict.lookup_value('test-instance', null);
+            let v = dict.lookup_value('version', null);
+            if (v && v.get_boolean()) {
+                print(`Polari ${pkg.version}`);
+                return 0;
+            }
+
+            v = dict.lookup_value('test-instance', null);
             if (v && v.get_boolean())
                 this._maybeMakeNonUnique();
 
@@ -69,12 +75,6 @@
                 return 0;
             }
 
-            v = dict.lookup_value('version', null);
-            if (v && v.get_boolean()) {
-                print(`Polari ${pkg.version}`);
-                return 0;
-            }
-
             return -1;
         });
     }
@@ -526,7 +526,7 @@
             return true;
         }
 
-        let path = 
`${GLib.get_user_cache_dir()}/polari/initial-setup-completed`;
+        let path = 
`${GLib.get_user_data_dir()}/polari/initial-setup-completed`;
         let f = Gio.File.new_for_path(path);
         try {
             this._touchFile(f);
@@ -618,15 +618,15 @@
         if (data)
             return data;
 
-        let params = Connections.getAccountParams(account);
+        let params = account.getConnectionParams();
         let server = params['server'];
         let accountName = params['account'];
         let port = params['port'];
         debug(`Failed to connect to ${server} with username ${accountName}`);
 
         let accountServers = [];
-        if (this._networksManager.getAccountIsPredefined(account))
-            accountServers = 
this._networksManager.getNetworkServers(account.service);
+        if (account.predefined)
+            accountServers = account.getServers();
 
         data = {
             retry: 0,
@@ -638,7 +638,7 @@
     }
 
     _getTrimmedAccountName(account) {
-        let params = Connections.getAccountParams(account);
+        let params = account.getConnectionParams();
         return params.account.replace(/_+$/, '');
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/connections.js 
new/polari-3.32.2/src/connections.js
--- old/polari-3.32.1/src/connections.js        2019-04-17 15:14:25.000000000 
+0200
+++ new/polari-3.32.2/src/connections.js        2019-05-14 22:28:22.000000000 
+0200
@@ -15,19 +15,6 @@
     NICK: 2
 };
 
-function getAccountParams(account) {
-    let params = account.dup_parameters_vardict().deep_unpack();
-    for (let p in params)
-        params[p] = params[p].deep_unpack();
-
-    params['use-ssl'] = !!params['use-ssl'];
-
-    let defaultPort = params['use-ssl'] ? DEFAULT_SSL_PORT : DEFAULT_PORT;
-    params['port'] = params['port'] || defaultPort;
-
-    return params;
-}
-
 const ConnectionRow = GObject.registerClass(
 class ConnectionRow extends Gtk.ListBoxRow {
     _init(params) {
@@ -194,9 +181,7 @@
         this._list.foreach(w => w.destroy());
 
         let accounts = this._accountsMonitor.accounts;
-        let usedNetworks = accounts.filter(a => {
-            return this._networksManager.getAccountIsPredefined(a);
-        }).map(a => a.service);
+        let usedNetworks = accounts.filter(a => a.predefined).map(a => 
a.service);
 
         this._networksManager.networks.forEach(network => {
             if (this._favoritesOnly &&
@@ -237,7 +222,7 @@
     }
 
     _setAccountRowSensitive(account, sensitive) {
-        if (!this._networksManager.getAccountIsPredefined(account))
+        if (!account.predefined)
             return;
 
         if (!this._rows.has(account.service))
@@ -386,7 +371,7 @@
     }
 
     _populateFromAccount(account) {
-        let params = getAccountParams(account);
+        let params = account.getConnectionParams();
 
         this._savedSSL = params['use-ssl'];
         let defaultPort = this._savedSSL ? DEFAULT_SSL_PORT : DEFAULT_PORT;
@@ -423,7 +408,7 @@
 
     // eslint-disable-next-line camelcase
     get has_service() {
-        return this._networksManager.getAccountIsPredefined(this._account);
+        return this._account && this._account.predefined;
     }
 
     set account(account) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/mainWindow.js 
new/polari-3.32.2/src/mainWindow.js
--- old/polari-3.32.1/src/mainWindow.js 2019-04-17 15:14:25.000000000 +0200
+++ new/polari-3.32.2/src/mainWindow.js 2019-05-14 22:28:22.000000000 +0200
@@ -157,8 +157,8 @@
         });
 
         this._accountsMonitor = AccountsMonitor.getDefault();
-        this._accountsMonitor.connect('accounts-changed',
-                                      this._onAccountsChanged.bind(this));
+        this._accountsChangedId = this._accountsMonitor.connect(
+            'accounts-changed', this._onAccountsChanged.bind(this));
         this._onAccountsChanged(this._accountsMonitor);
 
         this._roomManager = RoomManager.getDefault();
@@ -175,7 +175,10 @@
         this._userListAction = app.lookup_action('user-list');
 
         app.connect('action-state-changed::user-list', (group, name, value) => 
{
-            this._userListPopover.visible = value.get_boolean();
+            if (value.get_boolean())
+                this._userListPopover.popup();
+            else
+                this._userListPopover.popdown();
         });
         this._userListPopover.connect('notify::visible', () => {
             if (!this._userListPopover.visible)
@@ -242,6 +245,8 @@
 
         this.active_room = null;
 
+        this._accountsMonitor.disconnect(this._accountsChangedId);
+
         this._roomManager.disconnect(this._roomsLoadedId);
         this._roomManager.disconnect(this._roomRemovedId);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/roomList.js 
new/polari-3.32.2/src/roomList.js
--- old/polari-3.32.1/src/roomList.js   2019-04-17 15:14:25.000000000 +0200
+++ new/polari-3.32.2/src/roomList.js   2019-05-14 22:28:22.000000000 +0200
@@ -33,7 +33,6 @@
         this._room = room;
         this._popover = null;
 
-        this._popoverVisibleChangedId = 0;
         this._connectingTimeoutId = 0;
 
         this._icon.gicon = room.icon;
@@ -59,19 +58,13 @@
         }
 
         this.connect('destroy', () => {
-            if (this._popoverVisibleChangedId)
-                this._popover.disconnect(this._popoverVisibleChangedId);
-            this._popoverVisibleChangedId = 0;
-
             room.disconnect(channelChangedId);
             this._channelSignals.forEach(id => {
                 room.channel.disconnect(id);
             });
             if (connectionStatusChangedId)
                 this.account.disconnect(connectionStatusChangedId);
-            if (this._connectingTimeoutId)
-                GLib.source_remove(this._connectingTimeoutId);
-            this._connectingTimeoutId = 0;
+            this._clearConnectingTimeout();
         });
 
         this._updatePending();
@@ -130,6 +123,7 @@
                 return GLib.SOURCE_REMOVE;
             });
         } else {
+            this._clearConnectingTimeout();
             this._eventStack.visible_child_name = 'messages';
         }
     }
@@ -152,6 +146,7 @@
 
         if (!this._room.channel)
             return;
+        this._clearConnectingTimeout();
         this._eventStack.visible_child_name = 'messages';
 
         for (let signal of ['message-received', 'pending-message-removed']) {
@@ -194,12 +189,17 @@
                         `app.leave-room(("${this._room.id}", ""))`);
 
             this._popover = Gtk.Popover.new_from_model(this, menu);
-            this._popoverVisibleChangedId =
-                this._popover.connect('notify::visible',
-                                      _onPopoverVisibleChanged);
+            this._popover.connect('notify::visible',
+                                  _onPopoverVisibleChanged);
             this._popover.position = Gtk.PositionType.BOTTOM;
         }
-        this._popover.show();
+        this._popover.popup();
+    }
+
+    _clearConnectingTimeout() {
+        if (this._connectingTimeoutId)
+            GLib.source_remove(this._connectingTimeoutId);
+        this._connectingTimeoutId = 0;
     }
 });
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/roomStack.js 
new/polari-3.32.2/src/roomStack.js
--- old/polari-3.32.1/src/roomStack.js  2019-04-17 15:14:25.000000000 +0200
+++ new/polari-3.32.2/src/roomStack.js  2019-05-14 22:28:22.000000000 +0200
@@ -91,44 +91,44 @@
 });
 
 const SavePasswordConfirmationBar = GObject.registerClass(
-class SavePasswordConfirmationBar extends Gtk.Revealer {
+class SavePasswordConfirmationBar extends Gtk.InfoBar {
     _init(room) {
         this._room = room;
 
-        super._init({ valign: Gtk.Align.START });
+        super._init({
+            show_close_button: true,
+            revealed: false,
+            valign: Gtk.Align.START
+        });
 
         this.connect('destroy', this._onDestroy.bind(this));
 
         this._createWidget();
 
         this._identifySentId = this._room.connect('identify-sent', () => {
-            this.reveal_child = true;
-        });
-        this._infoBar.connect('response', (w, res) => {
-            if (res == Gtk.ResponseType.CLOSE) {
-                let app = Gio.Application.get_default();
-                let target = new GLib.Variant('o', 
this._room.account.object_path);
-                
app.lookup_action('discard-identify-password').activate(target);
-            }
-            this.reveal_child = false;
+            this.revealed = true;
         });
     }
 
-    _createWidget() {
-        this._infoBar = new Gtk.InfoBar({ show_close_button: true });
-        this.add(this._infoBar);
+    vfunc_response(response) {
+        this.revealed = false;
+
+        if (response == Gtk.ResponseType.ACCEPT)
+            return;
 
+        let app = Gio.Application.get_default();
         let target = new GLib.Variant('o', this._room.account.object_path);
-        let button = new Gtk.Button({
-            label: _('_Save Password'),
-            use_underline: true,
+        app.lookup_action('discard-identify-password').activate(target);
+    }
+
+    _createWidget() {
+        this.add_button(_('_Save Password'), Gtk.ResponseType.ACCEPT).set({
             action_name: 'app.save-identify-password',
-            action_target: target
+            action_target: new GLib.Variant('o', 
this._room.account.object_path)
         });
-        this._infoBar.add_action_widget(button, Gtk.ResponseType.ACCEPT);
 
         let box = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
-        this._infoBar.get_content_area().add(box);
+        this.get_content_area().add(box);
 
         let title = _('Should the password be saved?');
         this._titleLabel = new Gtk.Label({
@@ -147,7 +147,7 @@
         });
         box.add(this._subtitleLabel);
 
-        this._infoBar.show_all();
+        box.show_all();
     }
 
     _onDestroy() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/polari-3.32.1/src/telepathyClient.js 
new/polari-3.32.2/src/telepathyClient.js
--- old/polari-3.32.1/src/telepathyClient.js    2019-04-17 15:14:25.000000000 
+0200
+++ new/polari-3.32.2/src/telepathyClient.js    2019-05-14 22:28:22.000000000 
+0200
@@ -125,7 +125,6 @@
         this.set_handler_bypass_approval(false);
         this.set_observer_recover(true);
 
-        this._networkMonitor = Gio.NetworkMonitor.get_default();
         this._roomManager = RoomManager.getDefault();
         this._roomManager.connect('room-added', (mgr, room) => {
             if (room.account.connection)
@@ -232,33 +231,22 @@
 
         this._accountsMonitor.connect('account-status-changed',
                                       this._onAccountStatusChanged.bind(this));
-        this._accountsMonitor.connect('account-added', (mon, account) => {
-            this._connectAccount(account);
-        });
-        this._accountsMonitor.connect('account-shown', (mon, account) => {
-            this._connectAccount(account);
-        });
+        this._accountsMonitor.connect('account-reachable-changed',
+                                      
this._onAccountReachableChanged.bind(this));
         this._accountsMonitor.visibleAccounts.forEach(a => {
             this._onAccountStatusChanged(this._accountsMonitor, a);
         });
-
-        this._networkMonitor.connect('network-changed',
-                                     this._onNetworkChanged.bind(this));
-        if (this._networkMonitor.state_valid) {
-            this._onNetworkChanged(this._networkMonitor,
-                                   this._networkMonitor.network_available);
-        }
     }
 
-    _onNetworkChanged(mon, connected) {
-        let presence = connected ?
-            Tp.ConnectionPresenceType.AVAILABLE :
-            Tp.ConnectionPresenceType.OFFLINE;
-        debug(`Network changed to ${connected ? 'available' : 'unavailable'}`);
+    _onAccountReachableChanged(mon, account) {
+        let presence = account.reachable
+            ? Tp.ConnectionPresenceType.AVAILABLE
+            : Tp.ConnectionPresenceType.OFFLINE;
+        debug(`Account ${account.display_name} is now ${account.reachable
+            ? 'reachable'
+            : 'unreachable'}`);
 
-        this._accountsMonitor.visibleAccounts.forEach(a => {
-            this._setAccountPresence(a, presence);
-        });
+        this._setAccountPresence(account, presence);
     }
 
     _onAccountStatusChanged(mon, account) {
@@ -344,7 +332,7 @@
     }
 
     _sendIdentify(account, password) {
-        let settings = this._accountsMonitor.getAccountSettings(account);
+        let { settings } = account;
 
         let params = account.dup_parameters_vardict().deep_unpack();
         let username = settings.get_string('identify-username') ||
@@ -489,7 +477,7 @@
     }
 
     _saveIdentifySettings(account, data) {
-        let settings = this._accountsMonitor.getAccountSettings(account);
+        let { settings } = account;
 
         if (data.botname == 'NickServ')
             settings.reset('identify-botname');


Reply via email to