[polari/wip/fmuellner/stricter-highlighting] Work around a GJS regression



commit 0cb4f2d872525de237da4fe6e9c9724fed9f968e
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jul 26 13:43:32 2018 +0200

    Work around a GJS regression
    
    Somehow properties from the TpChannelIface disappeard on TpChannel.
    Same for GtkActionable ...
    Fall back to the accessor functions in the meantime.

 src/roomList.js        | 20 ++++++++++----------
 src/roomManager.js     |  6 ++++--
 src/telepathyClient.js |  3 ++-
 3 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index 49cd0c8..38bf2b8 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -229,16 +229,16 @@ var RoomListHeader = GObject.registerClass({
         });
 
         let target = new GLib.Variant('o', this._account.get_object_path());
-        this._popoverConnect.action_target = target;
-        this._popoverConnect.action_name = 'app.connect-account';
-        this._popoverDisconnect.action_target = target;
-        this._popoverDisconnect.action_name = 'app.disconnect-account';
-        this._popoverReconnect.action_target = target;
-        this._popoverReconnect.action_name = 'app.reconnect-account';
-        this._popoverRemove.action_target = target;
-        this._popoverRemove.action_name = 'app.remove-connection';
-        this._popoverProperties.action_target = target;
-        this._popoverProperties.action_name = 'app.edit-connection';
+        this._popoverConnect.set_action_target_value(target);
+        this._popoverConnect.set_action_name('app.connect-account');
+        this._popoverDisconnect.set_action_target_value(target);
+        this._popoverDisconnect.set_action_name('app.disconnect-account');
+        this._popoverReconnect.set_action_target_value(target);
+        this._popoverReconnect.set_action_name('app.reconnect-account');
+        this._popoverRemove.set_action_target_value(target);
+        this._popoverRemove.set_action_name('app.remove-connection');
+        this._popoverProperties.set_action_target_value(target);
+        this._popoverProperties.set_action_name('app.edit-connection');
 
         this._popoverPassword.connect('activate', () => {
             let action = this._app.lookup_action('authenticate-account');
diff --git a/src/roomManager.js b/src/roomManager.js
index cabe2c2..a74463e 100644
--- a/src/roomManager.js
+++ b/src/roomManager.js
@@ -61,7 +61,8 @@ var RoomManager = class {
     lookupRoomByChannel(channel) {
         let account = channel.connection.get_account();
         let channelName = channel.identifier;
-        let id = Polari.create_room_id(account, channelName, channel.handle_type);
+        let [, handleType] = channel.get_handle();
+        let id = Polari.create_room_id(account, channelName, handleType);
         return this._rooms.get(id);
     }
 
@@ -187,7 +188,8 @@ var RoomManager = class {
         let targetContact = channel.target_contact;
         let channelName = targetContact ? targetContact.alias
                                         : channel.identifier;
-        let room = this._ensureRoom(accountPath, channelName, channel.handle_type, time);
+        let [, handleType] = channel.get_handle();
+        let room = this._ensureRoom(accountPath, channelName, handleType, time);
         room.channel = channel;
     }
 
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index a961f14..e0876b7 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -463,7 +463,8 @@ class TelepathyClient extends Tp.BaseClient {
     }
 
     _isAuthChannel(channel) {
-        return channel.channel_type == Tp.IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION;
+        let channelType = channel.get_channel_type();
+        return channelType == Tp.IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION;
     }
 
     _processRequest(context, connection, channels, processChannel) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]