From 90342db143e781a6137d0c5951224d563adb9d67 Mon Sep 17 00:00:00 2001 From: Will Lee Date: Thu, 13 Feb 2014 18:14:55 +0800 Subject: [PATCH 1/8] Add Huobi.com RMB ticker. --- btcbar.xcodeproj/project.pbxproj | 6 + .../xcshareddata/btcbar.xccheckout | 41 ------ btcbar/AppDelegate.h | 1 + btcbar/AppDelegate.m | 1 + btcbar/Fetchers/HuobiRMBFetcher.h | 20 +++ btcbar/Fetchers/HuobiRMBFetcher.m | 129 ++++++++++++++++++ 6 files changed, 157 insertions(+), 41 deletions(-) delete mode 100644 btcbar.xcodeproj/project.xcworkspace/xcshareddata/btcbar.xccheckout create mode 100644 btcbar/Fetchers/HuobiRMBFetcher.h create mode 100644 btcbar/Fetchers/HuobiRMBFetcher.m diff --git a/btcbar.xcodeproj/project.pbxproj b/btcbar.xcodeproj/project.pbxproj index b4bd13d..a5556f8 100644 --- a/btcbar.xcodeproj/project.pbxproj +++ b/btcbar.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ 83C3E7561859702D00FA2921 /* btclogoAlternate.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7521859702D00FA2921 /* btclogoAlternate.png */; }; 83C3E7571859702D00FA2921 /* btclogoAlternate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */; }; 83C3E759185970C800FA2921 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E758185970C800FA2921 /* Icon.icns */; }; + 90347B7918ACB073005C42A8 /* HuobiRMBFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 90347B7818ACB073005C42A8 /* HuobiRMBFetcher.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -55,6 +56,8 @@ 83C3E7521859702D00FA2921 /* btclogoAlternate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = btclogoAlternate.png; path = Icons/btclogoAlternate.png; sourceTree = ""; }; 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "btclogoAlternate@2x.png"; path = "Icons/btclogoAlternate@2x.png"; sourceTree = ""; }; 83C3E758185970C800FA2921 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Icon.icns; path = ../Resources/Icon.icns; sourceTree = ""; }; + 90347B7718ACB073005C42A8 /* HuobiRMBFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HuobiRMBFetcher.h; path = Fetchers/HuobiRMBFetcher.h; sourceTree = ""; }; + 90347B7818ACB073005C42A8 /* HuobiRMBFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HuobiRMBFetcher.m; path = Fetchers/HuobiRMBFetcher.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -156,6 +159,8 @@ 83C3E7461859700100FA2921 /* CoinbaseUSDFetcher.m */, 83C3E7471859700100FA2921 /* MtGoxUSDFetcher.h */, 83C3E7481859700100FA2921 /* MtGoxUSDFetcher.m */, + 90347B7718ACB073005C42A8 /* HuobiRMBFetcher.h */, + 90347B7818ACB073005C42A8 /* HuobiRMBFetcher.m */, ); name = Fetchers; sourceTree = ""; @@ -241,6 +246,7 @@ 83C3E7491859700100FA2921 /* BitStampUSDFetcher.m in Sources */, 830CE09D171B6C3E00DDD525 /* main.m in Sources */, 83C3E74C1859700100FA2921 /* MtGoxUSDFetcher.m in Sources */, + 90347B7918ACB073005C42A8 /* HuobiRMBFetcher.m in Sources */, 83C3E74B1859700100FA2921 /* CoinbaseUSDFetcher.m in Sources */, 83C3E74A1859700100FA2921 /* BTCeUSDFetcher.m in Sources */, 830CE0A4171B6C3E00DDD525 /* AppDelegate.m in Sources */, diff --git a/btcbar.xcodeproj/project.xcworkspace/xcshareddata/btcbar.xccheckout b/btcbar.xcodeproj/project.xcworkspace/xcshareddata/btcbar.xccheckout deleted file mode 100644 index ac02bb6..0000000 --- a/btcbar.xcodeproj/project.xcworkspace/xcshareddata/btcbar.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - FEA3D137-DF6F-4BDA-8CB0-0CF70A3DBF94 - IDESourceControlProjectName - btcbar - IDESourceControlProjectOriginsDictionary - - 1CD60776-8AEB-488E-8B85-2F2F5E8F152E - https://github.com/nearengine/btcbar.git - - IDESourceControlProjectPath - btcbar.xcodeproj/project.xcworkspace - IDESourceControlProjectRelativeInstallPathDictionary - - 1CD60776-8AEB-488E-8B85-2F2F5E8F152E - ../.. - - IDESourceControlProjectURL - https://github.com/nearengine/btcbar.git - IDESourceControlProjectVersion - 110 - IDESourceControlProjectWCCIdentifier - 1CD60776-8AEB-488E-8B85-2F2F5E8F152E - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 1CD60776-8AEB-488E-8B85-2F2F5E8F152E - IDESourceControlWCCName - btcbar - - - - diff --git a/btcbar/AppDelegate.h b/btcbar/AppDelegate.h index d9f3051..5d58e06 100644 --- a/btcbar/AppDelegate.h +++ b/btcbar/AppDelegate.h @@ -9,6 +9,7 @@ #import "BitStampUSDFetcher.h" #import "CoinbaseUSDFetcher.h" #import "BTCeUSDFetcher.h" +#import "HuobiRMBFetcher.h" @interface AppDelegate : NSObject { NSMenu *btcbarMainMenu; diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index f412bb8..3706cdc 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -31,6 +31,7 @@ - (void)awakeFromNib [[BTCeUSDFetcher alloc] init], [[CoinbaseUSDFetcher alloc] init], [[MtGoxUSDFetcher alloc] init], + [[HuobiRMBFetcher alloc] init], nil]; diff --git a/btcbar/Fetchers/HuobiRMBFetcher.h b/btcbar/Fetchers/HuobiRMBFetcher.h new file mode 100644 index 0000000..93e9084 --- /dev/null +++ b/btcbar/Fetchers/HuobiRMBFetcher.h @@ -0,0 +1,20 @@ +// +// HuobiRMBFetcher.h +// btcbar +// +// Created by lwei on 2/13/14. +// Copyright (c) 2014 nearengine. All rights reserved. +// + +#import +#import "Fetcher.h" + +@interface HuobiRMBFetcher : NSObject + +@property (nonatomic) NSString* ticker; +@property (nonatomic) NSString* ticker_menu; +@property (nonatomic) NSString* url; +@property (nonatomic) NSError* error; +@property (nonatomic) NSMutableData *responseData; + +@end diff --git a/btcbar/Fetchers/HuobiRMBFetcher.m b/btcbar/Fetchers/HuobiRMBFetcher.m new file mode 100644 index 0000000..8d70637 --- /dev/null +++ b/btcbar/Fetchers/HuobiRMBFetcher.m @@ -0,0 +1,129 @@ +// +// HuobiRMBFetcher.m +// btcbar +// +// Created by lwei on 2/13/14. +// Copyright (c) 2014 nearengine. All rights reserved. +// + +#import "HuobiRMBFetcher.h" + +@implementation HuobiRMBFetcher + +- (id)init +{ + if (self = [super init]) + { + // Menu Item Name + self.ticker_menu = @"HuobiRMB"; + + // Website location + self.url = @"http://www.huobi.com"; + + // Immediately request first update + [self requestUpdate]; + } + + return self; +} + +// Override Ticker setter to trigger status item update +- (void)setTicker:(NSString *)tickerString +{ + // Update the ticker value + _ticker = tickerString; + + // Trigger notification to update ticker + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; +} + +// Initiates an asyncronous HTTP connection +- (void)requestUpdate +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://market.huobi.com/staticmarket/detail.html"]]; + + // Set the request's user agent + [request addValue:@"btcbar/2.0 (HuobiRMBFetcher)" forHTTPHeaderField:@"User-Agent"]; + + // Initialize a connection from our request + NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; + + // Go go go + [connection start]; +} + +// Initializes data storage on request response +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response +{ + self.responseData = [[NSMutableData alloc] init]; +} + +// Appends response data +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +{ + [self.responseData appendData:data]; +} + +// Indiciate no caching +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse +{ + return nil; +} + +// Parse data after load +- (void)connectionDidFinishLoading:(NSURLConnection *)connection +{ + NSString *responseStr = [[NSString alloc] initWithData:self.responseData encoding:NSUTF8StringEncoding]; + if (!responseStr) { + return; + } + + NSRange range = [responseStr rangeOfString:@"(?<=\\().*(?=\\))" options:NSRegularExpressionSearch]; + if (range.location > responseStr.length || range.location + range.length > responseStr.length) { + return; + } + + NSString *resultsStr = [responseStr substringWithRange:range]; + + if (!resultsStr) { + return; + } + + // Parse the JSON into results + NSError *jsonParsingError = nil; + id results = [NSJSONSerialization JSONObjectWithData:[resultsStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:&jsonParsingError]; + + // Results parsed successfully from JSON + if (results) + { + NSNumber *ticker = [results objectForKey:@"p_new"]; + if (ticker) { + NSNumberFormatter *currencyStyle = [[NSNumberFormatter alloc] init]; + currencyStyle.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"]; + currencyStyle.numberStyle = NSNumberFormatterCurrencyStyle; + self.error = nil; + self.ticker = [currencyStyle stringFromNumber:ticker]; + } + // Otherwise log an error... + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"API Error", NSLocalizedDescriptionKey, @"The JSON received did not contain a result or the API returned an error.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } + } + // JSON parsing failed + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"JSON Error", NSLocalizedDescriptionKey, @"Could not parse the JSON returned.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } +} + +// HTTP request failed +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error +{ + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"Connection Error", NSLocalizedDescriptionKey, @"Could not connect to Huobi.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; +} + +@end From 9c8fb0c2e7e5662aa90c98c7de55d6367090c9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 22 Jan 2015 14:18:32 +0100 Subject: [PATCH 2/8] Added Bitfinex API --- btcbar.xcodeproj/project.pbxproj | 6 ++ btcbar/AppDelegate.h | 1 + btcbar/AppDelegate.m | 1 + btcbar/Fetchers/BitFinexUSDFetcher.h | 22 +++++ btcbar/Fetchers/BitFinexUSDFetcher.m | 121 +++++++++++++++++++++++++++ 5 files changed, 151 insertions(+) create mode 100644 btcbar/Fetchers/BitFinexUSDFetcher.h create mode 100644 btcbar/Fetchers/BitFinexUSDFetcher.m diff --git a/btcbar.xcodeproj/project.pbxproj b/btcbar.xcodeproj/project.pbxproj index cd8fb22..4949fa6 100644 --- a/btcbar.xcodeproj/project.pbxproj +++ b/btcbar.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 83C3E7561859702D00FA2921 /* btclogoAlternate.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7521859702D00FA2921 /* btclogoAlternate.png */; }; 83C3E7571859702D00FA2921 /* btclogoAlternate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */; }; 83C3E759185970C800FA2921 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E758185970C800FA2921 /* Icon.icns */; }; + B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -52,6 +53,8 @@ 83C3E7521859702D00FA2921 /* btclogoAlternate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = btclogoAlternate.png; path = Icons/btclogoAlternate.png; sourceTree = ""; }; 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "btclogoAlternate@2x.png"; path = "Icons/btclogoAlternate@2x.png"; sourceTree = ""; }; 83C3E758185970C800FA2921 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Icon.icns; path = ../Resources/Icon.icns; sourceTree = ""; }; + B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitFinexUSDFetcher.h; path = Fetchers/BitFinexUSDFetcher.h; sourceTree = ""; }; + B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BitFinexUSDFetcher.m; path = Fetchers/BitFinexUSDFetcher.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -147,6 +150,8 @@ children = ( 83C3E7411859700100FA2921 /* BitStampUSDFetcher.h */, 83C3E7421859700100FA2921 /* BitStampUSDFetcher.m */, + B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */, + B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */, 83C3E7431859700100FA2921 /* BTCeUSDFetcher.h */, 83C3E7441859700100FA2921 /* BTCeUSDFetcher.m */, 83C3E7451859700100FA2921 /* CoinbaseUSDFetcher.h */, @@ -234,6 +239,7 @@ buildActionMask = 2147483647; files = ( 83C3E7491859700100FA2921 /* BitStampUSDFetcher.m in Sources */, + B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */, 830CE09D171B6C3E00DDD525 /* main.m in Sources */, 83C3E74B1859700100FA2921 /* CoinbaseUSDFetcher.m in Sources */, 83C3E74A1859700100FA2921 /* BTCeUSDFetcher.m in Sources */, diff --git a/btcbar/AppDelegate.h b/btcbar/AppDelegate.h index 880053b..c16beae 100644 --- a/btcbar/AppDelegate.h +++ b/btcbar/AppDelegate.h @@ -8,6 +8,7 @@ #import "BitStampUSDFetcher.h" #import "CoinbaseUSDFetcher.h" #import "BTCeUSDFetcher.h" +#import "BitFinexUSDFetcher.h" @interface AppDelegate : NSObject { NSMenu *btcbarMainMenu; diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index 869ec17..5cdf4a4 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -30,6 +30,7 @@ - (void)awakeFromNib [[BitStampUSDFetcher alloc] init], [[BTCeUSDFetcher alloc] init], [[CoinbaseUSDFetcher alloc] init], + [[BitFinexUSDFetcher alloc] init], nil]; diff --git a/btcbar/Fetchers/BitFinexUSDFetcher.h b/btcbar/Fetchers/BitFinexUSDFetcher.h new file mode 100644 index 0000000..192b7c6 --- /dev/null +++ b/btcbar/Fetchers/BitFinexUSDFetcher.h @@ -0,0 +1,22 @@ +// +// BitFinexUSDFetcher.h +// btcbar +// +// Created by Tim Daubenschütz on 22/01/15. +// Copyright (c) 2015 nearengine. All rights reserved. +// + +#import +#import "Fetcher.h" + +@interface BitFinexUSDFetcher : NSObject + +@property (nonatomic) NSString* ticker; +@property (nonatomic) NSString* ticker_menu; +@property (nonatomic) NSString* url; +@property (nonatomic) NSError* error; +@property (nonatomic) NSMutableData *responseData; + +- (void)requestUpdate; + +@end diff --git a/btcbar/Fetchers/BitFinexUSDFetcher.m b/btcbar/Fetchers/BitFinexUSDFetcher.m new file mode 100644 index 0000000..a135db4 --- /dev/null +++ b/btcbar/Fetchers/BitFinexUSDFetcher.m @@ -0,0 +1,121 @@ +// +// BitFinexUSDFetcher.m +// btcbar +// +// Created by Tim Daubenschütz on 22/01/15. +// Copyright (c) 2015 nearengine. All rights reserved. +// + +#import "BitFinexUSDFetcher.h" + +@implementation BitFinexUSDFetcher + +- (id)init +{ + if (self = [super init]) + { + // Menu Item Name + self.ticker_menu = @"BitFinexUSD"; + + // Website location + self.url = @"https://www.bitfinex.com/"; + + // Immediately request first update + [self requestUpdate]; + } + + return self; +} + +// Override Ticker setter to trigger status item update +- (void)setTicker:(NSString *)tickerString +{ + // Update the ticker value + _ticker = tickerString; + + // Trigger notification to update ticker + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; +} + +// Initiates an asyncronous HTTP connection +- (void)requestUpdate +{ + // More information on the API + // can be found here: https://www.bitfinex.com/pages/api + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.bitfinex.com/v1/pubticker/BTCUSD/"]]; + + // Set the request's user agent + [request addValue:@"btcbar/2.0 (BitFinexUSDFetcher)" forHTTPHeaderField:@"User-Agent"]; + + // Initialize a connection from our request + NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; + + // Go go go + [connection start]; +} + +// Initializes data storage on request response +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response +{ + self.responseData = [[NSMutableData alloc] init]; +} + +// Appends response data +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +{ + [self.responseData appendData:data]; +} + +// Indiciate no caching +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse +{ + return nil; +} + +// Parse data after load +- (void)connectionDidFinishLoading:(NSURLConnection *)connection +{ + // Parse the JSON into results + NSError *jsonParsingError = nil; + NSDictionary *results = [[NSDictionary alloc] init]; + results = [NSJSONSerialization JSONObjectWithData:self.responseData options:0 error:&jsonParsingError]; + + // Results parsed successfully from JSON + if(results) + { + // Get API status + NSString *resultsStatus = [results objectForKey:@"last_price"]; + + // If API call succeeded update the ticker... + if(resultsStatus) + { + NSNumberFormatter *currencyStyle = [[NSNumberFormatter alloc] init]; + currencyStyle.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + currencyStyle.numberStyle = NSNumberFormatterCurrencyStyle; + resultsStatus = [currencyStyle stringFromNumber:[NSDecimalNumber decimalNumberWithString:resultsStatus]]; + self.ticker = resultsStatus; + } + // Otherwise log an error... + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"API Error", NSLocalizedDescriptionKey, @"The JSON received did not contain a result or the API returned an error.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } + } + // JSON parsing failed + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"JSON Error", NSLocalizedDescriptionKey, @"Could not parse the JSON returned.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } +} + +// HTTP request failed +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error +{ + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"Connection Error", NSLocalizedDescriptionKey, @"Could not connect to BitFinex.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; +} + + +@end From aef5b43fdbe33d9d82b52b9e26c3a54574340b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 22 Jan 2015 17:44:50 +0100 Subject: [PATCH 3/8] Winked added --- btcbar.xcodeproj/project.pbxproj | 6 ++ btcbar/AppDelegate.h | 1 + btcbar/AppDelegate.m | 1 + btcbar/Fetchers/WinkDexUSDFetcher.h | 22 +++++ btcbar/Fetchers/WinkDexUSDFetcher.m | 125 ++++++++++++++++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 btcbar/Fetchers/WinkDexUSDFetcher.h create mode 100644 btcbar/Fetchers/WinkDexUSDFetcher.m diff --git a/btcbar.xcodeproj/project.pbxproj b/btcbar.xcodeproj/project.pbxproj index 4949fa6..eb2dbb1 100644 --- a/btcbar.xcodeproj/project.pbxproj +++ b/btcbar.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ 83C3E7571859702D00FA2921 /* btclogoAlternate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */; }; 83C3E759185970C800FA2921 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E758185970C800FA2921 /* Icon.icns */; }; B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */; }; + B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -55,6 +56,8 @@ 83C3E758185970C800FA2921 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Icon.icns; path = ../Resources/Icon.icns; sourceTree = ""; }; B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitFinexUSDFetcher.h; path = Fetchers/BitFinexUSDFetcher.h; sourceTree = ""; }; B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BitFinexUSDFetcher.m; path = Fetchers/BitFinexUSDFetcher.m; sourceTree = ""; }; + B662833C1A715EFB00520512 /* WinkDexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WinkDexUSDFetcher.h; path = Fetchers/WinkDexUSDFetcher.h; sourceTree = ""; }; + B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WinkDexUSDFetcher.m; path = Fetchers/WinkDexUSDFetcher.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -150,6 +153,8 @@ children = ( 83C3E7411859700100FA2921 /* BitStampUSDFetcher.h */, 83C3E7421859700100FA2921 /* BitStampUSDFetcher.m */, + B662833C1A715EFB00520512 /* WinkDexUSDFetcher.h */, + B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */, B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */, B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */, 83C3E7431859700100FA2921 /* BTCeUSDFetcher.h */, @@ -241,6 +246,7 @@ 83C3E7491859700100FA2921 /* BitStampUSDFetcher.m in Sources */, B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */, 830CE09D171B6C3E00DDD525 /* main.m in Sources */, + B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */, 83C3E74B1859700100FA2921 /* CoinbaseUSDFetcher.m in Sources */, 83C3E74A1859700100FA2921 /* BTCeUSDFetcher.m in Sources */, 830CE0A4171B6C3E00DDD525 /* AppDelegate.m in Sources */, diff --git a/btcbar/AppDelegate.h b/btcbar/AppDelegate.h index c16beae..6f9773f 100644 --- a/btcbar/AppDelegate.h +++ b/btcbar/AppDelegate.h @@ -9,6 +9,7 @@ #import "CoinbaseUSDFetcher.h" #import "BTCeUSDFetcher.h" #import "BitFinexUSDFetcher.h" +#import "WinkDexUSDFetcher.h" @interface AppDelegate : NSObject { NSMenu *btcbarMainMenu; diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index 5cdf4a4..8f09fc8 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -31,6 +31,7 @@ - (void)awakeFromNib [[BTCeUSDFetcher alloc] init], [[CoinbaseUSDFetcher alloc] init], [[BitFinexUSDFetcher alloc] init], + [[WinkDexUSDFetcher alloc] init], nil]; diff --git a/btcbar/Fetchers/WinkDexUSDFetcher.h b/btcbar/Fetchers/WinkDexUSDFetcher.h new file mode 100644 index 0000000..182ed1f --- /dev/null +++ b/btcbar/Fetchers/WinkDexUSDFetcher.h @@ -0,0 +1,22 @@ +// +// WinkDexUSDFetcher.h +// btcbar +// +// Created by Tim Daubenschütz on 22/01/15. +// Copyright (c) 2015 nearengine. All rights reserved. +// + +#import +#import "Fetcher.h" + +@interface WinkDexUSDFetcher : NSObject + +@property (nonatomic) NSString* ticker; +@property (nonatomic) NSString* ticker_menu; +@property (nonatomic) NSString* url; +@property (nonatomic) NSError* error; +@property (nonatomic) NSMutableData *responseData; + +- (void)requestUpdate; + +@end diff --git a/btcbar/Fetchers/WinkDexUSDFetcher.m b/btcbar/Fetchers/WinkDexUSDFetcher.m new file mode 100644 index 0000000..d45198a --- /dev/null +++ b/btcbar/Fetchers/WinkDexUSDFetcher.m @@ -0,0 +1,125 @@ +// +// WinkDexUSDFetcher.m +// btcbar +// +// Created by Tim Daubenschütz on 22/01/15. +// Copyright (c) 2015 nearengine. All rights reserved. +// + +#import "WinkDexUSDFetcher.h" + +@implementation WinkDexUSDFetcher + +- (id)init +{ + if (self = [super init]) + { + // Menu Item Name + self.ticker_menu = @"WinkDexUSD"; + + // Website location + self.url = @"https://winkdex.com/"; + + // Immediately request first update + [self requestUpdate]; + } + + return self; +} + +// Override Ticker setter to trigger status item update +- (void)setTicker:(NSString *)tickerString +{ + // Update the ticker value + _ticker = tickerString; + + // Trigger notification to update ticker + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; +} + +// Initiates an asyncronous HTTP connection +- (void)requestUpdate +{ + // Documentation for this API + // can be found here: http://docs.winkdex.com/#get-request + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://winkdex.com/api/v0/price"]]; + + // Set the request's user agent + [request addValue:@"btcbar/2.0 (WinkDexUSDFetcher)" forHTTPHeaderField:@"User-Agent"]; + + // Initialize a connection from our request + NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; + + // Go go go + [connection start]; +} + +// Initializes data storage on request response +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response +{ + self.responseData = [[NSMutableData alloc] init]; +} + +// Appends response data +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +{ + [self.responseData appendData:data]; +} + +// Indiciate no caching +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse +{ + return nil; +} + +// Parse data after load +- (void)connectionDidFinishLoading:(NSURLConnection *)connection +{ + // Parse the JSON into results + NSError *jsonParsingError = nil; + NSDictionary *results = [[NSDictionary alloc] init]; + results = [NSJSONSerialization JSONObjectWithData:self.responseData options:0 error:&jsonParsingError]; + + // Results parsed successfully from JSON + if(results) + { + // Get API status + NSString *resultsStatus = [results objectForKey:@"price"]; + + // If API call succeeded update the ticker... + if(resultsStatus) + { + NSNumberFormatter *currencyStyle = [[NSNumberFormatter alloc] init]; + currencyStyle.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + currencyStyle.numberStyle = NSNumberFormatterCurrencyStyle; + + // We first need to convert the price form pennys to dollars + // then we can asign it to the view. + NSDecimalNumber *price = [[NSDecimalNumber alloc] initWithDouble:[resultsStatus doubleValue]/100]; + resultsStatus = [currencyStyle stringFromNumber:price]; + self.ticker = resultsStatus; + } + // Otherwise log an error... + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"API Error", NSLocalizedDescriptionKey, @"The JSON received did not contain a result or the API returned an error.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } + } + // JSON parsing failed + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"JSON Error", NSLocalizedDescriptionKey, @"Could not parse the JSON returned.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } +} + +// HTTP request failed +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error +{ + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"Connection Error", NSLocalizedDescriptionKey, @"Could not connect to WinkDex.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; +} + + +@end From 61cf112f2000c68ff3e5ba48b83e0bd2b3750a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 22 Jan 2015 22:43:07 +0100 Subject: [PATCH 4/8] Adding OKCoinCNY. Unfortunately I couldn't find the local identifier for CNY, so I just inserted it manually... --- btcbar.xcodeproj/project.pbxproj | 6 ++ btcbar/AppDelegate.h | 1 + btcbar/AppDelegate.m | 1 + btcbar/Fetchers/OKCoinCNYFetcher.h | 22 ++++++ btcbar/Fetchers/OKCoinCNYFetcher.m | 121 +++++++++++++++++++++++++++++ 5 files changed, 151 insertions(+) create mode 100644 btcbar/Fetchers/OKCoinCNYFetcher.h create mode 100644 btcbar/Fetchers/OKCoinCNYFetcher.m diff --git a/btcbar.xcodeproj/project.pbxproj b/btcbar.xcodeproj/project.pbxproj index eb2dbb1..b82a3c9 100644 --- a/btcbar.xcodeproj/project.pbxproj +++ b/btcbar.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 83C3E7561859702D00FA2921 /* btclogoAlternate.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7521859702D00FA2921 /* btclogoAlternate.png */; }; 83C3E7571859702D00FA2921 /* btclogoAlternate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */; }; 83C3E759185970C800FA2921 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E758185970C800FA2921 /* Icon.icns */; }; + B65127471A71A1BB00FB6A24 /* OKCoinCNYFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B65127461A71A1BB00FB6A24 /* OKCoinCNYFetcher.m */; }; B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */; }; B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */; }; /* End PBXBuildFile section */ @@ -54,6 +55,8 @@ 83C3E7521859702D00FA2921 /* btclogoAlternate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = btclogoAlternate.png; path = Icons/btclogoAlternate.png; sourceTree = ""; }; 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "btclogoAlternate@2x.png"; path = "Icons/btclogoAlternate@2x.png"; sourceTree = ""; }; 83C3E758185970C800FA2921 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Icon.icns; path = ../Resources/Icon.icns; sourceTree = ""; }; + B65127451A71A1BB00FB6A24 /* OKCoinCNYFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OKCoinCNYFetcher.h; path = Fetchers/OKCoinCNYFetcher.h; sourceTree = ""; }; + B65127461A71A1BB00FB6A24 /* OKCoinCNYFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OKCoinCNYFetcher.m; path = Fetchers/OKCoinCNYFetcher.m; sourceTree = ""; }; B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitFinexUSDFetcher.h; path = Fetchers/BitFinexUSDFetcher.h; sourceTree = ""; }; B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BitFinexUSDFetcher.m; path = Fetchers/BitFinexUSDFetcher.m; sourceTree = ""; }; B662833C1A715EFB00520512 /* WinkDexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WinkDexUSDFetcher.h; path = Fetchers/WinkDexUSDFetcher.h; sourceTree = ""; }; @@ -153,6 +156,8 @@ children = ( 83C3E7411859700100FA2921 /* BitStampUSDFetcher.h */, 83C3E7421859700100FA2921 /* BitStampUSDFetcher.m */, + B65127451A71A1BB00FB6A24 /* OKCoinCNYFetcher.h */, + B65127461A71A1BB00FB6A24 /* OKCoinCNYFetcher.m */, B662833C1A715EFB00520512 /* WinkDexUSDFetcher.h */, B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */, B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */, @@ -246,6 +251,7 @@ 83C3E7491859700100FA2921 /* BitStampUSDFetcher.m in Sources */, B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */, 830CE09D171B6C3E00DDD525 /* main.m in Sources */, + B65127471A71A1BB00FB6A24 /* OKCoinCNYFetcher.m in Sources */, B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */, 83C3E74B1859700100FA2921 /* CoinbaseUSDFetcher.m in Sources */, 83C3E74A1859700100FA2921 /* BTCeUSDFetcher.m in Sources */, diff --git a/btcbar/AppDelegate.h b/btcbar/AppDelegate.h index 6f9773f..55b8a30 100644 --- a/btcbar/AppDelegate.h +++ b/btcbar/AppDelegate.h @@ -10,6 +10,7 @@ #import "BTCeUSDFetcher.h" #import "BitFinexUSDFetcher.h" #import "WinkDexUSDFetcher.h" +#import "OKCoinCNYFetcher.h" @interface AppDelegate : NSObject { NSMenu *btcbarMainMenu; diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index 8f09fc8..c924c27 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -32,6 +32,7 @@ - (void)awakeFromNib [[CoinbaseUSDFetcher alloc] init], [[BitFinexUSDFetcher alloc] init], [[WinkDexUSDFetcher alloc] init], + [[OKCoinCYNFetcher alloc] init], nil]; diff --git a/btcbar/Fetchers/OKCoinCNYFetcher.h b/btcbar/Fetchers/OKCoinCNYFetcher.h new file mode 100644 index 0000000..dabc41e --- /dev/null +++ b/btcbar/Fetchers/OKCoinCNYFetcher.h @@ -0,0 +1,22 @@ +// +// OKCoinCYNFetcher.h +// btcbar +// +// Created by Tim Daubenschütz on 22/01/15. +// Copyright (c) 2015 nearengine. All rights reserved. +// + +#import +#import "Fetcher.h" + +@interface OKCoinCYNFetcher : NSObject + +@property (nonatomic) NSString* ticker; +@property (nonatomic) NSString* ticker_menu; +@property (nonatomic) NSString* url; +@property (nonatomic) NSError* error; +@property (nonatomic) NSMutableData *responseData; + +- (void)requestUpdate; + +@end diff --git a/btcbar/Fetchers/OKCoinCNYFetcher.m b/btcbar/Fetchers/OKCoinCNYFetcher.m new file mode 100644 index 0000000..78e543c --- /dev/null +++ b/btcbar/Fetchers/OKCoinCNYFetcher.m @@ -0,0 +1,121 @@ +// +// OKCoinCYNFetcher.m +// btcbar +// +// Created by Tim Daubenschütz on 22/01/15. +// Copyright (c) 2015 nearengine. All rights reserved. +// + +#import "OKCoinCNYFetcher.h" + +@implementation OKCoinCYNFetcher + +- (id)init +{ + if (self = [super init]) + { + // Menu Item Name + self.ticker_menu = @"OKCoinCNY"; + + // Website location + self.url = @"https://www.okcoin.cn/"; + + // Immediately request first update + [self requestUpdate]; + } + + return self; +} + +// Override Ticker setter to trigger status item update +- (void)setTicker:(NSString *)tickerString +{ + // Update the ticker value + _ticker = tickerString; + + // Trigger notification to update ticker + [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; +} + +// Initiates an asyncronous HTTP connection +- (void)requestUpdate +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://www.okcoin.cn/api/v1/ticker.do?symbol=btc_cny"]]; + + // Set the request's user agent + [request addValue:@"btcbar/2.0 (OKCoinCNYFetcher)" forHTTPHeaderField:@"User-Agent"]; + + // Initialize a connection from our request + NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; + + // Go go go + [connection start]; +} + +// Initializes data storage on request response +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response +{ + self.responseData = [[NSMutableData alloc] init]; +} + +// Appends response data +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +{ + [self.responseData appendData:data]; +} + +// Indiciate no caching +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse +{ + return nil; +} + +// Parse data after load +- (void)connectionDidFinishLoading:(NSURLConnection *)connection +{ + // Parse the JSON into results + NSError *jsonParsingError = nil; + NSDictionary *results = [[NSDictionary alloc] init]; + results = [NSJSONSerialization JSONObjectWithData:self.responseData options:0 error:&jsonParsingError]; + + // Results parsed successfully from JSON + if(results) + { + // Get API status + NSDictionary *ticker = [results objectForKey:@"ticker"]; + NSString *resultsStatus = [ticker objectForKey:@"last"]; + + + // If API call succeeded update the ticker... + if(resultsStatus) + { + NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; + resultsStatus = [numberFormatter stringFromNumber:[NSDecimalNumber decimalNumberWithString:resultsStatus]]; + resultsStatus = [NSString stringWithFormat:@"¥ %@", resultsStatus]; + + self.ticker = resultsStatus; + } + // Otherwise log an error... + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"API Error", NSLocalizedDescriptionKey, @"The JSON received did not contain a result or the API returned an error.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } + } + // JSON parsing failed + else + { + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"JSON Error", NSLocalizedDescriptionKey, @"Could not parse the JSON returned.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; + } +} + +// HTTP request failed +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error +{ + self.error = [NSError errorWithDomain:@"com.nearengine.btcbar" code:0 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"Connection Error", NSLocalizedDescriptionKey, @"Could not connect to OKCoin.", NSLocalizedFailureReasonErrorKey, nil]]; + self.ticker = nil; +} + + +@end From c516a9a51697e5ff4dc8e6342dd298c44c094ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 22 Jan 2015 22:44:22 +0100 Subject: [PATCH 5/8] fixed space --- btcbar/Fetchers/OKCoinCNYFetcher.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btcbar/Fetchers/OKCoinCNYFetcher.m b/btcbar/Fetchers/OKCoinCNYFetcher.m index 78e543c..ae666f4 100644 --- a/btcbar/Fetchers/OKCoinCNYFetcher.m +++ b/btcbar/Fetchers/OKCoinCNYFetcher.m @@ -91,7 +91,7 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; resultsStatus = [numberFormatter stringFromNumber:[NSDecimalNumber decimalNumberWithString:resultsStatus]]; - resultsStatus = [NSString stringWithFormat:@"¥ %@", resultsStatus]; + resultsStatus = [NSString stringWithFormat:@"¥%@", resultsStatus]; self.ticker = resultsStatus; } From ce83792b27b5ea60ce3ada897eb923256f25e384 Mon Sep 17 00:00:00 2001 From: Chris Shiplet Date: Fri, 17 Apr 2015 23:40:09 -0700 Subject: [PATCH 6/8] Standardize naming convention and ticker formatting --- btcbar.xcodeproj/project.pbxproj | 12 +++--- btcbar/AppDelegate.h | 2 +- btcbar/AppDelegate.m | 2 +- .../{HuobiRMBFetcher.h => HuobiCNYFetcher.h} | 4 +- .../{HuobiRMBFetcher.m => HuobiCNYFetcher.m} | 43 ++++++++++--------- 5 files changed, 32 insertions(+), 31 deletions(-) rename btcbar/Fetchers/{HuobiRMBFetcher.h => HuobiCNYFetcher.h} (81%) rename btcbar/Fetchers/{HuobiRMBFetcher.m => HuobiCNYFetcher.m} (87%) diff --git a/btcbar.xcodeproj/project.pbxproj b/btcbar.xcodeproj/project.pbxproj index 26f6a27..da34147 100644 --- a/btcbar.xcodeproj/project.pbxproj +++ b/btcbar.xcodeproj/project.pbxproj @@ -25,7 +25,7 @@ B65127471A71A1BB00FB6A24 /* OKCoinCNYFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B65127461A71A1BB00FB6A24 /* OKCoinCNYFetcher.m */; }; B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */; }; B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */; }; - 90347B7918ACB073005C42A8 /* HuobiRMBFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 90347B7818ACB073005C42A8 /* HuobiRMBFetcher.m */; }; + 90347B7918ACB073005C42A8 /* HuobiCNYFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -62,8 +62,8 @@ B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BitFinexUSDFetcher.m; path = Fetchers/BitFinexUSDFetcher.m; sourceTree = ""; }; B662833C1A715EFB00520512 /* WinkDexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WinkDexUSDFetcher.h; path = Fetchers/WinkDexUSDFetcher.h; sourceTree = ""; }; B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WinkDexUSDFetcher.m; path = Fetchers/WinkDexUSDFetcher.m; sourceTree = ""; }; - 90347B7718ACB073005C42A8 /* HuobiRMBFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HuobiRMBFetcher.h; path = Fetchers/HuobiRMBFetcher.h; sourceTree = ""; }; - 90347B7818ACB073005C42A8 /* HuobiRMBFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HuobiRMBFetcher.m; path = Fetchers/HuobiRMBFetcher.m; sourceTree = ""; }; + 90347B7718ACB073005C42A8 /* HuobiCNYFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HuobiCNYFetcher.h; path = Fetchers/HuobiCNYFetcher.h; sourceTree = ""; }; + 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HuobiCNYFetcher.m; path = Fetchers/HuobiCNYFetcher.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -169,8 +169,8 @@ 83C3E7441859700100FA2921 /* BTCeUSDFetcher.m */, 83C3E7451859700100FA2921 /* CoinbaseUSDFetcher.h */, 83C3E7461859700100FA2921 /* CoinbaseUSDFetcher.m */, - 90347B7718ACB073005C42A8 /* HuobiRMBFetcher.h */, - 90347B7818ACB073005C42A8 /* HuobiRMBFetcher.m */, + 90347B7718ACB073005C42A8 /* HuobiCNYFetcher.h */, + 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */, ); name = Fetchers; sourceTree = ""; @@ -258,7 +258,7 @@ 830CE09D171B6C3E00DDD525 /* main.m in Sources */, B65127471A71A1BB00FB6A24 /* OKCoinCNYFetcher.m in Sources */, B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */, - 90347B7918ACB073005C42A8 /* HuobiRMBFetcher.m in Sources */, + 90347B7918ACB073005C42A8 /* HuobiCNYFetcher.m in Sources */, 83C3E74B1859700100FA2921 /* CoinbaseUSDFetcher.m in Sources */, 83C3E74A1859700100FA2921 /* BTCeUSDFetcher.m in Sources */, 830CE0A4171B6C3E00DDD525 /* AppDelegate.m in Sources */, diff --git a/btcbar/AppDelegate.h b/btcbar/AppDelegate.h index ecd338c..593e414 100644 --- a/btcbar/AppDelegate.h +++ b/btcbar/AppDelegate.h @@ -11,7 +11,7 @@ #import "BitFinexUSDFetcher.h" #import "WinkDexUSDFetcher.h" #import "OKCoinCNYFetcher.h" -#import "HuobiRMBFetcher.h" +#import "HuobiCNYFetcher.h" @interface AppDelegate : NSObject { NSMenu *btcbarMainMenu; diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index fb9ddee..5dbc25f 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -33,7 +33,7 @@ - (void)awakeFromNib [[BitFinexUSDFetcher alloc] init], [[WinkDexUSDFetcher alloc] init], [[OKCoinCYNFetcher alloc] init], - [[HuobiRMBFetcher alloc] init], + [[HuobiCNYFetcher alloc] init], nil]; // If ticker preference does not exist, default to 0 diff --git a/btcbar/Fetchers/HuobiRMBFetcher.h b/btcbar/Fetchers/HuobiCNYFetcher.h similarity index 81% rename from btcbar/Fetchers/HuobiRMBFetcher.h rename to btcbar/Fetchers/HuobiCNYFetcher.h index 93e9084..151a073 100644 --- a/btcbar/Fetchers/HuobiRMBFetcher.h +++ b/btcbar/Fetchers/HuobiCNYFetcher.h @@ -1,5 +1,5 @@ // -// HuobiRMBFetcher.h +// HuobiCNYFetcher.h // btcbar // // Created by lwei on 2/13/14. @@ -9,7 +9,7 @@ #import #import "Fetcher.h" -@interface HuobiRMBFetcher : NSObject +@interface HuobiCNYFetcher : NSObject @property (nonatomic) NSString* ticker; @property (nonatomic) NSString* ticker_menu; diff --git a/btcbar/Fetchers/HuobiRMBFetcher.m b/btcbar/Fetchers/HuobiCNYFetcher.m similarity index 87% rename from btcbar/Fetchers/HuobiRMBFetcher.m rename to btcbar/Fetchers/HuobiCNYFetcher.m index 8d70637..58d1a53 100644 --- a/btcbar/Fetchers/HuobiRMBFetcher.m +++ b/btcbar/Fetchers/HuobiCNYFetcher.m @@ -1,29 +1,29 @@ // -// HuobiRMBFetcher.m +// HuobiCNYFetcher.m // btcbar // // Created by lwei on 2/13/14. // Copyright (c) 2014 nearengine. All rights reserved. // -#import "HuobiRMBFetcher.h" +#import "HuobiCNYFetcher.h" -@implementation HuobiRMBFetcher +@implementation HuobiCNYFetcher - (id)init { if (self = [super init]) { // Menu Item Name - self.ticker_menu = @"HuobiRMB"; - + self.ticker_menu = @"HuobiCNY"; + // Website location self.url = @"http://www.huobi.com"; - + // Immediately request first update [self requestUpdate]; } - + return self; } @@ -32,7 +32,7 @@ - (void)setTicker:(NSString *)tickerString { // Update the ticker value _ticker = tickerString; - + // Trigger notification to update ticker [[NSNotificationCenter defaultCenter] postNotificationName:@"btcbar_ticker_update" object:self]; } @@ -41,13 +41,13 @@ - (void)setTicker:(NSString *)tickerString - (void)requestUpdate { NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://market.huobi.com/staticmarket/detail.html"]]; - + // Set the request's user agent - [request addValue:@"btcbar/2.0 (HuobiRMBFetcher)" forHTTPHeaderField:@"User-Agent"]; - + [request addValue:@"btcbar/2.0 (HuobiCNYFetcher)" forHTTPHeaderField:@"User-Agent"]; + // Initialize a connection from our request NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; - + // Go go go [connection start]; } @@ -77,32 +77,33 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection if (!responseStr) { return; } - + NSRange range = [responseStr rangeOfString:@"(?<=\\().*(?=\\))" options:NSRegularExpressionSearch]; if (range.location > responseStr.length || range.location + range.length > responseStr.length) { return; } - + NSString *resultsStr = [responseStr substringWithRange:range]; - + if (!resultsStr) { return; } - + // Parse the JSON into results NSError *jsonParsingError = nil; id results = [NSJSONSerialization JSONObjectWithData:[resultsStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:&jsonParsingError]; - + // Results parsed successfully from JSON if (results) { NSNumber *ticker = [results objectForKey:@"p_new"]; if (ticker) { - NSNumberFormatter *currencyStyle = [[NSNumberFormatter alloc] init]; - currencyStyle.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"]; - currencyStyle.numberStyle = NSNumberFormatterCurrencyStyle; + NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; + NSString *resultsStatus = [numberFormatter stringFromNumber:ticker]; + resultsStatus = [NSString stringWithFormat:@"¥%@", resultsStatus]; + self.error = nil; - self.ticker = [currencyStyle stringFromNumber:ticker]; + self.ticker = resultsStatus; } // Otherwise log an error... else From 6027a70e4097bab2b41bdf9464baf2397077f532 Mon Sep 17 00:00:00 2001 From: Chris Shiplet Date: Fri, 17 Apr 2015 23:43:14 -0700 Subject: [PATCH 7/8] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e4af6e9..472b4de 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ btcbar ====== -A tiny status bar widget for OS X that displays the latest USD/BTC spot price from BitStamp, BTCe, and Coinbase. +A tiny status bar widget for OS X that displays the latest USD/BTC spot price from several USD and CNY exchanges. ## Screenshot @@ -19,14 +19,18 @@ Simply place btcbar.app in your `/Applications` folder, and optionally add it to ## Download -The current version of btcbar (2.1.4) can be downloaded here: +The current version of btcbar (2.2.0) can be downloaded here: -https://github.com/nearengine/btcbar/releases/download/v2.1.4/btcbar_2_1_4.zip +https://github.com/nearengine/btcbar/releases/download/v2.2.0/btcbar_2_2_0.zip It requires OS X 10.7+ and a 64-bit processor. ## Changelog +### 2.2.0 + +* Adds BitFinexUSD, WinkDexUSD, HuobiCNY and OKCoinCNY + ### 2.1.4 * Removes MtGox @@ -76,4 +80,4 @@ The source is provided for inspection, considering the nature of Bitcoin. You ar If for some reason you feel like donating a few micro btc to future development, those should go here: -`1AmsBDouePjXxe2R2kFwbuCdBSpsxwtrUt` +`1D3NtjVFpoXonqk3MZwsYD9iV5WA7MRXUj` From 390dc84b78df207a5cc2f61e3ba5267f4b42fa2e Mon Sep 17 00:00:00 2001 From: Chris Shiplet Date: Sat, 18 Apr 2015 00:53:00 -0700 Subject: [PATCH 8/8] Icon tweaks --- README.md | 1 + btcbar.xcodeproj/project.pbxproj | 22 +++------------------- btcbar/AppDelegate.m | 8 ++++---- btcbar/Icons/btclogo.png | Bin 3411 -> 366 bytes btcbar/Icons/btclogo@2x.png | Bin 4084 -> 751 bytes btcbar/Icons/btclogoAlternate.png | Bin 3115 -> 0 bytes btcbar/Icons/btclogoAlternate@2x.png | Bin 3484 -> 0 bytes btcbar/Icons/btclogoDim.png | Bin 3465 -> 0 bytes btcbar/Icons/btclogoDim@2x.png | Bin 4234 -> 0 bytes 9 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 btcbar/Icons/btclogoAlternate.png delete mode 100644 btcbar/Icons/btclogoAlternate@2x.png delete mode 100644 btcbar/Icons/btclogoDim.png delete mode 100644 btcbar/Icons/btclogoDim@2x.png diff --git a/README.md b/README.md index 472b4de..fc21f5d 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ It requires OS X 10.7+ and a 64-bit processor. ### 2.2.0 * Adds BitFinexUSD, WinkDexUSD, HuobiCNY and OKCoinCNY +* New status bar icon with Yosemite (dark theme) support ### 2.1.4 diff --git a/btcbar.xcodeproj/project.pbxproj b/btcbar.xcodeproj/project.pbxproj index da34147..7b93f5d 100644 --- a/btcbar.xcodeproj/project.pbxproj +++ b/btcbar.xcodeproj/project.pbxproj @@ -11,21 +11,17 @@ 830CE09B171B6C3E00DDD525 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 830CE099171B6C3E00DDD525 /* InfoPlist.strings */; }; 830CE09D171B6C3E00DDD525 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 830CE09C171B6C3E00DDD525 /* main.m */; }; 830CE0A4171B6C3E00DDD525 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 830CE0A3171B6C3E00DDD525 /* AppDelegate.m */; }; - 838F835018602990007A7AAE /* btclogoDim.png in Resources */ = {isa = PBXBuildFile; fileRef = 838F834E18602990007A7AAE /* btclogoDim.png */; }; - 838F835118602990007A7AAE /* btclogoDim@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 838F834F18602990007A7AAE /* btclogoDim@2x.png */; }; 83C3E7491859700100FA2921 /* BitStampUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C3E7421859700100FA2921 /* BitStampUSDFetcher.m */; }; 83C3E74A1859700100FA2921 /* BTCeUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C3E7441859700100FA2921 /* BTCeUSDFetcher.m */; }; 83C3E74B1859700100FA2921 /* CoinbaseUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C3E7461859700100FA2921 /* CoinbaseUSDFetcher.m */; }; 83C3E74F1859702000FA2921 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E74E1859702000FA2921 /* MainMenu.xib */; }; 83C3E7541859702D00FA2921 /* btclogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7501859702D00FA2921 /* btclogo.png */; }; 83C3E7551859702D00FA2921 /* btclogo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7511859702D00FA2921 /* btclogo@2x.png */; }; - 83C3E7561859702D00FA2921 /* btclogoAlternate.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7521859702D00FA2921 /* btclogoAlternate.png */; }; - 83C3E7571859702D00FA2921 /* btclogoAlternate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */; }; 83C3E759185970C800FA2921 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 83C3E758185970C800FA2921 /* Icon.icns */; }; + 90347B7918ACB073005C42A8 /* HuobiCNYFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */; }; B65127471A71A1BB00FB6A24 /* OKCoinCNYFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B65127461A71A1BB00FB6A24 /* OKCoinCNYFetcher.m */; }; B662833B1A712EBB00520512 /* BitFinexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */; }; B662833E1A715EFB00520512 /* WinkDexUSDFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */; }; - 90347B7918ACB073005C42A8 /* HuobiCNYFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -42,8 +38,6 @@ 830CE0A3171B6C3E00DDD525 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 830CE0AE171B6C3F00DDD525 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; 838F4296182E2F6E00B4FC58 /* Fetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fetcher.h; sourceTree = ""; }; - 838F834E18602990007A7AAE /* btclogoDim.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = btclogoDim.png; path = Icons/btclogoDim.png; sourceTree = ""; }; - 838F834F18602990007A7AAE /* btclogoDim@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "btclogoDim@2x.png"; path = "Icons/btclogoDim@2x.png"; sourceTree = ""; }; 83C3E7411859700100FA2921 /* BitStampUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitStampUSDFetcher.h; path = Fetchers/BitStampUSDFetcher.h; sourceTree = ""; }; 83C3E7421859700100FA2921 /* BitStampUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BitStampUSDFetcher.m; path = Fetchers/BitStampUSDFetcher.m; sourceTree = ""; }; 83C3E7431859700100FA2921 /* BTCeUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BTCeUSDFetcher.h; path = Fetchers/BTCeUSDFetcher.h; sourceTree = ""; }; @@ -53,17 +47,15 @@ 83C3E74E1859702000FA2921 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainMenu.xib; path = Views/MainMenu.xib; sourceTree = ""; }; 83C3E7501859702D00FA2921 /* btclogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = btclogo.png; path = Icons/btclogo.png; sourceTree = ""; }; 83C3E7511859702D00FA2921 /* btclogo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "btclogo@2x.png"; path = "Icons/btclogo@2x.png"; sourceTree = ""; }; - 83C3E7521859702D00FA2921 /* btclogoAlternate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = btclogoAlternate.png; path = Icons/btclogoAlternate.png; sourceTree = ""; }; - 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "btclogoAlternate@2x.png"; path = "Icons/btclogoAlternate@2x.png"; sourceTree = ""; }; 83C3E758185970C800FA2921 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Icon.icns; path = ../Resources/Icon.icns; sourceTree = ""; }; + 90347B7718ACB073005C42A8 /* HuobiCNYFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HuobiCNYFetcher.h; path = Fetchers/HuobiCNYFetcher.h; sourceTree = ""; }; + 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HuobiCNYFetcher.m; path = Fetchers/HuobiCNYFetcher.m; sourceTree = ""; }; B65127451A71A1BB00FB6A24 /* OKCoinCNYFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OKCoinCNYFetcher.h; path = Fetchers/OKCoinCNYFetcher.h; sourceTree = ""; }; B65127461A71A1BB00FB6A24 /* OKCoinCNYFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OKCoinCNYFetcher.m; path = Fetchers/OKCoinCNYFetcher.m; sourceTree = ""; }; B66283391A712EBB00520512 /* BitFinexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitFinexUSDFetcher.h; path = Fetchers/BitFinexUSDFetcher.h; sourceTree = ""; }; B662833A1A712EBB00520512 /* BitFinexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BitFinexUSDFetcher.m; path = Fetchers/BitFinexUSDFetcher.m; sourceTree = ""; }; B662833C1A715EFB00520512 /* WinkDexUSDFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WinkDexUSDFetcher.h; path = Fetchers/WinkDexUSDFetcher.h; sourceTree = ""; }; B662833D1A715EFB00520512 /* WinkDexUSDFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WinkDexUSDFetcher.m; path = Fetchers/WinkDexUSDFetcher.m; sourceTree = ""; }; - 90347B7718ACB073005C42A8 /* HuobiCNYFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HuobiCNYFetcher.h; path = Fetchers/HuobiCNYFetcher.h; sourceTree = ""; }; - 90347B7818ACB073005C42A8 /* HuobiCNYFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HuobiCNYFetcher.m; path = Fetchers/HuobiCNYFetcher.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -146,10 +138,6 @@ 83C3E758185970C800FA2921 /* Icon.icns */, 83C3E7501859702D00FA2921 /* btclogo.png */, 83C3E7511859702D00FA2921 /* btclogo@2x.png */, - 83C3E7521859702D00FA2921 /* btclogoAlternate.png */, - 83C3E7531859702D00FA2921 /* btclogoAlternate@2x.png */, - 838F834E18602990007A7AAE /* btclogoDim.png */, - 838F834F18602990007A7AAE /* btclogoDim@2x.png */, ); name = Icons; sourceTree = ""; @@ -235,12 +223,8 @@ buildActionMask = 2147483647; files = ( 83C3E7541859702D00FA2921 /* btclogo.png in Resources */, - 83C3E7561859702D00FA2921 /* btclogoAlternate.png in Resources */, - 838F835118602990007A7AAE /* btclogoDim@2x.png in Resources */, 830CE09B171B6C3E00DDD525 /* InfoPlist.strings in Resources */, - 83C3E7571859702D00FA2921 /* btclogoAlternate@2x.png in Resources */, 83C3E759185970C800FA2921 /* Icon.icns in Resources */, - 838F835018602990007A7AAE /* btclogoDim.png in Resources */, 83C3E7551859702D00FA2921 /* btclogo@2x.png in Resources */, 83C3E74F1859702000FA2921 /* MainMenu.xib in Resources */, ); diff --git a/btcbar/AppDelegate.m b/btcbar/AppDelegate.m index 5dbc25f..cf89924 100644 --- a/btcbar/AppDelegate.m +++ b/btcbar/AppDelegate.m @@ -67,12 +67,12 @@ - (void)awakeFromNib // Initialize status bar item with flexible width btcbarStatusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; - // Set status bar image and highlighted image - btcbarStatusItem.image = [NSImage imageNamed:@"btclogoDim"]; - btcbarStatusItem.alternateImage = [NSImage imageNamed:@"btclogoAlternate"]; + // Set status bar image + NSImage *image = [NSImage imageNamed:@"btclogo"]; + [image setTemplate:YES]; + [btcbarStatusItem setImage:image]; // Set menu options on click - btcbarStatusItem.highlightMode = YES; btcbarStatusItem.menu = btcbarMainMenu; // Setup timer to update all tickers every 10 seconds diff --git a/btcbar/Icons/btclogo.png b/btcbar/Icons/btclogo.png index 898e647adcdb14ca6ae8ad845f07bbb29715616e..a6d020055e8d38fe5e89b11014256af8e4a2774c 100644 GIT binary patch delta 339 zcmV-Z0j&Ph8twv+B!3xnMObuGZ)S9NVRB^vL1b@YWgtmyVP|DhWnpA_ami&o0003H zNklmgfOrZJ{{`azI50?V1`u=NGh{cKCOII! z1jPJU4BQLVg8`-@DY^^AQb4>7hLRA0|U;s-#fH5eP*M$H8002ovPDHLkV1iM(j4J>D delta 3408 zcmV-W4X^U<0@E6hB!3BTNLh0L01FcU01FcV0GgZ_000V4X+uL$P-t&-Z*ypGa3D!T zLm+T+Z)Rz1WdHzp+MQEpR8#2|J@?-9LQ9B%luK_?6$l_wLW_VDktQl32@pz%A)(n7 zQNa;KMFbnjpojyGj)066Q7jCK3fKqaA)=0hqlk*i`{8?|Yk$_f_vX$1wbwr9tn;0- z&j-K=43f59&ghTmgWD0l;*TI7}*0BAb^tj|`8MF3bZ02F3R#5n-i zEdVe{S7t~6u(trf&JYW-00;~KFj0twDF6g}0AR=?BX|IWnE(_<@>e|ZE3OddDgXd@ znX){&BsoQaTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nSU8Ffiw@`^UMGMppg|3;Dhu1 zc+L*4&dxTDwhmt{>c0m6B4T3W{^ifBa6kY6;dFk{{wy!E8h|?nfNlPwCGG@hUJIag z_lst-4?wj5py}FI^KkfnJUm6Akh$5}<>chpO2k52Vaiv1{%68pz*qfj`F=e7_x0eu z;v|7GU4MZ`1o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcqjPo+3 zB8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0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o3l)M|R)77j zZP(h=qZ%U5>P)Sr{XXOBL6~MaY<)3=GoPx-{nwA}YXA?!6v{4B)Mx+z002ovPDHLk FV1gLk&L02( diff --git a/btcbar/Icons/btclogoAlternate@2x.png b/btcbar/Icons/btclogoAlternate@2x.png deleted file mode 100644 index 893b51edf6d48a0b5d5b455d07a5d72500a559cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3484 zcmV;N4P)|&P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HU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EJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0008VNklDcCf}(PfnU#fF7NPwBD})_%MJ@=nNm@{DY{B5gCUnAMd0cHt(y=&%+C0d-lXPCv zTgUk+NzFclDkRN&JaxD6>y`A%-0WtA&%C74bcBN6p#;ze6lMs_hrl`D5wHl{Gvf`w z5O5uM9}(PzK(9;Kw>Z3!Q`Y=-l2%J9kkoH2#T&=B+ZwfGBMu;wlFk|u>6U!CqzjUM zI$(`tB9!!un0=OSz45p4$|Q|C;8cbYI_*IwC8@~reQL%hB-L5t#gb+tu+D^udbdZ$ znJ~Evpctq&$JM|MYuDfp9rtEP@q=pV_auA}3h>C5a&axhCW!@25Q?d_nX2cFA#ThgI) z(G<2NV*Ie$Y7%KZumji#6ahbgk0#CB0d4`WeZk`p`oDfy{T=`!Ydv$`%wLfJ0000< KMNUMnLSTZG_;z{# diff --git a/btcbar/Icons/btclogoDim.png b/btcbar/Icons/btclogoDim.png deleted file mode 100644 index ecc2e029d74f1e9cdbc25b79b8f2348c7d76ce36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3465 zcmV;44R-R0P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-r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#p9+P-v;O}6vrH!Al;@Hpb+xp#3;=kmIBIKa^GK4US36l+T4Kh>$G5WC z?AO)R)vV2C`|S04E1Hx(LP)a$G8&EUYo}VR8Y`7bZhn6LQG0uPAdyJaH#ax4R;#rp zYeZ3Owpy(YC0e;$zNH26JYV(sd>3P5W9EZ{1Cir6-PF`nN|GdxTIX~+9RTtS0Gywn zU%LiDPpJf59+JZ?NZJUp(|YKTN4 z((v$bQ41Ox8v3PxMn*>VlF8%~04SA8x@a`Y84QL3%d#CC8yo56<>fApCd4MN#}H2truvM5oiywY9Y`qobp5u2dwS&xeA+ z;M4v6{pNo)oe+Y>#l_=TEcP0JaHS$Hm+M_BmD&je0_B?^X0y2-kH>{rES4mM2n|b1 zDK!A_udlD)Us+i(ZEtTIj*gC+SeB)|y}g&AP^dgRJA2&S-Tj^rvZsDVwC$IHb^tB_ rT>y*#E&-eY_yHhK2)WR{M}GzY7+ep_B>a0|00000NkvXXu0mjfvWRcc diff --git a/btcbar/Icons/btclogoDim@2x.png b/btcbar/Icons/btclogoDim@2x.png deleted file mode 100644 index 12fe287e90f01c034e8b516d7278b685d4ae2107..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4234 zcmV;55Owc~P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M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