[gnome-documents] application: set overview window mode from application activation
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] application: set overview window mode from application activation
- Date: Tue, 13 Mar 2012 01:45:39 +0000 (UTC)
commit b8c200e88386db32a791ff188bf2c33f65f86b19
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 12 21:20:18 2012 -0400
application: set overview window mode from application activation
In case we got an URI from the activation request, handlers for the
active-item-changed on DocumentsManager will set the correct window mode
for us. Otherwise, set OVERVIEW here instead of the MainWindow
constructor, since that's unconditionally run.
src/application.js | 7 +++++--
src/mainWindow.js | 2 --
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 194e914..a78c21a 100644
--- a/src/application.js
+++ b/src/application.js
@@ -198,8 +198,6 @@ Application.prototype = {
},
_commandLine: function(app, commandLine) {
- app.activate();
-
let args = commandLine.get_arguments();
if (args.length) {
let urn = args[0]; // gjs eats argv[0]
@@ -217,7 +215,12 @@ Application.prototype = {
Global.documentManager.setActiveItem(doc);
}));
}
+ } else {
+ Global.modeController.setWindowMode(WindowMode.WindowMode.OVERVIEW);
}
+
+ app.activate();
+
return 0;
}
};
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 705767f..28f28d4 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -58,8 +58,6 @@ MainWindow.prototype = {
let stage = this._clutterEmbed.get_stage();
- Global.modeController.setWindowMode(WindowMode.WindowMode.OVERVIEW);
-
// apply the last saved window size and position
let size = Global.settings.get_value('window-size');
if (size.n_children() == 2) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]