diff --git a/README.md b/README.md index b540a02..5c56502 100644 --- a/README.md +++ b/README.md @@ -19,24 +19,29 @@ Simply place btcbar.app in your `/Applications` folder, and optionally add it to ## Download -The current version of btcbar (2.1.0) can be downloaded here: +The current version of btcbar (2.1.1) can be downloaded here: -https://github.com/nearengine/btcbar/releases/download/v2.1.0/btcbar_2_1_0.zip +https://github.com/nearengine/btcbar/releases/download/v2.1.1/btcbar_2_1_1.zip It requires OS X 10.7+ and a 64-bit processor. ## Changelog +### 2.1.1 + +* Enables live prices in menu +* Fixes a minor bug in the ticker switching code + ### 2.1.0 * New BTCe/USD ticker * Manually refreshes when a ticker is clicked -* Decreased disk io/cpu time/power usage -* Greatly increased modularity (tickers now have a protocol, menu is dynamically generated) +* Decreases disk io/cpu time/power usage +* Greatly increases modularity (tickers now have a protocol, menu is dynamically generated) ### 2.0.0 -Adds Bitstamp and Coinbase, and a little better backend abstraction so it will be easier to add future tickers. +* Adds Bitstamp and Coinbase, and a little better backend abstraction so it will be easier to add future tickers. TODO: * Live updating prices for each menu item in the dropdown @@ -44,7 +49,7 @@ TODO: ### 1.0.0 -The first release, which uses MtGox's USD ticker API. +* The first release, which uses MtGox's USD ticker API. ## Donate diff --git a/Resources/screenshot.png b/Resources/screenshot.png index e7f273a..03d3ad3 100644 Binary files a/Resources/screenshot.png and b/Resources/screenshot.png differ diff --git a/Resources/screenshot2.png b/Resources/screenshot2.png index 3ba3cbf..e753a36 100644 Binary files a/Resources/screenshot2.png and b/Resources/screenshot2.png differ diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index b0ac058..87e5e7e 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -22,7 +22,7 @@ - (void)awakeFromNib [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleTickerNotification:) - name:@"ticker_update" + name:@"btcbar_ticker_update" object:nil]; // Pass each ticker object into a dictionary, get first updates @@ -50,14 +50,14 @@ - (void)awakeFromNib for(id ticker in tickers) { NSUInteger tag = [tickers indexOfObject:ticker]; - NSMenuItem *new_menuitem = [[NSMenuItem alloc] initWithTitle:[ticker ticker_menu] action:@selector(menuActionSetTicker:) keyEquivalent:[NSString stringWithFormat:@"%lu", (unsigned long)tag+1]]; + NSMenuItem *new_menuitem = [[NSMenuItem alloc] initWithTitle:[ticker ticker_menu] action:@selector(menuActionSetTicker:) keyEquivalent:@""]; [new_menuitem setTag:tag]; [btcbarMainMenu addItem:new_menuitem]; } // Add the separator, Open in Browser, and Quit items to main menu [btcbarMainMenu addItem:[NSMenuItem separatorItem]]; - [btcbarMainMenu addItem:[[NSMenuItem alloc] initWithTitle:@"Open in Browser" action:@selector(menuActionBrowser:) keyEquivalent:@"o"]]; + [btcbarMainMenu addItem:[[NSMenuItem alloc] initWithTitle:@"Open in Browser" action:@selector(menuActionBrowser:) keyEquivalent:@""]]; [btcbarMainMenu addItem:[[NSMenuItem alloc] initWithTitle:@"Quit" action:@selector(menuActionQuit:) keyEquivalent:@"q"]]; // Set the default ticker's menu item state to checked @@ -101,8 +101,8 @@ - (void)menuActionSetTicker:(id)sender // Update the requested ticker immediately [[tickers objectAtIndex:currentFetcherTag] requestUpdate]; - //Force the status item value to update - [[NSNotificationCenter defaultCenter] postNotificationName:@"ticker_update" object:self]; + // Force the status item value to update + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:[tickers objectAtIndex:currentFetcherTag]]; } @@ -123,13 +123,17 @@ - (void)menuActionQuit:(id)sender // CALLBACKS // -// Updates the status item with the latest ticker value +// Handles Fetcher completion notifications -(void)handleTickerNotification:(NSNotification *)pNotification { + // Set the status item to the current Fetcher's ticker [btcbarStatusItem setTitle:[(id )[tickers objectAtIndex:currentFetcherTag] ticker]]; + + // Set the menu item of the notifying Fetcher to its latest ticker value + [[[btcbarMainMenu itemArray] objectAtIndex:[tickers indexOfObject:[pNotification object]]] setTitle:[NSString stringWithFormat:@"[%@] %@",[[pNotification object] ticker], [[pNotification object] ticker_menu]]]; } -// Requests for each ticker to update itself +// Requests for each Fetcher to update itself - (void)updateDataTimerAction:(NSTimer*)timer { for (id ticker in tickers) diff --git a/btcbar/BTCeUSDFetcher.m b/btcbar/BTCeUSDFetcher.m index b7730ba..4d97862 100644 --- a/btcbar/BTCeUSDFetcher.m +++ b/btcbar/BTCeUSDFetcher.m @@ -34,7 +34,7 @@ - (void)setTicker:(NSString *)tickerString _ticker = tickerString; // Trigger notification to update ticker - [[NSNotificationCenter defaultCenter] postNotificationName:@"ticker_update" object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; } // Initiates an asyncronous HTTP connection diff --git a/btcbar/BitStampUSDFetcher.m b/btcbar/BitStampUSDFetcher.m index d62f9fd..916d26c 100644 --- a/btcbar/BitStampUSDFetcher.m +++ b/btcbar/BitStampUSDFetcher.m @@ -34,7 +34,7 @@ - (void)setTicker:(NSString *)tickerString _ticker = tickerString; // Trigger notification to update ticker - [[NSNotificationCenter defaultCenter] postNotificationName:@"ticker_update" object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; } // Initiates an asyncronous HTTP connection diff --git a/btcbar/CoinbaseUSDFetcher.m b/btcbar/CoinbaseUSDFetcher.m index 57e0eba..e6487d0 100644 --- a/btcbar/CoinbaseUSDFetcher.m +++ b/btcbar/CoinbaseUSDFetcher.m @@ -34,7 +34,7 @@ - (void)setTicker:(NSString *)tickerString _ticker = tickerString; // Trigger notification to update ticker - [[NSNotificationCenter defaultCenter] postNotificationName:@"ticker_update" object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; } // Initiates an asyncronous HTTP connection diff --git a/btcbar/MtGoxUSDFetcher.m b/btcbar/MtGoxUSDFetcher.m index c738258..ecd0090 100644 --- a/btcbar/MtGoxUSDFetcher.m +++ b/btcbar/MtGoxUSDFetcher.m @@ -34,7 +34,7 @@ - (void)setTicker:(NSString *)tickerString _ticker = tickerString; // Trigger notification to update ticker - [[NSNotificationCenter defaultCenter] postNotificationName:@"ticker_update" object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; } // Initiates an asyncronous HTTP connection diff --git a/btcbar/btcbar-Info.plist b/btcbar/btcbar-Info.plist index 3188a32..ceac4f3 100644 --- a/btcbar/btcbar-Info.plist +++ b/btcbar/btcbar-Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1 + 2.1.1 CFBundleSignature ???? CFBundleVersion