@@ -55,7 +55,7 @@ import { clipboard } from 'electron';
5555import { IPartService } from 'vs/workbench/services/part/common/partService' ;
5656import { alert } from 'vs/base/browser/ui/aria/aria' ;
5757import { coalesce } from 'vs/base/common/arrays' ;
58- import { IWorkbenchThemeService , COLOR_THEME_SETTING } from 'vs/workbench/services/themes/common/workbenchThemeService' ;
58+ import { IWorkbenchThemeService , COLOR_THEME_SETTING , ICON_THEME_SETTING } from 'vs/workbench/services/themes/common/workbenchThemeService' ;
5959
6060function toExtensionDescription ( local : ILocalExtension ) : IExtensionDescription {
6161 return {
@@ -1141,7 +1141,8 @@ export class SetColorThemeAction extends ExtensionAction {
11411141 return ;
11421142 }
11431143 let colorThemes = await this . workbenchThemeService . getColorThemes ( new ExtensionIdentifier ( this . extension . identifier . id ) ) ;
1144- const currentTheme = this . workbenchThemeService . getColorTheme ( ) ;
1144+ const allThemes = await this . workbenchThemeService . getColorThemes ( ) ;
1145+ const currentTheme = allThemes . filter ( t => t . settingsId === this . configurationService . getValue ( COLOR_THEME_SETTING ) ) [ 0 ] ;
11451146 showCurrentTheme = showCurrentTheme || colorThemes . some ( t => t . id === currentTheme . id ) ;
11461147 if ( showCurrentTheme ) {
11471148 colorThemes = colorThemes . filter ( t => t . id !== currentTheme . id ) ;
@@ -1207,7 +1208,8 @@ export class SetFileIconThemeAction extends ExtensionAction {
12071208 return ;
12081209 }
12091210 let fileIconThemes = await this . workbenchThemeService . getFileIconThemes ( new ExtensionIdentifier ( this . extension . identifier . id ) ) ;
1210- const currentTheme = this . workbenchThemeService . getFileIconTheme ( ) ;
1211+ const allThemes = await this . workbenchThemeService . getFileIconThemes ( ) ;
1212+ const currentTheme = allThemes . filter ( t => t . settingsId === this . configurationService . getValue ( ICON_THEME_SETTING ) ) [ 0 ] ;
12111213 showCurrentTheme = showCurrentTheme || fileIconThemes . some ( t => t . id === currentTheme . id ) ;
12121214 if ( showCurrentTheme ) {
12131215 fileIconThemes = fileIconThemes . filter ( t => t . id !== currentTheme . id ) ;
@@ -1226,7 +1228,7 @@ export class SetFileIconThemeAction extends ExtensionAction {
12261228 placeHolder : localize ( 'select file icon theme' , "Select File Icon Theme" ) ,
12271229 onDidFocus : item => delayer . trigger ( ( ) => this . workbenchThemeService . setFileIconTheme ( item . id , undefined ) )
12281230 } ) ;
1229- let confValue = this . configurationService . inspect ( COLOR_THEME_SETTING ) ;
1231+ let confValue = this . configurationService . inspect ( ICON_THEME_SETTING ) ;
12301232 const target = typeof confValue . workspace !== 'undefined' ? ConfigurationTarget . WORKSPACE : ConfigurationTarget . USER ;
12311233 return this . workbenchThemeService . setFileIconTheme ( pickedTheme ? pickedTheme . id : currentTheme . id , target ) ;
12321234 }
0 commit comments