diff --git a/Hermes.xcodeproj/project.pbxproj b/Hermes.xcodeproj/project.pbxproj index e4754aa..66878c9 100644 --- a/Hermes.xcodeproj/project.pbxproj +++ b/Hermes.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ 97539FAD158442A500D1E65C /* URLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 97539FAC158442A500D1E65C /* URLConnection.m */; }; 97E0DA35159EDF7C00BEA465 /* radio.png in Resources */ = {isa = PBXBuildFile; fileRef = 97E0DA34159EDF7C00BEA465 /* radio.png */; }; B2A26AEF1AE39E9B00ADD460 /* MusicProgressSliderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B2A26AEE1AE39E9B00ADD460 /* MusicProgressSliderCell.m */; }; + D68477BF1E8DC7E600DCBB34 /* Pandora-Menu-BW-Only.icns in Resources */ = {isa = PBXBuildFile; fileRef = D68477BE1E8DC7E600DCBB34 /* Pandora-Menu-BW-Only.icns */; }; E1200AA11CF2A4CC000D3215 /* LabelHoverShowField.m in Sources */ = {isa = PBXBuildFile; fileRef = E1200AA01CF2A4CC000D3215 /* LabelHoverShowField.m */; }; E1200AA41CF2B015000D3215 /* LabelHoverShowFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E1200AA31CF2B015000D3215 /* LabelHoverShowFieldCell.m */; }; E124109A18EBAF6F007AF091 /* HermesApp.m in Sources */ = {isa = PBXBuildFile; fileRef = E124109918EBAF6F007AF091 /* HermesApp.m */; }; @@ -156,6 +157,7 @@ 97E0DA34159EDF7C00BEA465 /* radio.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = radio.png; sourceTree = ""; }; B2A26AED1AE39E9B00ADD460 /* MusicProgressSliderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MusicProgressSliderCell.h; path = Views/MusicProgressSliderCell.h; sourceTree = ""; }; B2A26AEE1AE39E9B00ADD460 /* MusicProgressSliderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MusicProgressSliderCell.m; path = Views/MusicProgressSliderCell.m; sourceTree = ""; }; + D68477BE1E8DC7E600DCBB34 /* Pandora-Menu-BW-Only.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "Pandora-Menu-BW-Only.icns"; sourceTree = ""; }; E1200A9F1CF2A4CC000D3215 /* LabelHoverShowField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LabelHoverShowField.h; path = Views/LabelHoverShowField.h; sourceTree = ""; }; E1200AA01CF2A4CC000D3215 /* LabelHoverShowField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LabelHoverShowField.m; path = Views/LabelHoverShowField.m; sourceTree = ""; }; E1200AA21CF2B015000D3215 /* LabelHoverShowFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LabelHoverShowFieldCell.h; path = Views/LabelHoverShowFieldCell.h; sourceTree = ""; }; @@ -518,6 +520,7 @@ FAEFFC4B132D6D2A007DC6FB /* pause.png */, FAEFFC4C132D6D2A007DC6FB /* play.png */, FAEFFBD4132CC0E2007DC6FB /* error_icon.png */, + D68477BE1E8DC7E600DCBB34 /* Pandora-Menu-BW-Only.icns */, E1C1EC101A1AE7E4001E4D8F /* Pandora-Menu-Dark-Play.pdf */, E1C1EC111A1AE7E4001E4D8F /* Pandora-Menu-Dark-Pause.pdf */, ); @@ -615,6 +618,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + D68477BF1E8DC7E600DCBB34 /* Pandora-Menu-BW-Only.icns in Resources */, 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, FAEFFBD5132CC0E2007DC6FB /* error_icon.png in Resources */, diff --git a/Resources/English.lproj/MainMenu.xib b/Resources/English.lproj/MainMenu.xib index 527fcbd..24922f4 100644 --- a/Resources/English.lproj/MainMenu.xib +++ b/Resources/English.lproj/MainMenu.xib @@ -970,6 +970,7 @@ Gw + @@ -1343,11 +1344,11 @@ DQ - + - + @@ -1368,7 +1369,7 @@ DQ - + @@ -1389,15 +1390,15 @@ DQ - + - + - + @@ -1455,11 +1456,11 @@ DQ - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/Resources/Icons/Pandora-Menu-BW-Only.icns b/Resources/Icons/Pandora-Menu-BW-Only.icns new file mode 100644 index 0000000..77d4ff8 Binary files /dev/null and b/Resources/Icons/Pandora-Menu-BW-Only.icns differ diff --git a/Sources/Controllers/PreferencesController.h b/Sources/Controllers/PreferencesController.h index 5d31293..081d1a6 100644 --- a/Sources/Controllers/PreferencesController.h +++ b/Sources/Controllers/PreferencesController.h @@ -30,6 +30,7 @@ #define ALBUM_ART_PLAY_PAUSE @"albumArtPlayPause" #define STATUS_BAR_ICON @"statusBarIcon" #define STATUS_BAR_ICON_BW @"statusBarIconBlackWhite" +#define STATUS_BAR_ICON_BW_ONLY @"statusBarIconBlackWhiteOnly" #define STATUS_BAR_ICON_ALBUM @"statusBarIconAlbumArt" #define STATUS_BAR_SHOW_SONG @"statusBarShowSongTitle" #define ALWAYS_ON_TOP @"alwaysOnTop" @@ -76,6 +77,7 @@ IBOutlet NSTextField *mediaKeysLabel; IBOutlet NSButton *statusItemShowColorIcon; + IBOutlet NSButton *statusItemShowBlackAndWhiteOnlyIcon; IBOutlet NSButton *statusItemShowBlackAndWhiteIcon; IBOutlet NSButton *statusItemShowAlbumArt; diff --git a/Sources/Controllers/PreferencesController.m b/Sources/Controllers/PreferencesController.m index 3eb1c9a..6d9335d 100644 --- a/Sources/Controllers/PreferencesController.m +++ b/Sources/Controllers/PreferencesController.m @@ -18,6 +18,8 @@ - (void)windowDidBecomeMain:(NSNotification *)notification { if (PREF_KEY_BOOL(STATUS_BAR_ICON_BW)) statusItemShowBlackAndWhiteIcon.state = NSOnState; + else if (PREF_KEY_BOOL(STATUS_BAR_ICON_BW_ONLY)) + statusItemShowBlackAndWhiteOnlyIcon.state = NSOnState; else if (PREF_KEY_BOOL(STATUS_BAR_ICON_ALBUM)) statusItemShowAlbumArt.state = NSOnState; else @@ -113,12 +115,19 @@ - (IBAction) showNetwork: (id) sender { - (IBAction) statusItemIconChanged:(id)sender { if (sender == statusItemShowColorIcon) { PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW, NO); + PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW_ONLY, NO); PREF_KEY_SET_BOOL(STATUS_BAR_ICON_ALBUM, NO); } else if (sender == statusItemShowBlackAndWhiteIcon) { PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW, YES); + PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW_ONLY, NO); + PREF_KEY_SET_BOOL(STATUS_BAR_ICON_ALBUM, NO); + } else if (sender == statusItemShowBlackAndWhiteOnlyIcon) { + PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW, NO); + PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW_ONLY, YES); PREF_KEY_SET_BOOL(STATUS_BAR_ICON_ALBUM, NO); } else if (sender == statusItemShowAlbumArt) { PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW, NO); + PREF_KEY_SET_BOOL(STATUS_BAR_ICON_BW_ONLY, NO); PREF_KEY_SET_BOOL(STATUS_BAR_ICON_ALBUM, YES); } [HMSAppDelegate updateStatusItem:sender]; diff --git a/Sources/HermesAppDelegate.m b/Sources/HermesAppDelegate.m index b99a1da..6a25e46 100644 --- a/Sources/HermesAppDelegate.m +++ b/Sources/HermesAppDelegate.m @@ -587,18 +587,18 @@ - (IBAction) updateStatusItem:(id)sender { } NSImage *icon; + NSSize size = {.width = 18, .height = 18}; - if (PREF_KEY_BOOL(STATUS_BAR_ICON_BW)) { - + if (PREF_KEY_BOOL(STATUS_BAR_ICON_BW)) { icon = [NSImage imageNamed:(playback.playing.isPlaying) ? @"Pandora-Menu-Dark-Play" : @"Pandora-Menu-Dark-Pause"]; [icon setTemplate:YES]; - + } else if (PREF_KEY_BOOL(STATUS_BAR_ICON_BW_ONLY)) { + icon = [NSImage imageNamed:@"Pandora-Menu-BW-Only"]; // Use b&w only application image + [icon setTemplate:YES]; } else if (PREF_KEY_BOOL(STATUS_BAR_ICON_ALBUM)) { - icon = [self buildPlayPauseAlbumArtImage:size]; - } else { // Use color application image icon = [NSImage imageNamed:@"pandora"];