aka RedditBar, Mac OS X menu bar reddit client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AppDelegate.m 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // AppDelegate.m
  3. // RedditBar
  4. //
  5. // Created by Thomas Buck on 30.11.13.
  6. // Copyright (c) 2013 xythobuz. All rights reserved.
  7. //
  8. #import "AppDelegate.h"
  9. @implementation AppDelegate
  10. @synthesize statusMenu, statusItem, statusImage, statusHighlightImage, prefWindow;
  11. - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
  12. statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength];
  13. NSBundle *bundle = [NSBundle mainBundle];
  14. statusImage = [[NSImage alloc] initWithContentsOfFile:[bundle pathForResource:@"icon" ofType:@"png"]];
  15. statusHighlightImage = [[NSImage alloc] initWithContentsOfFile:[bundle pathForResource:@"icon-alt" ofType:@"png"]];
  16. [statusItem setImage:statusImage];
  17. [statusItem setAlternateImage:statusHighlightImage];
  18. [statusItem setMenu:statusMenu];
  19. [statusItem setToolTip:@"Reddit Bar"];
  20. [statusItem setHighlightMode:YES];
  21. }
  22. -(IBAction)showPreferences:(id)sender {
  23. [NSApp activateIgnoringOtherApps:YES];
  24. prefWindow = [[PrefController alloc] initWithWindowNibName:@"Prefs"];
  25. [prefWindow setParent:self];
  26. [prefWindow showWindow:self];
  27. }
  28. -(void)prefReturnName:(NSString *)name Pass:(NSString *)pass subscriptions:(Boolean)subscriptions subreddits:(NSString *)subreddits {
  29. }
  30. @end