Pass app version via window's url.

We could save the sync message of atom.getVersion().
This commit is contained in:
Cheng Zhao
2014-02-03 19:18:15 +08:00
parent c30f74ef9e
commit 272ce92201
2 changed files with 3 additions and 1 deletions

View File

@@ -104,7 +104,7 @@ class Atom extends Model
# Private: Get the version of the Atom application.
@getVersion: ->
@version ?= app.getVersion()
@version ?= @getLoadSettings().appVersion
# Private: Determine whether the current version is an official release.
@isReleasedVersion: ->

View File

@@ -1,6 +1,7 @@
BrowserWindow = require 'browser-window'
Menu = require 'menu'
ContextMenu = require './context-menu'
app = require 'app'
dialog = require 'dialog'
ipc = require 'ipc'
path = require 'path'
@@ -32,6 +33,7 @@ class AtomWindow
loadSettings = _.extend({}, settings)
loadSettings.windowState ?= '{}'
loadSettings.appVersion = app.getVersion()
# Only send to the first non-spec window created
if @constructor.includeShellLoadTime and not @isSpec