Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated constants and typenames with updated counterparts #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Sources/HermesAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (NSMenu *)applicationDockMenu:(NSApplication *)sender {
keyEquivalent:@""];
[menuItem setTarget:playback];
if ([[song nrating] intValue] == 1) {
menuItem.state = NSOnState;
menuItem.state = NSControlStateValueOn;
}
menuItem = [menu addItemWithTitle:@"Dislike"
action:@selector(dislike:)
Expand Down Expand Up @@ -187,8 +187,8 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notification {
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSUInteger flags = ([NSEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask);
BOOL isOptionPressed = (flags == NSAlternateKeyMask);
NSUInteger flags = ([NSEvent modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask);
BOOL isOptionPressed = (flags == NSEventModifierFlagOption);

if (isOptionPressed && [self configureLogFile]) {
_debugMode = YES;
Expand Down Expand Up @@ -559,7 +559,7 @@ - (NSImage *) buildPlayPauseAlbumArtImage:(NSSize)size {
[overlay drawInRect:NSMakeRect(playPauseOffset, playPauseOffset,
[overlay size].width, [overlay size].height)
fromRect:NSZeroRect
operation:NSCompositeSourceOver
operation:NSCompositingOperationSourceOver
fraction:1.0];
[icon unlockFocus];
}
Expand Down Expand Up @@ -804,17 +804,17 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
return NO;

NSInteger openDrawer = [PREF_KEY_VALUE(OPEN_DRAWER) integerValue];
NSCellStateValue state = NSOffState;
NSControlStateValue state = NSControlStateValueOff;
if (action == @selector(showHistoryDrawer:)) {
if (openDrawer == DRAWER_NONE_HIST)
state = NSMixedState;
state = NSControlStateValueMixed;
else if (openDrawer == DRAWER_HISTORY)
state = NSOnState;
state = NSControlStateValueOn;
} else if (action == @selector(showStationsDrawer:)) {
if (openDrawer == DRAWER_NONE_STA)
state = NSMixedState;
state = NSControlStateValueMixed;
else if (openDrawer == DRAWER_STATIONS)
state = NSOnState;
state = NSControlStateValueOn;
} else {
if (openDrawer == DRAWER_HISTORY || openDrawer == DRAWER_STATIONS)
[menuItem setTitle:@"Hide Drawer"];
Expand Down