[polari/wip/fmuellner/window-experiments: 29/29] Some more single-room fixes



commit eefe073bf54ad26b0a799a2843b57edf4b098617
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 20 00:35:42 2016 +0200

    Some more single-room fixes

 src/application.js     |    4 ++++
 src/chatroomManager.js |    2 +-
 src/mainWindow.js      |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 89951f8..4082c49 100644
--- a/src/application.js
+++ b/src/application.js
@@ -41,6 +41,10 @@ const Application = new Lang.Class({
         this._startHidden = false;
     },
 
+    get active_main_window() {
+        return this.get_windows().filter(w => !w.single_room).shift();
+    },
+
     vfunc_startup: function() {
         this.parent();
 
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index dbc6109..2275e2f 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -483,7 +483,7 @@ const _ChatroomManager = new Lang.Class({
     },
 
     _setActiveRoom: function(room) {
-        this._app.active_window.active_room = room;
+        this._app.active_main_window.active_room = room;
     },
 
     forEachRoom: function(func) {
diff --git a/src/mainWindow.js b/src/mainWindow.js
index e85f2bd..96b1f10 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -183,6 +183,7 @@ const MainWindow = new Lang.Class({
 
         let actionEntries = [
           { name: 'show-join-dialog',
+            create_hook: Lang.bind(this, this._roomNavCreateHook),
             activate: Lang.bind(this, this._onShowJoinDialog),
             accels: ['<Primary>n'] },
           { name: 'leave-current-room',


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