From 6348d8f07870752c52ee0582c9c51e30fe11e971 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 2 Oct 2015 11:47:00 -0600 Subject: [PATCH] Remove last Atom static methods --- spec/atom-spec.coffee | 2 +- src/atom.coffee | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index c138e83eb..1d8942e9d 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -151,7 +151,7 @@ describe "the `atom` global", -> [dir1, dir2] = [temp.mkdirSync("dir1-"), temp.mkdirSync("dir2-")] - loadSettings = _.extend atom.constructor.getLoadSettings(), + loadSettings = _.extend atom.getLoadSettings(), initialPaths: [dir1] windowState: null diff --git a/src/atom.coffee b/src/atom.coffee index 815063407..91d9f6e77 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -37,16 +37,6 @@ module.exports = class Atom extends Model @version: 1 # Increment this when the serialization format changes - # Returns the load settings hash associated with the current window. - @getLoadSettings: -> getWindowLoadSettings() - - @updateLoadSetting: (key, value) -> - @getLoadSettings()[key] = value - location.hash = encodeURIComponent(JSON.stringify(@loadSettings)) - - @getCurrentWindow: -> - remote.getCurrentWindow() - workspaceParentSelectorctor: 'body' lastUncaughtError: null @@ -285,7 +275,11 @@ class Atom extends Model # # Returns an {Object} containing all the load setting key/value pairs. getLoadSettings: -> - @constructor.getLoadSettings() + getWindowLoadSettings() + + updateLoadSetting: (key, value) -> + @getLoadSettings()[key] = value + location.hash = encodeURIComponent(JSON.stringify(@loadSettings)) ### Section: Managing The Atom Window @@ -354,7 +348,7 @@ class Atom extends Model # Extended: Get the current window getCurrentWindow: -> - @constructor.getCurrentWindow() + remote.getCurrentWindow() # Extended: Move current window to the center of the screen. center: -> @@ -693,7 +687,7 @@ class Atom extends Model # Notify the browser project of the window's current project path watchProjectPath: -> @disposables.add @project.onDidChangePaths => - @constructor.updateLoadSetting('initialPaths', @project.getPaths()) + @updateLoadSetting('initialPaths', @project.getPaths()) exit: (status) -> app = remote.require('app')