[polari/wip/fmuellner/window-experiments: 15/24] chatroomManager: Set :active-room property of new windows



commit 1cce57ba8fdf9d07b276c73510b30e1587399d5b
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jul 14 16:04:43 2016 +0200

    chatroomManager: Set :active-room property of new windows
    
    When we start supporting multiple windows, we don't want new
    windows to open with no selected room or a random one. Starting
    out with the active room of the most recently used window is
    predictable and makes some sense ("fork the current window").

 src/chatroomManager.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index 62cabc1..e7d14ec 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -161,6 +161,7 @@ const _ChatroomManager = new Lang.Class({
         this._app.connect('window-added', (a, w) => {
             w.connect('notify::active-room',
                       Lang.bind(this, this._onActiveRoomChanged));
+            w.connect('realize', w => { w.active_room = this._activeRoom; });
         });
 
         this._settings = new Gio.Settings({ schema_id: 'org.gnome.Polari' });


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