From 1006706cf6891928864a0eab539674684d8c34ab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 15 Jan 2014 17:42:17 -0800 Subject: [PATCH 1/5] Consistently order less cache import paths --- spec/theme-manager-spec.coffee | 4 ++-- src/theme-manager.coffee | 23 +++++++++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/spec/theme-manager-spec.coffee b/spec/theme-manager-spec.coffee index bb96a5b2a..cc49a19f1 100644 --- a/spec/theme-manager-spec.coffee +++ b/spec/theme-manager-spec.coffee @@ -38,8 +38,8 @@ describe "ThemeManager", -> # syntax theme is not a dir at this time, so only two. expect(paths.length).toBe 2 - expect(paths[0]).toContain 'atom-dark-ui' - expect(paths[1]).toContain 'atom-light-ui' + expect(paths[0]).toContain 'atom-light-ui' + expect(paths[1]).toContain 'atom-dark-ui' it "ignores themes that cannot be resolved to a directory", -> atom.config.set('core.themes', ['definitely-not-a-theme']) diff --git a/src/theme-manager.coffee b/src/theme-manager.coffee index b34d07acf..6b1470e60 100644 --- a/src/theme-manager.coffee +++ b/src/theme-manager.coffee @@ -42,19 +42,26 @@ class ThemeManager # Internal-only: adhere to the PackageActivator interface activatePackages: (themePackages) -> @activateThemes() + # Private: Get the enabled theme names from the config. + # + # Returns an array of theme names in the order that they should be activated. + getEnabledThemeNames: -> + themeNames = atom.config.get('core.themes') ? [] + themeNames = [themeNames] unless _.isArray(themeNames) + + # Reverse so the first (top) theme is loaded after the others. We want + # the first/top theme to override later themes in the stack. + themeNames.reverse() + # Internal-only: activateThemes: -> # atom.config.observe runs the callback once, then on subsequent changes. - atom.config.observe 'core.themes', (themeNames) => + atom.config.observe 'core.themes', => @deactivateThemes() - themeNames = [themeNames] unless _.isArray(themeNames) - - # Reverse so the first (top) theme is loaded after the others. We want - # the first/top theme to override later themes in the stack. - themeNames = _.clone(themeNames).reverse() @refreshLessCache() # Update cache for packages in core.themes config - @packageManager.activatePackage(themeName) for themeName in themeNames + for themeName in @getEnabledThemeNames() + @packageManager.activatePackage(themeName) @refreshLessCache() # Update cache again now that @getActiveThemes() is populated @loadUserStylesheet() @@ -85,7 +92,7 @@ class ThemeManager themePaths = (theme.getStylesheetsPath() for theme in activeThemes when theme) else themePaths = [] - for themeName in atom.config.get('core.themes') ? [] + for themeName in @getEnabledThemeNames() if themePath = @packageManager.resolvePackagePath(themeName) themePaths.push(path.join(themePath, AtomPackage.stylesheetsDir)) From 24f386df2d8056432f20502e34e4a1cf6730c749 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 15 Jan 2014 17:54:06 -0800 Subject: [PATCH 2/5] Wait 30 seconds for move events --- spec/file-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/file-spec.coffee b/spec/file-spec.coffee index 41b711514..c2a93ffad 100644 --- a/spec/file-spec.coffee +++ b/spec/file-spec.coffee @@ -73,7 +73,7 @@ describe 'File', -> fs.moveSync(filePath, newPath) - waitsFor "move event", -> + waitsFor "move event", 30000, -> moveHandler.callCount > 0 runs -> From ceac8ba0e15b1f31e2c2e3c8025be34ee50637e0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 15 Jan 2014 18:17:14 -0800 Subject: [PATCH 3/5] Prepare 0.47.0 release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6d902db3..0dd553e4d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.46.0", + "version": "0.47.0", "main": "./src/browser/main.js", "repository": { "type": "git", From ff9c9adeff18a9aad0f9d5da03fd00f5a6476e65 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 15 Jan 2014 19:26:22 -0700 Subject: [PATCH 4/5] Upgrade find-and-replace to 0.76.0 to fix result marker updates --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0dd553e4d..08f11251e 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "editor-stats": "0.12.0", "exception-reporting": "0.11.0", "feedback": "0.22.0", - "find-and-replace": "0.75.0", + "find-and-replace": "0.76.0", "fuzzy-finder": "0.31.0", "gists": "0.15.0", "git-diff": "0.22.0", From 910469d373231cb5e233c7f0deb978346facd3c7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 15 Jan 2014 20:20:00 -0700 Subject: [PATCH 5/5] Upgrade theorist to 0.14.0 to ensure new ids are > than deserialized ids --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08f11251e..135a96ed8 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "temp": "0.5.0", "text-buffer": "0.13.0", "underscore-plus": "0.6.1", - "theorist": "~0.13.0", + "theorist": "~0.14.0", "delegato": "~0.4.0", "mixto": "~0.4.0", "property-accessors": "~0.1.0"