[polari/wip/fmuellner/window-experiments: 354/356] Some more single-room fixes
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/window-experiments: 354/356] Some more single-room fixes
- Date: Mon, 20 Mar 2017 21:33:38 +0000 (UTC)
commit 2e239630bc4d30434918b751321195c6f37dc21f
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/mainWindow.js | 1 +
src/roomManager.js | 2 +-
3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 612c9ec..7699946 100644
--- a/src/application.js
+++ b/src/application.js
@@ -126,6 +126,10 @@ const Application = new Lang.Class({
this._demons = [];
},
+ get active_main_window() {
+ return this.get_windows().filter(w => !w.single_room).shift();
+ },
+
vfunc_startup: function() {
this.parent();
diff --git a/src/mainWindow.js b/src/mainWindow.js
index f7be4aa..28ae700 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -192,6 +192,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',
diff --git a/src/roomManager.js b/src/roomManager.js
index 6c80215..6756f13 100644
--- a/src/roomManager.js
+++ b/src/roomManager.js
@@ -184,7 +184,7 @@ const _RoomManager = new Lang.Class({
let [present, ] = Tp.user_action_time_should_present(time);
if (present && this._app.active_window)
- this._app.active_window.active_room = room;
+ this._app.active_main_window.active_room = room;
return room;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]