├── .gitignore
├── MacWalletApp
├── MacWallet
│ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ ├── Credits.rtf
│ │ └── Localizable.strings
│ ├── Transaction
│ │ ├── MWTransactionMenuItem.m
│ │ ├── MWTransactionMenuItem.h
│ │ ├── MWTransactionsWindowController.h
│ │ ├── MWTransactionDetailsWindowController.h
│ │ ├── MWTransactionDetailsWindowController.m
│ │ ├── MWTransactionsWindowController.m
│ │ ├── MWTransactionDetailsWindowController.xib
│ │ └── MWTransactionsWindowController.xib
│ ├── main.m
│ ├── Preferences
│ │ ├── MWPreferenceWalletViewController.h
│ │ ├── MWPreferenceGeneralViewController.h
│ │ ├── RHPreferences.h
│ │ ├── MWPreferenceWalletViewController.m
│ │ ├── RHPreferencesWindowController.h
│ │ ├── MWPreferenceWalletViewController.xib
│ │ ├── MWPreferenceGeneralViewController.m
│ │ ├── MWPreferenceGeneralViewController.xib
│ │ ├── RHPreferencesWindow.xib
│ │ └── RHPreferencesWindowController.m
│ ├── MWAppDelegate.h
│ ├── Ticker
│ │ ├── MWTickerController.h
│ │ └── MWTickerController.m
│ ├── SendCoins
│ │ ├── MWSendCoinsWindowControllerDelegate.h
│ │ ├── MWSendCoinsWindowController.h
│ │ ├── MWSendCoinsWindowController.m
│ │ └── SendCoinsWindow.xib
│ ├── MacWallet-Prefix.pch
│ ├── sparkle_update_dsa_pub.pem
│ ├── tickers.plist
│ ├── MacWallet-Info.plist
│ └── MWAppDelegate.m
├── icon.png
├── New icon.icns
├── res
│ ├── wallet.png
│ ├── Icon
│ │ ├── icon.png
│ │ ├── icon.psd
│ │ ├── New icon.icns
│ │ ├── New icon.ico
│ │ └── icon_oversized.png
│ ├── settings.png
│ ├── Questionmark.png
│ ├── Questionmark@2x.png
│ ├── TrustedCheckmark.png
│ └── TrustedCheckmark@2x.png
└── MacWallet.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── btcee.xccheckout
│ │ └── MacWallet.xccheckout
│ └── project.pbxproj
├── Screenhots
├── send1.png
├── send2.png
├── send3.png
├── shot1.png
├── shot2.png
├── shot3.png
├── txinfo1.png
└── settings1.png
├── .gitmodules
├── SCREENSHOTS.md
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/MacWalletApp/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/icon.png
--------------------------------------------------------------------------------
/Screenhots/send1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/send1.png
--------------------------------------------------------------------------------
/Screenhots/send2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/send2.png
--------------------------------------------------------------------------------
/Screenhots/send3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/send3.png
--------------------------------------------------------------------------------
/Screenhots/shot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/shot1.png
--------------------------------------------------------------------------------
/Screenhots/shot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/shot2.png
--------------------------------------------------------------------------------
/Screenhots/shot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/shot3.png
--------------------------------------------------------------------------------
/Screenhots/txinfo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/txinfo1.png
--------------------------------------------------------------------------------
/MacWalletApp/New icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/New icon.icns
--------------------------------------------------------------------------------
/Screenhots/settings1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/Screenhots/settings1.png
--------------------------------------------------------------------------------
/MacWalletApp/res/wallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/wallet.png
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "BitcoinJKit"]
2 | path = BitcoinJKit
3 | url = git@github.com:jonasschnelli/BitcoinJKit.git
4 |
--------------------------------------------------------------------------------
/MacWalletApp/res/Icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Icon/icon.png
--------------------------------------------------------------------------------
/MacWalletApp/res/Icon/icon.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Icon/icon.psd
--------------------------------------------------------------------------------
/MacWalletApp/res/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/settings.png
--------------------------------------------------------------------------------
/MacWalletApp/res/Questionmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Questionmark.png
--------------------------------------------------------------------------------
/MacWalletApp/res/Icon/New icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Icon/New icon.icns
--------------------------------------------------------------------------------
/MacWalletApp/res/Icon/New icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Icon/New icon.ico
--------------------------------------------------------------------------------
/MacWalletApp/res/Questionmark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Questionmark@2x.png
--------------------------------------------------------------------------------
/MacWalletApp/res/TrustedCheckmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/TrustedCheckmark.png
--------------------------------------------------------------------------------
/MacWalletApp/res/Icon/icon_oversized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/Icon/icon_oversized.png
--------------------------------------------------------------------------------
/MacWalletApp/res/TrustedCheckmark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jonasschnelli/MacWallet/master/MacWalletApp/res/TrustedCheckmark@2x.png
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionMenuItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // MWTransactionMenuItem.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 07.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import "MWTransactionMenuItem.h"
10 |
11 | @implementation MWTransactionMenuItem
12 | @end
13 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 18.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, char *argv[])
12 | {
13 | return NSApplicationMain(argc, (const char **)argv);
14 | }
15 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionMenuItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // MWTransactionMenuItem.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 07.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MWTransactionMenuItem : NSMenuItem
12 | @property (strong) NSString *txId;
13 | @end
14 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionsWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BATransactionsWindowController.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 30.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MWTransactionsWindowController : NSWindowController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionDetailsWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MWTransactionDetailsWindowController.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 07.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MWTransactionDetailsWindowController : NSWindowController
12 | @property (strong) NSDictionary *txDict;
13 | @end
14 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/MWPreferenceWalletViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAPreferenceWalletViewController.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 03.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "RHPreferences.h"
11 |
12 | @interface MWPreferenceWalletViewController : NSViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/MWAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAAppDelegate.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 18.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MWSendCoinsWindowController.h"
11 | #import "MWTransactionsWindowController.h"
12 |
13 | @interface MWAppDelegate : NSObject
14 |
15 | @property (assign) BOOL launchAtStartup;
16 |
17 | @end
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/MWPreferenceGeneralViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // I7SPreferenceSharesViewController.h
3 | // i7share
4 | //
5 | // Created by Jonas Schnelli on 30.07.12.
6 | // Copyright (c) 2012 include7 AG. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "RHPreferences.h"
11 | @interface MWPreferenceGeneralViewController : NSViewController
12 | @property (assign) BOOL launchAtStartup;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Ticker/MWTickerController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BATickerController.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 04.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MWTickerController : NSObject
12 | @property (strong) NSString *tickerFilePath;
13 | + (MWTickerController *)defaultController;
14 | - (void)loadTicketWithName:(NSString *)name completionHandler:(void (^)(NSString*, NSError*))handler;
15 | @property (readonly) NSDictionary *tickerDatabase;
16 | @end
17 |
--------------------------------------------------------------------------------
/SCREENSHOTS.md:
--------------------------------------------------------------------------------
1 | 
2 | 
3 | 
4 | 
5 | 
6 | 
7 | 
8 | 
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/SendCoins/MWSendCoinsWindowControllerDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // BASendCoinsWindowControllerDelegate.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 25.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class MWSendCoinsWindowController;
12 |
13 | @protocol MWSendCoinsWindowControllerDelegate
14 | @required
15 | - (NSInteger)prepareSendCoinsFromWindowController:(MWSendCoinsWindowController *)windowController receiver:(NSString *)btcAddress amount:(NSInteger)amountInSatoshis txfee:(NSInteger)txFeeInSatoshis;
16 |
17 | @optional
18 | - (void)sendCoinsWindowControllerWillClose:(MWSendCoinsWindowController *)windowController;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/SendCoins/MWSendCoinsWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BASendCoinsWindowController.h
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 25.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 | #include "MWSendCoinsWindowControllerDelegate.h"
11 |
12 | typedef enum MWSendCoinsWindowControllerState {
13 | MWSendCoinsWindowControllerBasic,
14 | MWSendCoinsWindowControllerWaitingCommit,
15 | MWSendCoinsWindowControllerShowTXID
16 | } MWSendCoinsWindowControllerState;
17 |
18 | @class MWAppDelegate;
19 |
20 | @interface MWSendCoinsWindowController : NSWindowController
21 | @property (strong) NSObject *delegate;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 MacWalletDevelopers/Jonas Schnelli
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/MacWallet-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'MacWallet' target in the 'MacWallet' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
9 |
10 | #define kTESTNET_SWITCH_KEY @"testnetSwitchKey"
11 | #define kUSE_KEYCHAIN_KEY @"useKeychainKey"
12 | #define kTICKER_NAME_KEY @"tickerNameKey"
13 | #define kDEFAULT_TICKER_NAME @"BITSTAMP USD"
14 | #define kSTATUS_ITEM_STYLE_KEY @"statusItemStyleKey"
15 | #define kSHOW_TIME_AGO_KEY @"showTimeAgoKey"
16 |
17 | typedef enum MWStatusItemStyle {
18 | MWStatusItemStyleBalance = 0,
19 | MWStatusItemStyleTicker = 1,
20 | MWStatusItemStyleBoth = 2
21 | } MWStatusItemStyle;
22 |
23 | #define kDEFAULT_MAX_TRANSACTION_COUNT_MENU 10
24 | #define kKEYCHAIN_SERVICE_NAME @"MacWallet"
25 | #define kKEYCHAIN_SERVICE_NAME_TESTNET @"MacWallet_Testnet"
26 | #define kSAVE_WALLET_TO_KEYCHAIN 1
27 |
28 | #define kSHOULD_UPDATE_AFTER_PREFS_CHANGE_NOTIFICATION @"shouldUpdateAfterPrefsChangeNotification"
29 | #define kTICKET_UPDATE_INTERVAL_IN_SECONDS 5
30 | #define kSHOULD_SHOW_TRANSACTION_DETAILS_FOR_ID @"shouldShowTransactionDetailsForId"
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | MacWallet integration/staging tree
2 | ================================
3 |
4 | http://macwallet.github.com
5 |
6 | Copyright (c) 2013 MacWallet Developers
7 |
8 |
9 | What is MacWallet
10 | -------
11 |
12 | MacWallet is a very easy to use and integrated Bitcoin wallet for Mac OSX.
13 | [Bitcoinj](https://code.google.com/p/bitcoinj/) is used as underlaying bitcoin library.
14 | [BitcoinjKit](https://github.com/jonasschnelli/BitcoinJKit) is used as java/cocoa framework layer-
15 |
16 |
17 | Screenshots
18 | -------
19 |
20 | 
21 |
22 | [More Screenshots](https://github.com/MacWallet/MacWallet/blob/master/SCREENSHOTS.md)
23 |
24 |
25 | Requirements
26 | -------
27 |
28 | - OSX 10.7+
29 | - Java Runtime Environment (you might get ask to install after your first start)
30 |
31 |
32 | License
33 | -------
34 |
35 | MacWallet is released under the terms of the MIT license. See `LICENSE` for more
36 | information or see http://opensource.org/licenses/MIT.
37 |
38 |
39 | Thanks to
40 | -------
41 |
42 | - Mike Hearn (Father of bitcoinj) for support
43 | - Hive Developers for creating BitcoinJFramrwork
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/en.lproj/Credits.rtf:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
5 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
6 |
7 | \f0\b\fs24 \cf0 Project Maintainer:
8 | \b0 \
9 | Jonas Schnelli\
10 | \
11 |
12 | \b Used Software:\
13 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
14 |
15 | \b0 \cf0 bitcoinj\
16 | BitcoinJKit\
17 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
18 | \cf0 \
19 |
20 | \b Website:
21 | \b0 \
22 | https://github.com/jonasschnelli/BitcoinStatus\
23 |
24 | \b \
25 | Donations:\
26 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
27 |
28 | \b0 \cf0 1Dkq3XnA16PKmVDtZGuK5XA2nBHxwpyzQz\
29 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
30 | \cf0 \
31 |
32 | \b License:\
33 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
34 |
35 | \b0 \cf0 MIT\
36 | }
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/sparkle_update_dsa_pub.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN PUBLIC KEY-----
2 | MIIDOzCCAi0GByqGSM44BAEwggIgAoIBAQDrTG8BTsQqQ9RgmLBrzZNOZmezYXbg
3 | wSyLPZ736iH3pvWB9LJ0xL1EEKSRF1t5q3hIUSmYV5c2zHCscXbk5ZgdoMnKQT8D
4 | lWf437mXkfN3AVUZezLAxrifxQJNjX8WY3u4kQGNR6jqmbiADgOzXn+ddGJ9JtuR
5 | TDUVf8SIdzNgflXw8bB09RD/BIk1z5dIYzclYLA2Sa2c8+N7/M7JkKk0J7KW1rnP
6 | Zs1ev/xyrQ7FSGGhA00P1wK6fKn8nFIAKbPGxvxqNMx943cXWTZEdV4z5Rtl+5mc
7 | l88uxv4N9rDSc6O8uOKMACiTr+hBrWVA7dXdKyUcStyHDeVksobxFKv7AhUAptw2
8 | sD+6xRCAzbzX9h4pzVVclBECggEAZxk/SckRmexcXjvr95MaVRVbji1BrQrnFqY6
9 | 41piFvTreiRdgJ/v6q18B+7LNnEWZufFePu8nfPlPxPfxjiPP5+Y7zog5uW+dDhU
10 | BXkoMij/G/misXGMO210M6/PQtcxQgVRAFL028ibFKUJK1h9NGFqqUFg9/vkULlK
11 | frEeLKEvAX0ALZpXsLrrmq8y5lL7wEawXqCYKrNwyVEQCYSTyn+DUJCnb+psBf0z
12 | oDyxC1o3Hixpc9/CkcipRjZzwBJaU7sXN2VoZnnxkRV+wdtk27cX/m3oaxZa/xVK
13 | G9YCvlYiwOgC+AFaoMw4IlPYt99VfuDRsfz2eUVp62IhSBpKvwOCAQYAAoIBAQCw
14 | jdtOzIhGbMInQDnYITlhdD13V5NJQ3PFF7tYHIknm/mG/DUF3LbMBWIfUFWPojYT
15 | vDfLPD+jT3kiU8uxi+aUvMS29HQ9M4FcPgl/wu0Z9KcNZ7C/O9FzxPwIWIZmHU0q
16 | AkY/pKPtvhTAb8A80iH7HYClLRkMd4VMHDev4PI0Y+umCHmhVrlTtooA1MTRuIMl
17 | ZpfFztUZ5gTEg7Q4Hjf5Z2vubk3gpj63YqYjXMTk9uHeTQx6uI/HSvBhgwyAPsj8
18 | J9jqjXYj7xwoySwYrV+454x6mYr0EN5yjC0aAZe8b04lsKOZUrOycMuNUBL+C1K1
19 | 7w4LQaTTnYTgUyuamDR3
20 | -----END PUBLIC KEY-----
21 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionDetailsWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MWTransactionDetailsWindowController.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 07.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import "MWTransactionDetailsWindowController.h"
10 | #import
11 |
12 | @interface MWTransactionDetailsWindowController ()
13 | @property (assign) IBOutlet NSTextField *transactionIdTextField;
14 | @property (assign) IBOutlet NSTextField *amountTextField;
15 | @property (assign) IBOutlet NSTextField *receiverAddressTextField;
16 | @end
17 |
18 | @implementation MWTransactionDetailsWindowController
19 |
20 | - (id)initWithWindow:(NSWindow *)window
21 | {
22 | self = [super initWithWindow:window];
23 | if (self) {
24 | // Initialization code here.
25 | }
26 | return self;
27 | }
28 |
29 | - (void)awakeFromNib
30 | {
31 | self.transactionIdTextField.stringValue = [self.txDict objectForKey:@"txid"];
32 | NSInteger amount = [[self.txDict objectForKey:@"amount"] integerValue];
33 | self.amountTextField.stringValue = [[HIBitcoinManager defaultManager] formatNanobtc:amount];
34 | self.receiverAddressTextField.stringValue = [[[self.txDict objectForKey:@"details"] objectAtIndex:0] objectForKey:@"address"];
35 | }
36 |
37 | - (void)windowDidLoad
38 | {
39 | [super windowDidLoad];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/tickers.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MTGOX USD
6 |
7 | jsonPath
8 | data.last_all.display_short
9 | type
10 | json
11 | url
12 | http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast
13 | format
14 | %@
15 |
16 | BITSTAMP USD
17 |
18 | jsonPath
19 | last
20 | url
21 | https://www.bitstamp.net/api/ticker/
22 | format
23 | %@$
24 |
25 | MTGOX GBP
26 |
27 | jsonPath
28 | data.last_all.display_short
29 | type
30 | json
31 | url
32 | http://data.mtgox.com/api/2/BTCGBP/money/ticker_fast
33 | format
34 | %@
35 |
36 | MTGOX EUR
37 |
38 | jsonPath
39 | data.last_all.display_short
40 | type
41 | json
42 | url
43 | http://data.mtgox.com/api/2/BTCEUR/money/ticker_fast
44 | format
45 | %@
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/MacWallet-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 | New icon
11 | CFBundleIdentifier
12 | ch.include7.ch.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 0.1
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSApplicationCategoryType
26 | public.app-category.finance
27 | LSMinimumSystemVersion
28 | ${MACOSX_DEPLOYMENT_TARGET}
29 | LSUIElement
30 |
31 | NSHumanReadableCopyright
32 | Copyright © 2013 Jonas Schnelli. All rights reserved.
33 | NSMainNibFile
34 | MainMenu
35 | NSPrincipalClass
36 | NSApplication
37 | SUFeedURL
38 | https://www.include7.ch/MacWalletApp/appcast_v1.0.0.xml
39 | SUPublicDSAKeyFile
40 | sparkle_update_dsa_pub.pem
41 |
42 |
43 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/RHPreferences.h:
--------------------------------------------------------------------------------
1 | //
2 | // RHPreferences.h
3 | // RHPreferences
4 | //
5 | // Created by Richard Heard on 23/05/12.
6 | // Copyright (c) 2012 Richard Heard. All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions
10 | // are met:
11 | // 1. Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // 2. Redistributions in binary form must reproduce the above copyright
14 | // notice, this list of conditions and the following disclaimer in the
15 | // documentation and/or other materials provided with the distribution.
16 | // 3. The name of the author may not be used to endorse or promote products
17 | // derived from this software without specific prior written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 | // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #import
32 | #import "RHPreferencesWindowController.h"
33 |
34 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localizable.strings
3 | MacWallet
4 |
5 | Created by Jonas Schnelli on 01.10.13.
6 | Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | */
8 | about = "About MacWallet...";
9 | quit = "Quit";
10 | sendCoins = "Send Coins...";
11 | myAddresses = "My Addresses";
12 | myTransactions = "Last Transaction";
13 | syncing = "Syncing: ";
14 | "Network: synced" = "Network: synced";
15 | blocksMenuItem = "Blocks: ";
16 | connectedPeersMenuItem = "Connected Peers: ";
17 | lastBlockAge = "Last Block age: ";
18 |
19 | OK = "OK";
20 | Cancel = "Cancel";
21 |
22 | switchToTestnet = "Would you like to switch to Testnet?";
23 |
24 | sendCoinsWindowTitle = "Send Coins";
25 | receiverAddressLabel = "Receiver Address";
26 | amoutLabel = "Amount";
27 | feeLabel = "Required Fee";
28 | totalAmountLabel = "Total Amount";
29 | transactionIdLabel = "Transaction ID";
30 |
31 | prepareTx = "Prepare Transaction";
32 | commitTx = "Send Coins!";
33 | closeButton = "Close";
34 |
35 | moreTx = "%d more...";
36 | showAllTransaction = "Show All Transactions";
37 | noTransactionsFound = "No transactions found";
38 | transactionsWindowTitle = "Transactions";
39 | status = "Status";
40 | amount = "Amount";
41 | date = "Date";
42 | getTxInfo = "Get Info";
43 |
44 | preferences = "Settings...";
45 | autostartPrefsLabel = "Automatically launch MacWallet at startup";
46 | checkForUpdatesAtStartupLabel = "Check for updates at startup";
47 | tickerLabel = "Ticker";
48 | whatToShowLabel = "Main Menu Item";
49 | showBothButton = "Show Ticker and Balance";
50 | showTickerButton = "Show Ticker";
51 | showBalanceButtonLabel = "Show Balance";
52 | secondLineBalanceLabel = "Balance: ";
53 | secondLineTickerLabel = "@$1: ";
54 |
55 | timeAgoFormat = " (%@ ago)";
56 | timeAgoLabel = "Show \"time ago\" in transaction list";
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/MWPreferenceWalletViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // BAPreferenceWalletViewController.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 03.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import "MWPreferenceWalletViewController.h"
10 |
11 | @interface MWPreferenceWalletViewController ()
12 | @property IBOutlet NSButton *useKeychainAsWalletStoreCheckbox;
13 | @property IBOutlet NSButton *keepBackupfileCheckbox;
14 | @end
15 |
16 | @implementation MWPreferenceWalletViewController
17 |
18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
19 | {
20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
21 | if (self) {
22 | // Initialization code here.
23 | }
24 | return self;
25 | }
26 |
27 | - (void)awakeFromNib
28 | {
29 | // todo: localization stuff
30 |
31 | [[NSUserDefaults standardUserDefaults] boolForKey:kUSE_KEYCHAIN_KEY] ? [self.keepBackupfileCheckbox setEnabled:YES] : [self.keepBackupfileCheckbox setEnabled:NO];
32 | }
33 |
34 |
35 | #pragma mark - custom stuff
36 |
37 | - (BOOL)useKeychain
38 | {
39 | return [[NSUserDefaults standardUserDefaults] boolForKey:kUSE_KEYCHAIN_KEY];
40 | }
41 |
42 | - (void)setUseKeychain:(BOOL)aState
43 | {
44 | aState ? [self.keepBackupfileCheckbox setEnabled:YES] : [self.keepBackupfileCheckbox setEnabled:NO];
45 |
46 | [[NSUserDefaults standardUserDefaults] setBool:aState forKey:kUSE_KEYCHAIN_KEY];
47 | [[NSUserDefaults standardUserDefaults] synchronize];
48 | }
49 |
50 | #pragma mark - RHPreferencesViewControllerProtocol
51 |
52 | -(NSString*)identifier
53 | {
54 | return NSStringFromClass(self.class);
55 | }
56 | -(NSImage*)toolbarItemImage
57 | {
58 | return [NSImage imageNamed:@"wallet"];
59 | }
60 | -(NSString*)toolbarItemLabel
61 | {
62 | return NSLocalizedString(@"Wallet", @"GeneralToolbarItemLabel");
63 | }
64 |
65 | -(NSView*)initialKeyView
66 | {
67 | return nil;
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet.xcodeproj/project.xcworkspace/xcshareddata/btcee.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | B1EA234C-93E3-4422-96B4-FD039957A2B5
9 | IDESourceControlProjectName
10 | btcee
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 080CC2A7-E3E8-41AC-97E0-277814B46970
14 | ssh://github.com/jonasschnelli/BTCEEApp.git
15 | 74D7113B-0262-444F-895D-A7A4AD6415DB
16 | ssh://github.com/jonasschnelli/BitcoinJKit.git
17 |
18 | IDESourceControlProjectPath
19 | btcee/btcee.xcodeproj/project.xcworkspace
20 | IDESourceControlProjectRelativeInstallPathDictionary
21 |
22 | 080CC2A7-E3E8-41AC-97E0-277814B46970
23 | ../../..
24 | 74D7113B-0262-444F-895D-A7A4AD6415DB
25 | ../../../BitcoinJKit
26 |
27 | IDESourceControlProjectURL
28 | ssh://github.com/jonasschnelli/BTCEEApp.git
29 | IDESourceControlProjectVersion
30 | 110
31 | IDESourceControlProjectWCCIdentifier
32 | 080CC2A7-E3E8-41AC-97E0-277814B46970
33 | IDESourceControlProjectWCConfigurations
34 |
35 |
36 | IDESourceControlRepositoryExtensionIdentifierKey
37 | public.vcs.git
38 | IDESourceControlWCCIdentifierKey
39 | 74D7113B-0262-444F-895D-A7A4AD6415DB
40 | IDESourceControlWCCName
41 | BitcoinJKit
42 |
43 |
44 | IDESourceControlRepositoryExtensionIdentifierKey
45 | public.vcs.git
46 | IDESourceControlWCCIdentifierKey
47 | 080CC2A7-E3E8-41AC-97E0-277814B46970
48 | IDESourceControlWCCName
49 | btceeApp
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Ticker/MWTickerController.m:
--------------------------------------------------------------------------------
1 | //
2 | // BATickerController.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 04.10.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import "MWTickerController.h"
10 |
11 | static MWTickerController *sharedInstance;
12 |
13 | @interface MWTickerController ()
14 | @property (strong) NSDictionary *tickerDictionary;
15 | @end
16 |
17 | @implementation MWTickerController
18 |
19 | @synthesize tickerFilePath=_tickerFilePath;
20 |
21 | + (MWTickerController *)defaultController
22 | {
23 | if(!sharedInstance)
24 | {
25 | sharedInstance = [[MWTickerController alloc] init];
26 | }
27 |
28 | return sharedInstance;
29 | }
30 |
31 | - (void)setTickerFilePath:(NSString *)tickerFilePath
32 | {
33 | _tickerFilePath = tickerFilePath;
34 | [self loadTickerDatabase];
35 | }
36 |
37 | - (NSString *)tickerFilePath
38 | {
39 | return _tickerFilePath;
40 | }
41 |
42 | #pragma mark - manage ticker database
43 | - (void)loadTickerDatabase
44 | {
45 | self.tickerDictionary = [NSDictionary dictionaryWithContentsOfFile:self.tickerFilePath];
46 | }
47 |
48 | - (NSDictionary *)tickerDatabase
49 | {
50 | return self.tickerDictionary;
51 | }
52 |
53 | #pragma mark - load ticker
54 | - (void)loadTicketWithName:(NSString *)name completionHandler:(void (^)(NSString*, NSError*))handler
55 | {
56 | NSDictionary *tickerObject = [self.tickerDictionary objectForKey:name];
57 | NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[tickerObject objectForKey:@"url"]]];
58 | NSOperationQueue *queue = [[NSOperationQueue alloc] init];
59 | [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
60 | if(error == nil && data)
61 | {
62 | NSDictionary *jsonObject = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL];
63 | NSString *pathToValue = [tickerObject objectForKey:@"jsonPath"];
64 | NSArray *comps = [pathToValue componentsSeparatedByString:@"."];
65 | NSDictionary *currentDict = jsonObject;
66 | for(NSString *comp in comps)
67 | {
68 | currentDict = [currentDict objectForKey:comp];
69 | }
70 | handler([NSString stringWithFormat:[tickerObject objectForKey:@"format"],(NSString *)currentDict], nil);
71 | }
72 | else {
73 | handler(nil, error);
74 | }
75 | }];
76 | }
77 |
78 | @end
79 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet.xcodeproj/project.xcworkspace/xcshareddata/MacWallet.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 24EDAA19-54B0-4802-BE5B-BC8435019560
9 | IDESourceControlProjectName
10 | MacWallet
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 3BE2FE6E-466A-4B9C-B023-BBC76B824DEB
14 | https://github.com/heardrwt/RHKeychain
15 | F6F431B4-ED4F-4C4E-A3AE-A53D211ADF70
16 | ssh://github.com/jonasschnelli/BitcoinJKit.git
17 | FA7CB3DC-D81F-4046-ABA5-9CD7A8E6CC8E
18 | https://github.com/jonasschnelli/MacWalletApp
19 | FEE04236-F745-4D97-B050-DE55AEF182A0
20 | https://github.com/jonasschnelli/LaunchAtLoginController
21 |
22 | IDESourceControlProjectPath
23 | MacWalletApp/MacWallet.xcodeproj/project.xcworkspace
24 | IDESourceControlProjectRelativeInstallPathDictionary
25 |
26 | 3BE2FE6E-466A-4B9C-B023-BBC76B824DEB
27 | ../../../vendor/RHKeychain
28 | F6F431B4-ED4F-4C4E-A3AE-A53D211ADF70
29 | ../../../BitcoinJKit
30 | FA7CB3DC-D81F-4046-ABA5-9CD7A8E6CC8E
31 | ../../..
32 | FEE04236-F745-4D97-B050-DE55AEF182A0
33 | ../../../vendor/LaunchAtLoginController
34 |
35 | IDESourceControlProjectURL
36 | https://github.com/jonasschnelli/MacWalletApp
37 | IDESourceControlProjectVersion
38 | 110
39 | IDESourceControlProjectWCCIdentifier
40 | FA7CB3DC-D81F-4046-ABA5-9CD7A8E6CC8E
41 | IDESourceControlProjectWCConfigurations
42 |
43 |
44 | IDESourceControlRepositoryExtensionIdentifierKey
45 | public.vcs.git
46 | IDESourceControlWCCIdentifierKey
47 | F6F431B4-ED4F-4C4E-A3AE-A53D211ADF70
48 | IDESourceControlWCCName
49 | BitcoinJKit
50 |
51 |
52 | IDESourceControlRepositoryExtensionIdentifierKey
53 | public.vcs.git
54 | IDESourceControlWCCIdentifierKey
55 | FEE04236-F745-4D97-B050-DE55AEF182A0
56 | IDESourceControlWCCName
57 | LaunchAtLoginController
58 |
59 |
60 | IDESourceControlRepositoryExtensionIdentifierKey
61 | public.vcs.git
62 | IDESourceControlWCCIdentifierKey
63 | FA7CB3DC-D81F-4046-ABA5-9CD7A8E6CC8E
64 | IDESourceControlWCCName
65 | MacWalletApp
66 |
67 |
68 | IDESourceControlRepositoryExtensionIdentifierKey
69 | public.vcs.git
70 | IDESourceControlWCCIdentifierKey
71 | 3BE2FE6E-466A-4B9C-B023-BBC76B824DEB
72 | IDESourceControlWCCName
73 | RHKeychain
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/RHPreferencesWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // RHPreferencesWindowController.h
3 | // RHPreferences
4 | //
5 | // Created by Richard Heard on 10/04/12.
6 | // Copyright (c) 2012 Richard Heard. All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions
10 | // are met:
11 | // 1. Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // 2. Redistributions in binary form must reproduce the above copyright
14 | // notice, this list of conditions and the following disclaimer in the
15 | // documentation and/or other materials provided with the distribution.
16 | // 3. The name of the author may not be used to endorse or promote products
17 | // derived from this software without specific prior written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 | // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #import
32 |
33 | @protocol RHPreferencesViewControllerProtocol;
34 |
35 | @interface RHPreferencesWindowController : NSWindowController {
36 |
37 | NSArray *_viewControllers;
38 | NSToolbar *_toolbar;
39 | NSArray *_toolbarItems;
40 |
41 | NSViewController *_selectedViewController;
42 | NSString *_unloadedWindowTitle;
43 | BOOL _windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController;
44 |
45 | }
46 |
47 | //init
48 | -(id)initWithViewControllers:(NSArray*)controllers;
49 | -(id)initWithViewControllers:(NSArray*)controllers andTitle:(NSString*)title;
50 |
51 | //properties
52 | @property (copy) NSString *windowTitle;
53 | @property (assign) BOOL windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController; //defaults to YES
54 |
55 | @property (retain) IBOutlet NSToolbar *toolbar;
56 | @property (retain) IBOutlet NSArray *viewControllers; //controllers should implement RHPreferencesViewControllerProtocol
57 |
58 | @property (assign) NSUInteger selectedIndex;
59 | @property (assign) NSViewController *selectedViewController;
60 |
61 | -(NSViewController *)viewControllerWithIdentifier:(NSString*)identifier;
62 |
63 | //you can include these placeholder controllers amongst your array of view controllers to show their respective items in the toolbar
64 | +(id)separatorPlaceholderController; // NSToolbarSeparatorItemIdentifier
65 | +(id)flexibleSpacePlaceholderController; // NSToolbarFlexibleSpaceItemIdentifier
66 | +(id)spacePlaceholderController; // NSToolbarSpaceItemIdentifier
67 |
68 | +(id)showColorsPlaceholderController; // NSToolbarShowColorsItemIdentifier
69 | +(id)showFontsPlaceholderController; // NSToolbarShowFontsItemIdentifier
70 | +(id)customizeToolbarPlaceholderController; // NSToolbarCustomizeToolbarItemIdentifier
71 | +(id)printPlaceholderController; // NSToolbarPrintItemIdentifier
72 |
73 | @end
74 |
75 |
76 |
77 | // Implement this protocol on your view controller so that RHPreferencesWindow knows what to show in the tabbar. Label, image etc.
78 | @protocol RHPreferencesViewControllerProtocol
79 | @required
80 |
81 | @property (nonatomic, readonly, retain) NSString *identifier;
82 | @property (nonatomic, readonly, retain) NSImage *toolbarItemImage;
83 | @property (nonatomic, readonly, retain) NSString *toolbarItemLabel;
84 |
85 | @optional
86 |
87 | @property (nonatomic, readonly, retain) NSToolbarItem *toolbarItem; //optional, overrides the above 3 properties. allows for custom tabbar items.
88 |
89 | //methods called when switching between tabs
90 | -(void)viewWillAppear;
91 | -(void)viewDidAppear;
92 | -(void)viewWillDisappear;
93 | -(void)viewDidDisappear;
94 |
95 | -(NSView*)initialKeyView; // keyboard focus view on tab switch...
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/MWPreferenceWalletViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
32 |
40 |
48 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionsWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // BATransactionsWindowController.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 30.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import "MWTransactionsWindowController.h"
10 | #import
11 | #import "MWAppDelegate.h"
12 |
13 | @interface MWTransactionsWindowController ()
14 | @property (strong) NSArray *cachedTransactions;
15 | @property (assign) IBOutlet NSTableView *tableView;
16 | @property (assign) IBOutlet NSTableColumn *statusColumn;
17 | @property (assign) IBOutlet NSTableColumn *amountColumn;
18 | @property (assign) IBOutlet NSTableColumn *dateColumn;
19 | @property (assign) IBOutlet NSTableColumn *addressColumn;
20 | @property (assign) IBOutlet NSToolbarItem *getInfoToolbar;
21 | @property (strong) NSDateFormatter *dateFormatter;
22 | @end
23 |
24 | @implementation MWTransactionsWindowController
25 |
26 | - (id)initWithWindow:(NSWindow *)window
27 | {
28 | self = [super initWithWindow:window];
29 | if (self) {
30 | // Initialization code here.
31 | }
32 | return self;
33 | }
34 |
35 | - (void)awakeFromNib
36 | {
37 | // do some localization stuff
38 |
39 | NSCell *cell = self.statusColumn.headerCell;
40 | cell.stringValue = NSLocalizedString(@"status", @"status column title");
41 |
42 | cell = self.amountColumn.headerCell;
43 | cell.stringValue = NSLocalizedString(@"amount", @"amount column title");
44 |
45 | cell = self.dateColumn.headerCell;
46 | cell.stringValue = NSLocalizedString(@"date", @"date column title");
47 |
48 | cell = self.addressColumn.headerCell;
49 | cell.stringValue = NSLocalizedString(@"receiverAddressLabel", @"receiverAddressLabel");
50 |
51 | self.getInfoToolbar.label = NSLocalizedString(@"getTxInfo", @"get transaction info label");
52 | self.window.title = NSLocalizedString(@"transactionsWindowTitle", @"transactionsWindowTitle");
53 |
54 |
55 | // set the double click action
56 | [self.tableView setDoubleAction:@selector(doubleClick:)];
57 | }
58 |
59 | - (void)showInfoForTxId:(NSString *)txHash
60 | {
61 | [[NSNotificationCenter defaultCenter] postNotificationName:kSHOULD_SHOW_TRANSACTION_DETAILS_FOR_ID object:txHash];
62 | }
63 |
64 | - (IBAction)showInfo:(id)sender
65 | {
66 | NSDictionary *txDist = [self.cachedTransactions objectAtIndex:[self.tableView.selectedRowIndexes firstIndex]];
67 | NSString *txHash = [txDist objectForKey:@"txid"];
68 |
69 | [self showInfoForTxId:txHash];
70 | }
71 |
72 | - (void)doubleClick:(id)object {
73 | NSInteger rowNumber = [self.tableView clickedRow];
74 | NSDictionary *txDist = [self.cachedTransactions objectAtIndex:rowNumber];
75 | NSString *txHash = [txDist objectForKey:@"txid"];
76 | [self showInfoForTxId:txHash];
77 | }
78 |
79 | - (void)windowDidLoad
80 | {
81 | [super windowDidLoad];
82 |
83 | if(!self.dateFormatter)
84 | {
85 | self.dateFormatter = [[NSDateFormatter alloc] init];
86 | [self.dateFormatter setTimeStyle:NSDateFormatterMediumStyle];
87 | [self.dateFormatter setDateStyle:NSDateFormatterMediumStyle];
88 | }
89 | if(!self.cachedTransactions)
90 | {
91 | self.cachedTransactions = [[HIBitcoinManager defaultManager] allTransactions:0];
92 | }
93 |
94 | [self.tableView reloadData];
95 | }
96 |
97 | - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
98 | return self.cachedTransactions.count;
99 | }
100 |
101 | - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
102 | {
103 | NSDictionary *txDist = [self.cachedTransactions objectAtIndex:rowIndex];
104 | if([aTableColumn.identifier isEqualToString:@"amount"]) {
105 | return [[HIBitcoinManager defaultManager] formatNanobtc:[[txDist objectForKey:@"amount"] longValue]];
106 | }
107 | else if([aTableColumn.identifier isEqualToString:@"date"]) {
108 | NSDate *date = [txDist objectForKey:@"time"];
109 | return [self.dateFormatter stringFromDate:date];
110 | }
111 | else if([aTableColumn.identifier isEqualToString:@"status"]) {
112 | if([[txDist objectForKey:@"confidence"] isEqualToString:@"building"])
113 | {
114 | return [NSImage imageNamed:@"TrustedCheckmark"];
115 | }
116 | return [NSImage imageNamed:@"Questionmark"];
117 | }
118 | else if([aTableColumn.identifier isEqualToString:@"recaddr"]) {
119 | NSDictionary *details = [[txDist objectForKey:@"details"] objectAtIndex:0];
120 | if(details)
121 | {
122 | return [details objectForKey:@"address"];
123 | }
124 | return @"";
125 | }
126 | return @"";
127 | }
128 |
129 |
130 | @end
131 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/MWPreferenceGeneralViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // I7SPreferenceSharesViewController.m
3 | // i7share
4 | //
5 | // Created by Jonas Schnelli on 30.07.12.
6 | // Copyright (c) 2012 include7 AG. All rights reserved.
7 | //
8 |
9 | #import "MWPreferenceGeneralViewController.h"
10 | #import "MWAppDelegate.h"
11 | #import "MWTickerController.h"
12 |
13 | @interface MWPreferenceGeneralViewController ()
14 | @property (assign) IBOutlet NSButton *checkUpdatesAtStartup;
15 | @property (assign) IBOutlet NSButton *autostartSystem;
16 | @property (assign) IBOutlet NSButton *showTimeAgoButton;
17 | @property (assign) IBOutlet NSTextField *tickerLabel;
18 | @property (assign) IBOutlet NSComboBox *tickerSelector;
19 |
20 | @property (assign) IBOutlet NSTextField *whatToShowLabel;
21 | @property (assign) IBOutlet NSMatrix *radioButtonGroup;
22 | @property (assign) IBOutlet NSButtonCell *showBalanceButton;
23 | @property (assign) IBOutlet NSButtonCell *showTickerButton;
24 | @property (assign) IBOutlet NSButtonCell *showBothButton;
25 | @property (assign) BOOL showTimeAgo;
26 | @end
27 |
28 | @implementation MWPreferenceGeneralViewController
29 |
30 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
31 | {
32 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
33 | if (self) {
34 | // Initialization code here.
35 | }
36 |
37 | return self;
38 | }
39 |
40 | #pragma mark - custom stuff
41 |
42 | - (BOOL)launchAtStartup
43 | {
44 | MWAppDelegate *dele = (MWAppDelegate *)[NSApplication sharedApplication].delegate;
45 | return dele.launchAtStartup;
46 | return YES;
47 | }
48 |
49 | - (void)setLaunchAtStartup:(BOOL)aState
50 | {
51 | MWAppDelegate *dele = (MWAppDelegate *)[NSApplication sharedApplication].delegate;
52 | dele.launchAtStartup = aState;
53 | }
54 |
55 | - (BOOL)showTimeAgo
56 | {
57 | return [[NSUserDefaults standardUserDefaults] boolForKey:kSHOW_TIME_AGO_KEY];
58 | }
59 |
60 | - (void)setShowTimeAgo:(BOOL)aState
61 | {
62 | [[NSUserDefaults standardUserDefaults] setBool:aState forKey:kSHOW_TIME_AGO_KEY];
63 | [[NSUserDefaults standardUserDefaults] synchronize];
64 |
65 | [[NSNotificationCenter defaultCenter] postNotificationName:kSHOULD_UPDATE_AFTER_PREFS_CHANGE_NOTIFICATION object:self];
66 | }
67 |
68 |
69 |
70 | #pragma mark - View hide/show
71 |
72 | - (void)awakeFromNib {
73 |
74 | NSMutableArray *tickerLabels = [NSMutableArray array];
75 | NSDictionary *tickerDatabase = [MWTickerController defaultController].tickerDatabase;
76 |
77 | for(NSString *tickerLabel in [tickerDatabase allKeys])
78 | {
79 | [tickerLabels addObject:tickerLabel];
80 | }
81 |
82 | [self.tickerSelector addItemsWithObjectValues:tickerLabels];
83 | [self.tickerSelector selectItemAtIndex:0];
84 | NSString *selectedTicker = [[NSUserDefaults standardUserDefaults] objectForKey:kTICKER_NAME_KEY];
85 |
86 | int i = 0;
87 | for(i=0;i < self.tickerSelector.objectValues.count;i++)
88 | {
89 | if([[self.tickerSelector.objectValues objectAtIndex:i] isEqualToString:selectedTicker])
90 | {
91 | [self.tickerSelector selectItemAtIndex:i];
92 | }
93 | }
94 |
95 | self.tickerSelector.delegate = self;
96 |
97 |
98 | self.checkUpdatesAtStartup.title = NSLocalizedString(@"checkForUpdatesAtStartupLabel", @"check for update preference button text");
99 | self.autostartSystem.title = NSLocalizedString(@"autostartPrefsLabel", @"auto check updates preference button text");
100 | self.tickerLabel.stringValue = NSLocalizedString(@"tickerLabel", @"currency preference combo box");
101 |
102 | self.showBalanceButton.title = NSLocalizedString(@"showBalanceButtonLabel", @"currency preference combo box");
103 | self.showTickerButton.title = NSLocalizedString(@"showTickerButton", @"currency preference combo box");
104 | self.showBothButton.title = NSLocalizedString(@"showBothButton", @"currency preference combo box");
105 | self.whatToShowLabel.stringValue= NSLocalizedString(@"whatToShowLabel", @"currency preference combo box");
106 | self.showTimeAgoButton.title = NSLocalizedString(@"timeAgoLabel", @"timeAgoLabel label");
107 |
108 |
109 | NSInteger statusItemStyle = [[NSUserDefaults standardUserDefaults] integerForKey:kSTATUS_ITEM_STYLE_KEY];
110 | [self.radioButtonGroup selectCellWithTag:statusItemStyle];
111 | }
112 |
113 | - (void)comboBoxSelectionDidChange:(NSNotification *)notification {
114 | if(notification.object == self.tickerSelector)
115 | {
116 | [[NSUserDefaults standardUserDefaults] setObject:self.tickerSelector.objectValueOfSelectedItem forKey:kTICKER_NAME_KEY];
117 |
118 | [[NSUserDefaults standardUserDefaults] synchronize];
119 |
120 | [[NSNotificationCenter defaultCenter] postNotificationName:kSHOULD_UPDATE_AFTER_PREFS_CHANGE_NOTIFICATION object:self];
121 | }
122 | }
123 |
124 | - (IBAction)radioButtonMatrixDidChange:(id)sender
125 | {
126 | NSMatrix *matrix = (NSMatrix *)sender;
127 | NSCell *seletcedCell = [matrix selectedCell];
128 | [[NSUserDefaults standardUserDefaults] setInteger:seletcedCell.tag forKey:kSTATUS_ITEM_STYLE_KEY];
129 | [[NSUserDefaults standardUserDefaults] synchronize];
130 |
131 | [[NSNotificationCenter defaultCenter] postNotificationName:kSHOULD_UPDATE_AFTER_PREFS_CHANGE_NOTIFICATION object:self];
132 | }
133 |
134 | - (void)viewDidDisappear
135 | {
136 |
137 |
138 | }
139 |
140 | #pragma mark - RHPreferencesViewControllerProtocol
141 |
142 | -(NSString*)identifier
143 | {
144 | return NSStringFromClass(self.class);
145 | }
146 | -(NSImage*)toolbarItemImage
147 | {
148 | return [NSImage imageNamed:@"settings"];
149 | }
150 | -(NSString*)toolbarItemLabel
151 | {
152 | return NSLocalizedString(@"General", @"GeneralToolbarItemLabel");
153 | }
154 |
155 | -(NSView*)initialKeyView
156 | {
157 | return nil;
158 | }
159 |
160 |
161 | @end
162 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/SendCoins/MWSendCoinsWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // BASendCoinsWindowController.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 25.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import "MWSendCoinsWindowController.h"
10 | #import
11 |
12 | #define kBA_COINS_WINDOW_HEIGHT_NORMAL 128.0
13 | #define kBA_COINS_WINDOW_HEIGHT_SEND 220.0
14 | #define kBA_COINS_WINDOW_HEIGHT_COMMITTED 310.0
15 | @interface MWSendCoinsWindowController ()
16 | @property (assign) IBOutlet NSTextField *btcAddressTextField;
17 | @property (assign) IBOutlet NSTextField *amountTextField;
18 | @property (assign) IBOutlet NSTextField *txFeeTextField;
19 | @property (assign) IBOutlet NSTextField *txTotalAmountTextField;
20 | @property (assign) IBOutlet NSTextField *commitedTxHash;
21 |
22 | @property (assign) IBOutlet NSTextField *receiverAddressLabel;
23 | @property (assign) IBOutlet NSTextField *amoutLabel;
24 | @property (assign) IBOutlet NSTextField *feeLabel;
25 | @property (assign) IBOutlet NSTextField *totalAmountLabel;
26 | @property (assign) IBOutlet NSTextField *transactionIdLabel;
27 |
28 | @property (assign) IBOutlet NSButton *prepareButton;
29 | @property (assign) IBOutlet NSButton *commitButton;
30 | @property (assign) IBOutlet NSButton *closeButton;
31 |
32 | @property (assign) IBOutlet NSTextField *invalidTransactionTextField;
33 | @property (assign) IBOutlet NSTextField *successAfterCommitTextField;
34 |
35 | @property (assign) MWSendCoinsWindowControllerState currentState;
36 |
37 | @end
38 |
39 | @implementation MWSendCoinsWindowController
40 |
41 | - (id)initWithWindow:(NSWindow *)window
42 | {
43 | self = [super initWithWindow:window];
44 | if (self) {
45 | // Initialization code here.
46 | }
47 | return self;
48 | }
49 |
50 | - (void)awakeFromNib
51 | {
52 | // keep track of the state
53 | self.currentState = MWSendCoinsWindowControllerBasic;
54 |
55 | // set to normal height
56 | NSRect frame = self.window.frame;
57 | frame.size.height = kBA_COINS_WINDOW_HEIGHT_NORMAL;
58 | [self.window setFrame:frame display:YES animate:NO];
59 |
60 | // do some localization stuff
61 | self.receiverAddressLabel.stringValue = NSLocalizedString(@"receiverAddressLabel", @"receiverAddressLabel");
62 | self.amoutLabel.stringValue = NSLocalizedString(@"amoutLabel", @"amoutLabel");
63 | self.feeLabel.stringValue = NSLocalizedString(@"feeLabel", @"feeLabel");
64 | self.totalAmountLabel.stringValue = NSLocalizedString(@"totalAmountLabel", @"totalAmountLabel");
65 | self.transactionIdLabel.stringValue = NSLocalizedString(@"transactionIdLabel", @"transactionIdLabel");
66 |
67 | self.prepareButton.title = NSLocalizedString(@"prepareTx", @"prepareTx");
68 | self.commitButton.title = NSLocalizedString(@"commitTx", @"prepareTx");
69 | self.closeButton.title = NSLocalizedString(@"closeButton", @"prepareTx");
70 |
71 | self.window.title = NSLocalizedString(@"sendCoinsWindowTitle", @"sendCoinsWindowTitle");
72 | }
73 |
74 | - (void)windowWillLoad
75 | {
76 | [super windowWillLoad];
77 |
78 | }
79 |
80 | - (void)windowDidLoad
81 | {
82 | [super windowDidLoad];
83 |
84 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowWillClose:) name:NSWindowWillCloseNotification object:nil];
85 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
86 | }
87 |
88 | - (IBAction)prepareClicked:(id)sender
89 | {
90 | NSInteger fee = [self.delegate prepareSendCoinsFromWindowController:self receiver:[self.btcAddressTextField stringValue] amount:[self.amountTextField doubleValue]*100000000 txfee:[self.txFeeTextField doubleValue]*100000000];
91 |
92 | if(fee != kHI_PREPARE_SEND_COINS_DID_FAIL)
93 | {
94 | self.currentState = MWSendCoinsWindowControllerWaitingCommit;
95 |
96 | NSRect frame = self.window.frame;
97 |
98 | CGFloat heightShift = kBA_COINS_WINDOW_HEIGHT_SEND - frame.size.height;
99 |
100 | frame.origin.y -= heightShift;
101 | frame.size.height = kBA_COINS_WINDOW_HEIGHT_SEND;
102 |
103 | [self.window setFrame:frame display:YES animate:YES];
104 |
105 |
106 | self.txFeeTextField.stringValue = [[HIBitcoinManager defaultManager] formatNanobtc:fee];
107 | self.txTotalAmountTextField.stringValue = [[HIBitcoinManager defaultManager] formatNanobtc:[self.amountTextField doubleValue]*100000000+fee];
108 |
109 | [self.invalidTransactionTextField setHidden:YES];
110 | }
111 | else
112 | {
113 | [self.invalidTransactionTextField setHidden:NO];
114 | }
115 | }
116 |
117 | - (IBAction)commitClicked:(id)sender
118 | {
119 | NSString *txHash = [[HIBitcoinManager defaultManager] commitPreparedTransaction];
120 |
121 | if(txHash)
122 | {
123 | self.currentState = MWSendCoinsWindowControllerShowTXID;
124 |
125 | NSRect frame = self.window.frame;
126 |
127 | CGFloat heightShift = kBA_COINS_WINDOW_HEIGHT_COMMITTED - frame.size.height;
128 |
129 | frame.origin.y -= heightShift;
130 | frame.size.height = kBA_COINS_WINDOW_HEIGHT_COMMITTED;
131 |
132 | [self.window setFrame:frame display:YES animate:YES];
133 |
134 | self.commitedTxHash.stringValue = txHash;
135 |
136 | [self.btcAddressTextField setEditable:NO];
137 | [self.amountTextField setEditable:NO];
138 |
139 | [self.prepareButton setEnabled:NO];
140 | [self.commitButton setEnabled:NO];
141 | }
142 | }
143 |
144 | - (IBAction)closeClicked:(id)sender
145 | {
146 | [self close];
147 | }
148 |
149 | - (void)windowWillClose:(id)sender
150 | {
151 | [self.delegate sendCoinsWindowControllerWillClose:self];
152 | }
153 |
154 | #pragma mark - NSTextField delegate stack
155 |
156 | - (void)controlTextDidChange:(NSNotification *)notification
157 | {
158 | if(self.currentState == MWSendCoinsWindowControllerWaitingCommit)
159 | {
160 | NSRect frame = self.window.frame;
161 | CGFloat heightShift = kBA_COINS_WINDOW_HEIGHT_NORMAL - frame.size.height;
162 | frame.origin.y -= heightShift;
163 | frame.size.height = kBA_COINS_WINDOW_HEIGHT_NORMAL;
164 | [self.window setFrame:frame display:YES animate:YES];
165 |
166 | self.txFeeTextField.stringValue = @"";
167 | self.txTotalAmountTextField.stringValue = @"";
168 | }
169 | }
170 |
171 | @end
172 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionDetailsWindowController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/MWPreferenceGeneralViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
41 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Transaction/MWTransactionsWindowController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/RHPreferencesWindow.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1060
5 | 11D50b
6 | 2182
7 | 1138.32
8 | 568.00
9 |
13 |
14 | NSToolbarFlexibleSpaceItem
15 | NSWindowTemplate
16 | NSView
17 | NSToolbar
18 | NSCustomObject
19 | NSToolbarSpaceItem
20 |
21 |
22 | com.apple.InterfaceBuilder.CocoaPlugin
23 |
24 |
28 |
29 |
32 |
35 |
38 |
137 |
138 |
139 |
140 |
141 |
142 | window
143 |
144 |
145 |
146 | 3
147 |
148 |
149 |
150 | toolbar
151 |
152 |
153 |
154 | 15
155 |
156 |
157 |
158 | delegate
159 |
160 |
161 |
162 | 4
163 |
164 |
165 |
166 | delegate
167 |
168 |
169 |
170 | 14
171 |
172 |
173 |
174 |
175 |
176 | 0
177 |
178 |
179 |
180 |
181 |
182 | -2
183 |
184 |
185 | File's Owner
186 |
187 |
188 | -1
189 |
190 |
191 | First Responder
192 |
193 |
194 | -3
195 |
196 |
197 | Application
198 |
199 |
200 | 1
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 | 2
210 |
211 |
212 |
213 |
214 |
215 | 5
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 | 6
225 |
226 |
227 |
228 |
229 | 9
230 |
231 |
232 |
233 |
234 |
235 |
236 | com.apple.InterfaceBuilder.CocoaPlugin
237 | com.apple.InterfaceBuilder.CocoaPlugin
238 | com.apple.InterfaceBuilder.CocoaPlugin
239 |
240 |
241 | com.apple.InterfaceBuilder.CocoaPlugin
242 | {{357, 418}, {480, 270}}
243 |
244 | com.apple.InterfaceBuilder.CocoaPlugin
245 | com.apple.InterfaceBuilder.CocoaPlugin
246 | com.apple.InterfaceBuilder.CocoaPlugin
247 | com.apple.InterfaceBuilder.CocoaPlugin
248 |
249 |
250 |
251 |
252 |
253 | 18
254 |
255 |
256 |
257 |
258 | RHPreferencesWindowController
259 | NSWindowController
260 |
261 | selectToolbarItem:
262 | NSToolbarItem
263 |
264 |
265 | selectToolbarItem:
266 |
267 | selectToolbarItem:
268 | NSToolbarItem
269 |
270 |
271 |
272 | NSToolbar
273 | NSArray
274 |
275 |
276 |
277 | toolbar
278 | NSToolbar
279 |
280 |
281 | viewControllers
282 | NSArray
283 |
284 |
285 |
286 | IBProjectSource
287 | ./Classes/RHPreferencesWindowController.h
288 |
289 |
290 |
291 |
292 | 0
293 | IBCocoaFramework
294 |
295 | com.apple.InterfaceBuilder.CocoaPlugin.macosx
296 |
297 |
298 | YES
299 | 3
300 |
301 | {11, 11}
302 | {10, 3}
303 |
304 |
305 |
306 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/Preferences/RHPreferencesWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // RHPreferencesWindowController.m
3 | // RHPreferences
4 | //
5 | // Created by Richard Heard on 10/04/12.
6 | // Copyright (c) 2012 Richard Heard. All rights reserved.
7 | //
8 | // Redistribution and use in source and binary forms, with or without
9 | // modification, are permitted provided that the following conditions
10 | // are met:
11 | // 1. Redistributions of source code must retain the above copyright
12 | // notice, this list of conditions and the following disclaimer.
13 | // 2. Redistributions in binary form must reproduce the above copyright
14 | // notice, this list of conditions and the following disclaimer in the
15 | // documentation and/or other materials provided with the distribution.
16 | // 3. The name of the author may not be used to endorse or promote products
17 | // derived from this software without specific prior written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 | // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #import "RHPreferencesWindowController.h"
32 |
33 | static NSString * const RHPreferencesWindowControllerSelectedItemIdentifier = @"RHPreferencesWindowControllerSelectedItemIdentifier";
34 | static const CGFloat RHPreferencesWindowControllerResizeAnimationDurationPer100Pixels = 0.07f;
35 |
36 | #pragma mark - Custom Item Placeholder Controller
37 | @interface RHPreferencesCustomPlaceholderController : NSObject {
38 | NSString *_identifier;
39 | }
40 | +(id)controllerWithIdentifier:(NSString*)identifier;
41 | @property (readwrite, nonatomic, retain) NSString *identifier;
42 | @end
43 |
44 | @implementation RHPreferencesCustomPlaceholderController
45 | @synthesize identifier=_identifier;
46 | +(id)controllerWithIdentifier:(NSString*)identifier{
47 | RHPreferencesCustomPlaceholderController * placeholder = [[[RHPreferencesCustomPlaceholderController alloc] init] autorelease];
48 | placeholder.identifier = identifier;
49 | return placeholder;
50 | }
51 | -(NSToolbarItem*)toolbarItem{
52 | NSToolbarItem *item = [[[NSToolbarItem alloc] initWithItemIdentifier:_identifier] autorelease];
53 | return item;
54 | }
55 | -(NSString*)identifier{
56 | return _identifier;
57 | }
58 | -(NSImage*)toolbarItemImage{
59 | return nil;
60 | }
61 | -(NSString*)toolbarItemLabel{
62 | return nil;
63 | }
64 | @end
65 |
66 |
67 | #pragma mark - RHPreferencesWindowController
68 |
69 | @interface RHPreferencesWindowController ()
70 |
71 | //items
72 | -(NSToolbarItem*)toolbarItemWithItemIdentifier:(NSString*)identifier;
73 | -(NSToolbarItem*)newToolbarItemForViewController:(NSViewController*)controller;
74 | -(void)reloadToolbarItems;
75 | -(IBAction)selectToolbarItem:(NSToolbarItem*)itemToBeSelected;
76 | -(NSArray*)toolbarItemIdentifiers;
77 |
78 | //NSWindowController methods
79 | -(void)resizeWindowForContentSize:(NSSize)size duration:(CGFloat)duration;
80 |
81 | @end
82 |
83 | @implementation RHPreferencesWindowController
84 |
85 | @synthesize toolbar=_toolbar;
86 | @synthesize viewControllers=_viewControllers;
87 | @synthesize windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController=_windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController;
88 |
89 | #pragma mark - setup
90 | -(id)initWithViewControllers:(NSArray*)controllers {
91 | return [self initWithViewControllers:controllers andTitle:nil];
92 | }
93 |
94 | -(id)initWithViewControllers:(NSArray*)controllers andTitle:(NSString*)title{
95 | self = [super initWithWindowNibName:@"RHPreferencesWindow"];
96 | if (self){
97 |
98 | //default settings
99 | _windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController = YES;
100 |
101 | //store the controllers
102 | [self setViewControllers:controllers];
103 | _unloadedWindowTitle = [title copy];
104 |
105 | }
106 |
107 | return self;
108 | }
109 |
110 | #pragma mark - properties
111 |
112 | -(NSString*)windowTitle{
113 | return [self isWindowLoaded] ? self.window.title : _unloadedWindowTitle;
114 | }
115 | -(void)setWindowTitle:(NSString *)windowTitle{
116 | if ([self isWindowLoaded]){
117 | self.window.title = windowTitle;
118 | } else {
119 | [_unloadedWindowTitle release];
120 | _unloadedWindowTitle = [windowTitle copy];
121 | }
122 | }
123 |
124 | -(NSArray*)viewControllers{
125 | return [[_viewControllers retain] autorelease];
126 | }
127 |
128 | -(void)setViewControllers:(NSArray *)viewControllers{
129 | if (_viewControllers != viewControllers){
130 | NSUInteger oldSelectedIndex = [self selectedIndex];
131 |
132 | [_viewControllers autorelease];
133 | _viewControllers = [viewControllers retain];
134 |
135 | //update the selected controller if we had one previously.
136 | if (_selectedViewController){
137 | if ([_viewControllers containsObject:_selectedViewController]){
138 | //cool, nothing to do
139 | } else {
140 | [self setSelectedIndex:oldSelectedIndex]; //reset the currently selected view controller
141 | }
142 | } else {
143 | //initial launch state (need to select previously selected tab)
144 |
145 | //set the selected controller
146 | NSViewController *selectedController = [self viewControllerWithIdentifier:[[NSUserDefaults standardUserDefaults] stringForKey:RHPreferencesWindowControllerSelectedItemIdentifier]];
147 | if (selectedController){
148 | [self setSelectedViewController:(id)selectedController];
149 | } else {
150 | [self setSelectedIndex:0]; // unknown, default to zero.
151 | }
152 |
153 | }
154 |
155 | [self reloadToolbarItems];
156 | }
157 | }
158 |
159 | -(NSViewController*)selectedViewController{
160 | return [[_selectedViewController retain] autorelease];
161 | }
162 |
163 | -(void)setSelectedViewController:(NSViewController *)new{
164 | //alias
165 | NSViewController *old = _selectedViewController;
166 |
167 | //stash
168 | _selectedViewController = new; //weak because we retain it in our array
169 |
170 | //stash to defaults also
171 | [[NSUserDefaults standardUserDefaults] setObject:[self toolbarItemIdentifierForViewController:new] forKey:RHPreferencesWindowControllerSelectedItemIdentifier];
172 |
173 | //bail if not yet loaded
174 | if (![self isWindowLoaded]){
175 | return;
176 | }
177 |
178 | if (old != new){
179 |
180 | //notify the old vc that its going away
181 | if ([old respondsToSelector:@selector(viewWillDisappear)]){
182 | [(id)old viewWillDisappear];
183 | }
184 |
185 | [old.view removeFromSuperview];
186 |
187 | if ([old respondsToSelector:@selector(viewDidDisappear)]){
188 | [(id)old viewDidDisappear];
189 | }
190 |
191 | //notify the new vc of its appearance
192 | if ([new respondsToSelector:@selector(viewWillAppear)]){
193 | [(id)new viewWillAppear];
194 | }
195 |
196 | //resize to Preferred window size for given view (duration is determined by difference between current and new sizes)
197 |
198 | float hDifference = fabs(new.view.bounds.size.height - old.view.bounds.size.height);
199 | float wDifference = fabs(new.view.bounds.size.width - old.view.bounds.size.width);
200 | float difference = MAX(hDifference, wDifference);
201 | float duration = MAX(RHPreferencesWindowControllerResizeAnimationDurationPer100Pixels * ( difference / 100), 0.10); // we always want a slight animation
202 | [self resizeWindowForContentSize:new.view.bounds.size duration:duration];
203 |
204 | double delayInSeconds = duration + 0.02; // +.02 to give time for resize to finish before appearing
205 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
206 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
207 |
208 | [self.window.contentView addSubview:new.view];
209 |
210 | if ([new respondsToSelector:@selector(viewDidAppear)]){
211 | [(id)new viewDidAppear];
212 | }
213 |
214 | //if there is a initialKeyView set it as key
215 | if ([new respondsToSelector:@selector(initialKeyView)]){
216 | [[new initialKeyView] becomeFirstResponder];
217 | }
218 |
219 | });
220 |
221 |
222 | [new.view setFrameOrigin:NSMakePoint(0, 0)]; // force our view to a 0,0 origin, fixed in the lower right corner.
223 | [new.view setAutoresizingMask:NSViewMaxXMargin|NSViewMaxYMargin];
224 |
225 | //set the currently selected toolbar item
226 | [_toolbar setSelectedItemIdentifier:[self toolbarItemIdentifierForViewController:new]];
227 |
228 | //if we should auto-update window title, do it now
229 | if (_windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController){
230 | NSString *identifier = [self toolbarItemIdentifierForViewController:new];
231 | NSString *title = [[self toolbarItemWithItemIdentifier:identifier] label];
232 | if (title)[self setWindowTitle:title];
233 | }
234 | }
235 | }
236 |
237 | -(NSUInteger)selectedIndex{
238 | return [_viewControllers indexOfObject:[self selectedViewController]];
239 | }
240 |
241 | -(void)setSelectedIndex:(NSUInteger)selectedIndex{
242 | id newSelection = (selectedIndex >= [_viewControllers count]) ? [_viewControllers lastObject] : [_viewControllers objectAtIndex:selectedIndex];
243 | [self setSelectedViewController:newSelection];
244 | }
245 |
246 | -(NSViewController *)viewControllerWithIdentifier:(NSString*)identifier{
247 | for (NSViewController * vc in _viewControllers){
248 |
249 | //set the toolbar back to the current controllers selection
250 | if ([vc respondsToSelector:@selector(toolbarItem)] && [[[vc toolbarItem] itemIdentifier] isEqualToString:identifier]){
251 | return vc;
252 | }
253 |
254 | if ([[vc identifier] isEqualToString:identifier]){
255 | return vc;
256 | }
257 | }
258 | return nil;
259 | }
260 |
261 |
262 | #pragma mark - View Controller Methods
263 |
264 | -(void)resizeWindowForContentSize:(NSSize)size duration:(CGFloat)duration{
265 | NSWindow *window = [self window];
266 |
267 | NSRect frame = [window contentRectForFrameRect:[window frame]];
268 |
269 | CGFloat newX = NSMinX(frame) + (0.5* (NSWidth(frame) - size.width));
270 | NSRect newFrame = [window frameRectForContentRect:NSMakeRect(newX, NSMaxY(frame) - size.height, size.width, size.height)];
271 |
272 | if (duration > 0.0f){
273 | [NSAnimationContext beginGrouping];
274 | [[NSAnimationContext currentContext] setDuration:duration];
275 | [[window animator] setFrame:newFrame display:YES];
276 | [NSAnimationContext endGrouping];
277 | } else {
278 | [window setFrame:newFrame display:YES];
279 | }
280 |
281 | }
282 |
283 |
284 | #pragma mark - Toolbar Items
285 |
286 | -(NSToolbarItem*)toolbarItemWithItemIdentifier:(NSString*)identifier{
287 | for (NSToolbarItem *item in _toolbarItems){
288 | if ([[item itemIdentifier] isEqualToString:identifier]){
289 | return item;
290 | }
291 | }
292 | return nil;
293 | }
294 |
295 | -(NSString*)toolbarItemIdentifierForViewController:(NSViewController*)controller{
296 | if ([controller respondsToSelector:@selector(toolbarItem)]){
297 | NSToolbarItem *item = [(id)controller toolbarItem];
298 | if (item){
299 | return item.itemIdentifier;
300 | }
301 | }
302 |
303 | if ([controller respondsToSelector:@selector(identifier)]){
304 | return [(id)controller identifier];
305 | }
306 |
307 | return nil;
308 | }
309 |
310 |
311 | -(NSToolbarItem*)newToolbarItemForViewController:(NSViewController*)controller{
312 | //if the controller wants to provide a toolbar item, return that
313 | if ([controller respondsToSelector:@selector(toolbarItem)]){
314 | NSToolbarItem *item = [controller toolbarItem];
315 | if (item){
316 | item = [item copy]; //we copy the item because it needs to be unique for a specific toolbar
317 | item.target = self;
318 | item.action = @selector(selectToolbarItem:);
319 | return item;
320 | }
321 | }
322 |
323 | //otherwise, default to creation of a new item.
324 |
325 | NSToolbarItem *new = [[NSToolbarItem alloc] initWithItemIdentifier:controller.identifier];
326 | new.image = controller.toolbarItemImage;
327 | new.label = controller.toolbarItemLabel;
328 | new.target = self;
329 | new.action = @selector(selectToolbarItem:);
330 | return new;
331 | }
332 |
333 | -(void)reloadToolbarItems{
334 | NSMutableArray *newItems = [NSMutableArray arrayWithCapacity:[_viewControllers count]];
335 |
336 | for (NSViewController* vc in _viewControllers){
337 |
338 | NSToolbarItem *insertItem = [self toolbarItemWithItemIdentifier:vc.identifier];
339 | if (!insertItem){
340 | //create a new one
341 | insertItem = [[self newToolbarItemForViewController:vc] autorelease];
342 | }
343 | [newItems addObject:insertItem];
344 | }
345 |
346 | [_toolbarItems release];
347 | _toolbarItems = [[NSArray arrayWithArray:newItems] retain];
348 | }
349 |
350 |
351 | -(IBAction)selectToolbarItem:(NSToolbarItem*)itemToBeSelected{
352 | if ([_selectedViewController commitEditing] && [[NSUserDefaultsController sharedUserDefaultsController] commitEditing]){
353 | NSUInteger index = [_toolbarItems indexOfObject:itemToBeSelected];
354 | if (index != NSNotFound){
355 | [self setSelectedViewController:[_viewControllers objectAtIndex:index]];
356 | }
357 | } else {
358 | //set the toolbar back to the current controllers selection
359 | if ([_selectedViewController respondsToSelector:@selector(toolbarItem)] && [[_selectedViewController toolbarItem] itemIdentifier]){
360 | [_toolbar setSelectedItemIdentifier:[[_selectedViewController toolbarItem] itemIdentifier]];
361 | } else if ([_selectedViewController respondsToSelector:@selector(identifier)]){
362 | [_toolbar setSelectedItemIdentifier:[_selectedViewController identifier]];
363 | }
364 |
365 | }
366 | }
367 |
368 | -(NSArray*)toolbarItemIdentifiers{
369 | NSMutableArray *identifiers = [NSMutableArray arrayWithCapacity:[_viewControllers count]];
370 |
371 | for (id viewController in _viewControllers){
372 | [identifiers addObject:[self toolbarItemIdentifierForViewController:viewController]];
373 | }
374 |
375 | return [NSArray arrayWithArray:identifiers];
376 | }
377 |
378 | #pragma mark - Custom Placeholder Controller Toolbar Items
379 |
380 | +(id)separatorPlaceholderController{
381 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarSeparatorItemIdentifier];
382 | }
383 | +(id)flexibleSpacePlaceholderController{
384 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarFlexibleSpaceItemIdentifier];
385 | }
386 | +(id)spacePlaceholderController{
387 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarSpaceItemIdentifier];
388 | }
389 | +(id)showColorsPlaceholderController{
390 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarShowColorsItemIdentifier];
391 | }
392 | +(id)showFontsPlaceholderController{
393 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarShowFontsItemIdentifier];
394 | }
395 | +(id)customizeToolbarPlaceholderController{
396 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarCustomizeToolbarItemIdentifier];
397 | }
398 | +(id)printPlaceholderController{
399 | return [RHPreferencesCustomPlaceholderController controllerWithIdentifier:NSToolbarPrintItemIdentifier];
400 | }
401 |
402 | #pragma mark - NSWindowController
403 |
404 | -(void)loadWindow{
405 | [super loadWindow];
406 |
407 | if (_unloadedWindowTitle){
408 | self.window.title = _unloadedWindowTitle;
409 | [_unloadedWindowTitle release]; _unloadedWindowTitle = nil;
410 | }
411 |
412 | if (_selectedViewController){
413 |
414 | //add the view to the windows content view
415 | if ([_selectedViewController respondsToSelector:@selector(viewWillAppear)]){
416 | [_selectedViewController viewWillAppear];
417 | }
418 |
419 | [self.window.contentView addSubview:[_selectedViewController view]];
420 |
421 | if ([_selectedViewController respondsToSelector:@selector(viewDidAppear)]){
422 | [_selectedViewController viewDidAppear];
423 | }
424 |
425 | //resize to Preferred window size for given view
426 | [self resizeWindowForContentSize:_selectedViewController.view.bounds.size duration:0.0f];
427 |
428 | [_selectedViewController.view setFrameOrigin:NSMakePoint(0, 0)];
429 | [_selectedViewController.view setAutoresizingMask:NSViewMaxXMargin|NSViewMaxYMargin];
430 |
431 |
432 | //set the current controllers tab to selected
433 | [_toolbar setSelectedItemIdentifier:[self toolbarItemIdentifierForViewController:_selectedViewController]];
434 |
435 | //if there is a initialKeyView set it as key
436 | if ([_selectedViewController respondsToSelector:@selector(initialKeyView)]){
437 | [[_selectedViewController initialKeyView] becomeFirstResponder];
438 | }
439 |
440 | //if we should auto-update window title, do it now
441 | if (_windowTitleShouldAutomaticlyUpdateToReflectSelectedViewController){
442 | NSString *identifier = [self toolbarItemIdentifierForViewController:_selectedViewController];
443 | NSString *title = [[self toolbarItemWithItemIdentifier:identifier] label];
444 | if (title)[self setWindowTitle:title];
445 | }
446 | }
447 | }
448 |
449 | -(void)windowDidLoad{
450 | [super windowDidLoad];
451 | }
452 |
453 | #pragma mark - NSWindowDelegate
454 |
455 | -(BOOL)windowShouldClose:(id)sender{
456 | if (_selectedViewController){
457 | return [_selectedViewController commitEditing];
458 | }
459 |
460 | //notify the old vc that its going away
461 | if ([_selectedViewController respondsToSelector:@selector(viewWillDisappear)]){
462 | [(id)_selectedViewController viewWillDisappear];
463 | }
464 |
465 | return YES;
466 | }
467 |
468 | -(void)windowWillClose:(NSNotification *)notification{
469 | // steal firstResponder away from text fields, to commit editing to bindings
470 |
471 | //notify the old vc that its going away
472 | if ([_selectedViewController respondsToSelector:@selector(viewDidDisappear)]){
473 | [(id)_selectedViewController viewDidDisappear];
474 | }
475 |
476 | [self.window makeFirstResponder:self];
477 | }
478 |
479 | #pragma mark - NSToolbarDelegate
480 |
481 | -(NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag{
482 | return [self toolbarItemWithItemIdentifier:itemIdentifier];
483 | }
484 |
485 | -(NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar{
486 | return [self toolbarItemIdentifiers];
487 | }
488 |
489 | -(NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar{
490 | return [self toolbarItemIdentifiers];
491 | }
492 |
493 | -(NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar{
494 | return [self toolbarItemIdentifiers];
495 | }
496 |
497 | @end
498 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/MWAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // BAAppDelegate.m
3 | // MacWallet
4 | //
5 | // Created by Jonas Schnelli on 18.09.13.
6 | // Copyright (c) 2013 Jonas Schnelli. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #include "MWAppDelegate.h"
12 | #include "RHKeychain.h"
13 | #include "LaunchAtLoginController.h"
14 | #include "RHPreferencesWindowController.h"
15 | #include "MWPreferenceGeneralViewController.h"
16 | #include "MWPreferenceWalletViewController.h"
17 | #include "MWTickerController.h"
18 | #include "MWTransactionDetailsWindowController.h"
19 | #include "MWTransactionMenuItem.h"
20 |
21 | @interface MWAppDelegate ()
22 |
23 | @property (strong) NSStatusItem * statusItem;
24 | @property (assign) IBOutlet NSMenu *statusMenu;
25 | @property (assign) IBOutlet NSMenu *addressesMenu;
26 | @property (assign) IBOutlet NSMenuItem *addressesMenuItem;
27 | @property (assign) IBOutlet NSMenu *transactionsMenu;
28 | @property (assign) IBOutlet NSMenuItem *transactionsMenuItem;
29 | @property (assign) IBOutlet NSMenuItem *sendCoinsMenuItem;
30 | @property (assign) IBOutlet NSMenuItem *preferencesMenuItem;
31 | @property (assign) IBOutlet NSMenuItem *aboutMenuItem;
32 | @property (assign) IBOutlet NSMenuItem *quitMenuItem;
33 | @property (assign) IBOutlet NSMenuItem *networkStatusMenuItem;
34 | @property (assign) IBOutlet NSMenuItem *networkStatusPeersMenuItem;
35 | @property (assign) IBOutlet NSMenuItem *networkStatusBlockHeight;
36 | @property (assign) IBOutlet NSMenuItem *networkStatusLastBlockTime;
37 | @property (assign) IBOutlet NSMenuItem *networkStatusNetSwitch;
38 | @property (assign) IBOutlet NSMenuItem *balanceUnconfirmedMenuItem;
39 | @property (assign) IBOutlet NSMenuItem *secondRowItem;
40 | @property (assign) BOOL useKeychain;
41 | @property (strong) MWSendCoinsWindowController *sendCoinsWindowController;
42 | @property (strong) MWTransactionsWindowController *txWindowController;
43 | @property (strong) MWTransactionDetailsWindowController *txDetailWindowController;
44 | @property (strong) RHPreferencesWindowController * preferencesWindowController;
45 | @property (strong) NSString *ticketValue;
46 | @property (strong) NSTimer *tickerTimer;
47 |
48 |
49 | @end
50 |
51 | @implementation MWAppDelegate
52 |
53 |
54 | // main entry point
55 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
56 | {
57 |
58 | // init the ticker
59 | [MWTickerController defaultController].tickerFilePath = [[NSBundle mainBundle] pathForResource:@"tickers" ofType:@"plist"];
60 |
61 | // do some localization
62 | self.sendCoinsMenuItem.title = NSLocalizedString(@"sendCoins", @"sendCoinsMenuItem");
63 | self.addressesMenuItem.title = NSLocalizedString(@"myAddresses", @"My Address Menu Item");
64 | self.transactionsMenuItem.title = NSLocalizedString(@"myTransactions", @"My Transaction Menu Item");
65 | self.preferencesMenuItem.title = NSLocalizedString(@"preferences", @"Preferences Menu Item");
66 | self.aboutMenuItem.title = NSLocalizedString(@"about", @"About Menu Item");
67 | self.quitMenuItem.title = NSLocalizedString(@"quit", @"Quit Menu Item");
68 | self.networkStatusLastBlockTime.title =[NSString stringWithFormat:@"%@ ?", NSLocalizedString(@"lastBlockAge", @"Last Block Age Menu Item")];
69 |
70 | // make a global menu (extra menu) item
71 | self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
72 | [self.statusItem setMenu:self.statusMenu];
73 | [self.statusItem setTitle:@"loading..."];
74 | [self.statusItem setHighlightMode:YES];
75 |
76 | // add observers
77 | [[HIBitcoinManager defaultManager] addObserver:self forKeyPath:@"connections" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL];
78 | [[HIBitcoinManager defaultManager] addObserver:self forKeyPath:@"balance" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL];
79 | [[HIBitcoinManager defaultManager] addObserver:self forKeyPath:@"syncProgress" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL];
80 | [[HIBitcoinManager defaultManager] addObserver:self forKeyPath:@"isRunning" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL];
81 | [[HIBitcoinManager defaultManager] addObserver:self forKeyPath:@"peerCount" options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:NULL];
82 |
83 | // check for testnet
84 | BOOL testnet = [[NSUserDefaults standardUserDefaults] boolForKey:kTESTNET_SWITCH_KEY];
85 | [HIBitcoinManager defaultManager].testingNetwork = testnet;
86 |
87 | // define app name and support directory name
88 | if(testnet)
89 | {
90 | [HIBitcoinManager defaultManager].appName = @"macwallet_testnet";
91 | }
92 | else
93 | {
94 | [HIBitcoinManager defaultManager].appName = @"macwallet";
95 | }
96 |
97 | [HIBitcoinManager defaultManager].appSupportDirectoryIdentifier = @"MacWallet";
98 |
99 | // check if user likes to store/retrive the wallet from keychain
100 | self.useKeychain = [[NSUserDefaults standardUserDefaults] boolForKey:kUSE_KEYCHAIN_KEY];
101 |
102 | // start underlaying bitcoin system
103 | NSString *walletBase64String = nil;
104 | if(self.useKeychain)
105 | {
106 | walletBase64String = [self loadWallet];
107 | if(walletBase64String == nil)
108 | {
109 | walletBase64String = @"";
110 | }
111 | }
112 | [[HIBitcoinManager defaultManager] start:walletBase64String];
113 |
114 | // add time for periodical menu updates
115 | NSTimer *timer = [NSTimer timerWithTimeInterval:60 target:self selector:@selector(minuteUpdater) userInfo:nil repeats:YES];
116 | [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
117 |
118 | // update menu with inital stuff
119 | [self updateNetworkMenuItem];
120 |
121 | self.tickerTimer = [NSTimer timerWithTimeInterval:kTICKET_UPDATE_INTERVAL_IN_SECONDS target:self selector:@selector(updateTicker) userInfo:nil repeats:YES];
122 | [self.tickerTimer fire];
123 |
124 | [[NSRunLoop mainRunLoop] addTimer:self.tickerTimer forMode:NSDefaultRunLoopMode];
125 |
126 | // register for some notifications
127 |
128 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateAfterSettingsChanges)
129 | name:kSHOULD_UPDATE_AFTER_PREFS_CHANGE_NOTIFICATION
130 | object:nil];
131 |
132 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showTransactionDetailWindow:)
133 | name:kSHOULD_SHOW_TRANSACTION_DETAILS_FOR_ID
134 | object:nil];
135 |
136 |
137 | }
138 |
139 | - (void)applicationWillTerminate:(NSNotification *)notification
140 | {
141 | // perform a wallet save during termination
142 | [self saveWallet];
143 | }
144 |
145 | // observe the bitcoin framework
146 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
147 | {
148 | if (object == [HIBitcoinManager defaultManager])
149 | {
150 | if ([keyPath compare:@"balance"] == NSOrderedSame)
151 | {
152 | // balance has changed
153 | [self updateStatusMenu];
154 |
155 |
156 | if ([HIBitcoinManager defaultManager].isRunning)
157 | {
158 | [self rebuildTransactionsMenu];
159 | }
160 |
161 | [self saveWallet];
162 | }
163 | else if ([keyPath compare:@"isRunning"] == NSOrderedSame)
164 | {
165 | if ([HIBitcoinManager defaultManager].isRunning)
166 | {
167 | [self updateMyAddresses:[HIBitcoinManager defaultManager].allWalletAddresses];
168 | [self updateStatusMenu];
169 | }
170 | else {
171 | //TODO switch off something
172 | }
173 | }
174 | else if ([keyPath compare:@"syncProgress"] == NSOrderedSame)
175 | {
176 | if ([HIBitcoinManager defaultManager].syncProgress < 1.0)
177 | {
178 | // we are syncing
179 | self.networkStatusMenuItem.title =[NSString stringWithFormat:@"%@ %d%%",NSLocalizedString(@"syncing", @"Syncing Menu Item"), (int)round((double)[HIBitcoinManager defaultManager].syncProgress*100)];
180 | }
181 | else {
182 | // sync finished
183 | self.networkStatusMenuItem.title = NSLocalizedString(@"Network: synced", @"Network Menu Item Synced");
184 |
185 | [self minuteUpdater];
186 | [self updateStatusMenu];
187 | [self saveWallet];
188 | }
189 |
190 | // always update the block info
191 | self.networkStatusBlockHeight.title = [NSString stringWithFormat:@"%@%ld/%ld",NSLocalizedString(@"blocksMenuItem", @"Block Menu Item"),[HIBitcoinManager defaultManager].currentBlockCount, [HIBitcoinManager defaultManager].totalBlocks];
192 |
193 | }
194 | else if ([keyPath compare:@"peerCount"] == NSOrderedSame)
195 | {
196 | // peer connected/disconnected
197 | self.networkStatusPeersMenuItem.title = [NSString stringWithFormat:@"%@%lu", NSLocalizedString(@"connectedPeersMenuItem", @"connectedPeersMenuItem"), (unsigned long)[HIBitcoinManager defaultManager].peerCount];
198 | }
199 | }
200 | }
201 |
202 | - (void)minuteUpdater
203 | {
204 | NSDate *date = [HIBitcoinManager defaultManager].lastBlockCreationTime;
205 | if(date)
206 | {
207 | self.networkStatusLastBlockTime.title =[NSString stringWithFormat:@"%@%.1f min", NSLocalizedString(@"lastBlockAge", @"Last Block Age Menu Item"), -[date timeIntervalSinceNow]/60];
208 | }
209 | [self rebuildTransactionsMenu];
210 | }
211 |
212 | - (void)updateAfterSettingsChanges
213 | {
214 | [self updateStatusMenu];
215 | [self rebuildTransactionsMenu];
216 | [self.tickerTimer fire];
217 | }
218 |
219 |
220 |
221 | #pragma mark - menu actions / menu stack
222 |
223 | - (void)updateStatusMenu
224 | {
225 | uint64_t balance_unconfirmed = [HIBitcoinManager defaultManager].balanceUnconfirmed;
226 | uint64_t balance = [HIBitcoinManager defaultManager].balance;
227 | uint64_t fundsOnTheWay = balance_unconfirmed-balance;
228 |
229 | if(fundsOnTheWay > 0)
230 | {
231 | [self.balanceUnconfirmedMenuItem setHidden:NO];
232 | }
233 | else {
234 | [self.balanceUnconfirmedMenuItem setHidden:YES];
235 | }
236 |
237 | NSFont *font = [NSFont systemFontOfSize:10];
238 | NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
239 |
240 | NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:NSLocalizedString(@"Funds on the way:\n%@",@"Funds on the way menu item"), [[HIBitcoinManager defaultManager] formatNanobtc:fundsOnTheWay]] attributes:attrsDictionary];
241 |
242 | NSInteger statusItemStyle = [[NSUserDefaults standardUserDefaults] integerForKey:kSTATUS_ITEM_STYLE_KEY];
243 |
244 | if(statusItemStyle == MWStatusItemStyleBoth)
245 | {
246 | // set a two line status item
247 | [self.secondRowItem setHidden:YES];
248 |
249 | NSMutableParagraphStyle *paragraphStyle=[[NSMutableParagraphStyle alloc] init];
250 | [paragraphStyle setAlignment:NSRightTextAlignment];
251 | [paragraphStyle setMaximumLineHeight:10];
252 | [paragraphStyle setLineSpacing:1.0];
253 |
254 | NSFont *font2 = [NSFont boldSystemFontOfSize:9];
255 | NSDictionary *attrsDictionary2 = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:font2, [NSColor blackColor], paragraphStyle, nil]
256 | forKeys:[NSArray arrayWithObjects:NSFontAttributeName, NSForegroundColorAttributeName, NSParagraphStyleAttributeName, nil] ];
257 | NSMutableAttributedString* text = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@",self.ticketValue, [[HIBitcoinManager defaultManager] formatNanobtc:balance]] attributes:attrsDictionary2];
258 |
259 | self.statusItem.attributedTitle = text;
260 | }
261 | else if(statusItemStyle == MWStatusItemStyleTicker)
262 | {
263 | self.statusItem.title = self.ticketValue;
264 | [self.secondRowItem setHidden:NO];
265 |
266 | // 2nd row is the wallet balance
267 | self.secondRowItem.title = [NSString stringWithFormat:@"%@%@", NSLocalizedString(@"secondLineBalanceLabel", @""), [[HIBitcoinManager defaultManager] formatNanobtc:balance]];
268 | }
269 | else
270 | {
271 |
272 | self.statusItem.title = [[HIBitcoinManager defaultManager] formatNanobtc:balance];
273 |
274 | // 2nd row is the ticker
275 | if(self.ticketValue.length > 0)
276 | {
277 | [self.secondRowItem setHidden:NO];
278 |
279 | NSString *optimizedString = [NSString stringWithFormat:@"%@%@", NSLocalizedString(@"secondLineTickerLabel", @""),self.ticketValue];
280 |
281 | NSString *tickerName = [[NSUserDefaults standardUserDefaults] objectForKey:kTICKER_NAME_KEY];
282 | if(!tickerName || tickerName.length <= 0)
283 | {
284 | [self.secondRowItem setHidden:YES];
285 | }
286 | else
287 | {
288 | optimizedString = [optimizedString stringByReplacingOccurrencesOfString:@"@$1" withString:tickerName];
289 | self.secondRowItem.title = optimizedString;
290 | }
291 | }
292 | else {
293 | [self.secondRowItem setHidden:YES];
294 | }
295 | }
296 |
297 | self.balanceUnconfirmedMenuItem.attributedTitle = string;
298 |
299 | [self rebuildTransactionsMenu];
300 | }
301 |
302 | // switch the network
303 | - (IBAction)testnetSwitchChecked:(NSMenuItem *)sender
304 | {
305 | BOOL testnetOn = [[NSUserDefaults standardUserDefaults] boolForKey:kTESTNET_SWITCH_KEY];
306 |
307 | NSAlert *alert = [[NSAlert alloc] init];
308 | [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK Button")];
309 | [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"OK Button")];
310 | if(!testnetOn)
311 | {
312 | [alert setMessageText:NSLocalizedString(@"switchToTestnet", @"switch to testnet alert")];
313 | }
314 | else
315 | {
316 | [alert setMessageText:NSLocalizedString(@"Would you like to switch to the Standard Bitcoin Network?", @"switch to prodnet alert")];
317 | }
318 | [alert setInformativeText:@""];
319 | [alert setAlertStyle:NSWarningAlertStyle];
320 | NSInteger alertResult = [alert runModal];
321 | if(alertResult == NSAlertFirstButtonReturn) {
322 | [[NSUserDefaults standardUserDefaults] setBool:!testnetOn forKey:kTESTNET_SWITCH_KEY];
323 | [[NSUserDefaults standardUserDefaults] synchronize];
324 | [self updateNetworkMenuItem];
325 |
326 | //TODO: restart app or bitcoin subsystem
327 | }
328 | else {
329 |
330 | }
331 | }
332 |
333 | - (void)updateNetworkMenuItem
334 | {
335 | BOOL testnetOn = [[NSUserDefaults standardUserDefaults] boolForKey:kTESTNET_SWITCH_KEY];
336 | if(testnetOn)
337 | {
338 | self.networkStatusNetSwitch.title = NSLocalizedString(@"Network: Testnet", @"Testnet on state Menu Item");
339 | }
340 | else
341 | {
342 | self.networkStatusNetSwitch.title = NSLocalizedString(@"Network: Bitcoin", @"Testnet on state Menu Item");
343 | }
344 | }
345 |
346 |
347 | #pragma mark - wallet/address stack
348 |
349 | - (void)updateMyAddresses:(NSArray *)addresses
350 | {
351 | NSLog(@"%@", addresses);
352 | [self.addressesMenu removeAllItems];
353 |
354 | NSFont *font = [NSFont systemFontOfSize:10];
355 | NSDictionary *attrsDictionary =
356 | [NSDictionary dictionaryWithObject:font
357 | forKey:NSFontAttributeName];
358 |
359 |
360 |
361 | for(NSString *address in addresses)
362 | {
363 | NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:address action:@selector(addressClicked:) keyEquivalent:@""];
364 | NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:menuItem.title attributes:attrsDictionary];
365 | menuItem.attributedTitle = string;
366 |
367 | [self.addressesMenu addItem:menuItem];
368 | }
369 |
370 | // add seperator and a "add address" menu item
371 | [self.addressesMenu addItem:[NSMenuItem separatorItem]];
372 | [self.addressesMenu addItemWithTitle:NSLocalizedString(@"addAddress", @"Add Address Menu Item") action:@selector(addWalletAddress:) keyEquivalent:@""];
373 | }
374 |
375 | - (void)addressClicked:(NSMenuItem *)sender
376 | {
377 | [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
378 | [[NSPasteboard generalPasteboard] setString:sender.title forType:NSStringPboardType];
379 | }
380 |
381 | - (void)addWalletAddress:(id)sender
382 | {
383 | [[HIBitcoinManager defaultManager] addKey];
384 | [self saveWallet];
385 |
386 | [self updateMyAddresses:[HIBitcoinManager defaultManager].allWalletAddresses];
387 | }
388 |
389 |
390 | #pragma mark - transactions stack
391 |
392 | - (void)rebuildTransactionsMenu
393 | {
394 | // get amount of transaction
395 | NSUInteger totalTransactionCount = [[HIBitcoinManager defaultManager] transactionCount];
396 |
397 |
398 | // remove all menu items and recreate the transaction menu
399 | // TODO: make kDEFAULT_MAX_TRANSACTION_COUNT_MENU configurable throught settings
400 |
401 | [self.transactionsMenu removeAllItems];
402 | NSArray *displayTransactions = [[HIBitcoinManager defaultManager] allTransactions:kDEFAULT_MAX_TRANSACTION_COUNT_MENU];
403 | NSLog(@"%@", displayTransactions);
404 |
405 | // set font for transaction label
406 | NSFont *font = [NSFont systemFontOfSize:14];
407 | NSDictionary *attrsDictionary =
408 | [NSDictionary dictionaryWithObject:font
409 | forKey:NSFontAttributeName];
410 |
411 | NSUInteger hiddenTransactions = MAX(totalTransactionCount - displayTransactions.count, 0);
412 | for(NSDictionary *transactionDict in displayTransactions)
413 | {
414 |
415 | long long amount = [[transactionDict objectForKey:@"amount"] longLongValue];
416 | NSDate *time = [transactionDict objectForKey:@"time"];
417 | NSTimeInterval ageInSeconds = -[time timeIntervalSinceNow];
418 | NSString *age = nil;
419 |
420 | if(ageInSeconds > 60*60*24)
421 | {
422 | age = [NSString stringWithFormat:@"%.1f d", ageInSeconds/60/60/24];
423 | }
424 | else if(ageInSeconds > 60*60)
425 | {
426 | age = [NSString stringWithFormat:@"%.1f h", ageInSeconds/60/60];
427 | }
428 | else {
429 | age = [NSString stringWithFormat:@"%.1f min", ageInSeconds/60];
430 | }
431 |
432 | NSString *format = @"%@";
433 | if([[NSUserDefaults standardUserDefaults] boolForKey:kSHOW_TIME_AGO_KEY] == YES)
434 | {
435 | format = [format stringByAppendingString:NSLocalizedString(@"timeAgoFormat", @"")];
436 | }
437 |
438 | MWTransactionMenuItem *menuItem = [[MWTransactionMenuItem alloc] initWithTitle:[NSString stringWithFormat:format, [[HIBitcoinManager defaultManager] formatNanobtc:amount], age ] action:@selector(transactionClicked:) keyEquivalent:@""];
439 | menuItem.txId = [transactionDict objectForKey:@"txid"];
440 |
441 | if([[transactionDict objectForKey:@"confidence"] isEqualToString:@"building"])
442 | {
443 | [menuItem setImage:[NSImage imageNamed:@"TrustedCheckmark"]];
444 | }
445 | else
446 | {
447 | [menuItem setImage:[NSImage imageNamed:@"Questionmark"]];
448 | }
449 |
450 | NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:menuItem.title attributes:attrsDictionary];
451 | if(amount < 0)
452 | {
453 | [string addAttribute:NSForegroundColorAttributeName value:[NSColor redColor] range:NSMakeRange(0,string.length)];
454 | }
455 | else {
456 | [string addAttribute:NSForegroundColorAttributeName value:[NSColor blackColor] range:NSMakeRange(0,string.length)];
457 | }
458 | [menuItem setAttributedTitle:string];
459 |
460 |
461 | [self.transactionsMenu addItem:menuItem];
462 | }
463 | if(displayTransactions.count == 0)
464 | {
465 | [self.transactionsMenu addItemWithTitle:NSLocalizedString(@"noTransactionsFound", @"No Transactions Found Menu Item") action:nil keyEquivalent:@""];
466 | }
467 | else if(hiddenTransactions > 0)
468 | {
469 | [self.transactionsMenu addItemWithTitle:[NSString stringWithFormat:NSLocalizedString(@"moreTx", @"more transaction menu item"), hiddenTransactions] action:nil keyEquivalent:@""];
470 | }
471 | // add a separator as well as a "show all transaction" menu item
472 | [self.transactionsMenu addItem:[NSMenuItem separatorItem]];
473 |
474 | [self.transactionsMenu addItemWithTitle:NSLocalizedString(@"showAllTransaction", @"Show All Transaction Menu Item") action:@selector(showTransactionWindow:) keyEquivalent:@""];
475 | }
476 |
477 | - (void)transactionClicked:(id)sender
478 | {
479 |
480 | MWTransactionMenuItem *txMenuItem = (MWTransactionMenuItem *)sender;
481 | NSString *txHash = txMenuItem.txId;
482 | NSDictionary *dict = [[HIBitcoinManager defaultManager] transactionForHash:txHash];
483 | [self showTransactionDetailWindow:dict];
484 | }
485 |
486 | - (IBAction)showTransactionWindow:(id)sender
487 | {
488 | self.txWindowController = [[MWTransactionsWindowController alloc] initWithWindowNibName:@"MWTransactionsWindowController"];
489 |
490 | // activate the app so that the window popps to front
491 | [NSApp activateIgnoringOtherApps:YES];
492 |
493 | [self.txWindowController showWindow:nil];
494 | [self.txWindowController.window orderFrontRegardless];
495 | }
496 |
497 | - (IBAction)showTransactionDetailWindow:(NSDictionary *)txDict
498 | {
499 | if([txDict isKindOfClass:[NSNotification class]])
500 | {
501 | // it's a notification
502 | txDict = [(NSNotification *)txDict object];
503 | }
504 | if([txDict isKindOfClass:[NSString class]])
505 | {
506 | // get txdict if parameter 0 is only a string (txid)
507 | txDict = [[HIBitcoinManager defaultManager] transactionForHash:(NSString *)txDict];
508 | }
509 | self.txDetailWindowController = [[MWTransactionDetailsWindowController alloc] initWithWindowNibName:@"MWTransactionDetailsWindowController"];
510 |
511 | self.txDetailWindowController.txDict = txDict;
512 |
513 | // activate the app so that the window popps to front
514 | [NSApp activateIgnoringOtherApps:YES];
515 |
516 | [self.txDetailWindowController showWindow:nil];
517 | [self.txDetailWindowController.window orderFrontRegardless];
518 | }
519 |
520 | #pragma mark - send coins stack
521 | - (IBAction)openSendCoins:(id)sender
522 | {
523 | // keep window when user only moved the window to the backgroubd
524 | if(!self.sendCoinsWindowController)
525 | {
526 | self.sendCoinsWindowController = [[MWSendCoinsWindowController alloc] initWithWindowNibName:@"SendCoinsWindow"];
527 | }
528 | self.sendCoinsWindowController.delegate = self;
529 |
530 | // activate the app so that the window popps to front
531 | [NSApp activateIgnoringOtherApps:YES];
532 |
533 | [self.sendCoinsWindowController showWindow:nil];
534 | [self.sendCoinsWindowController.window orderFrontRegardless];
535 | }
536 |
537 | #pragma BASendCoinsWindowController Delegate
538 | - (NSInteger)prepareSendCoinsFromWindowController:(MWSendCoinsWindowController *)windowController receiver:(NSString *)btcAddress amount:(NSInteger)amountInSatoshis txfee:(NSInteger)txFeeInSatoshis
539 | {
540 | NSInteger fee = [[HIBitcoinManager defaultManager] prepareSendCoins:amountInSatoshis toReceipent:btcAddress comment:@""];
541 |
542 | return fee;
543 | }
544 | - (void)sendCoinsWindowControllerWillClose:(MWSendCoinsWindowController *)windowController
545 | {
546 | // remove send coins window when user presses close button
547 | self.sendCoinsWindowController = nil;
548 | }
549 |
550 | #pragma mark - wallet stack
551 |
552 | /*
553 | * saves the wallet to the osx keychain
554 | *
555 | */
556 | - (void)saveWallet
557 | {
558 | if(kSAVE_WALLET_TO_KEYCHAIN)
559 | {
560 |
561 | BOOL testnet = [[NSUserDefaults standardUserDefaults] boolForKey:kTESTNET_SWITCH_KEY];
562 | NSString *keychainServiceName = (testnet) ? kKEYCHAIN_SERVICE_NAME_TESTNET : kKEYCHAIN_SERVICE_NAME;
563 |
564 | NSString *base64str = [HIBitcoinManager defaultManager].walletFileBase64String;
565 | if(!base64str || base64str.length == 0)
566 | {
567 | return;
568 | }
569 |
570 | if(!RHKeychainDoesGenericEntryExist(NULL, keychainServiceName))
571 | {
572 | RHKeychainAddGenericEntry(NULL, keychainServiceName);
573 | RHKeychainSetGenericComment(NULL, keychainServiceName, @"bitcoinj wallet as base64 string");
574 | }
575 |
576 | RHKeychainSetGenericPassword(NULL, keychainServiceName, base64str);
577 | }
578 | }
579 |
580 | - (NSString *)loadWallet
581 | {
582 | BOOL testnet = [[NSUserDefaults standardUserDefaults] boolForKey:kTESTNET_SWITCH_KEY];
583 | NSString *keychainServiceName = (testnet) ? kKEYCHAIN_SERVICE_NAME_TESTNET : kKEYCHAIN_SERVICE_NAME;
584 |
585 | if(kSAVE_WALLET_TO_KEYCHAIN)
586 | {
587 | if(RHKeychainDoesGenericEntryExist(NULL, keychainServiceName))
588 | {
589 | return RHKeychainGetGenericPassword(NULL, keychainServiceName);
590 | }
591 | else
592 | {
593 | return nil;
594 | }
595 | }
596 | }
597 |
598 | #pragma mark - Preferences stack
599 |
600 | - (IBAction)showPreferences:(id)sender {
601 | MWPreferenceGeneralViewController *generalPrefs = [[MWPreferenceGeneralViewController alloc] initWithNibName:@"MWPreferenceGeneralViewController" bundle:nil];
602 | MWPreferenceWalletViewController *walletPrefs = [[MWPreferenceWalletViewController alloc] initWithNibName:@"MWPreferenceWalletViewController" bundle:nil];
603 |
604 | NSArray *controllers = [NSArray arrayWithObjects:generalPrefs,walletPrefs,
605 | nil];
606 |
607 | self.preferencesWindowController = [[RHPreferencesWindowController alloc] initWithViewControllers:controllers andTitle:NSLocalizedString(@"Preferences", @"Preferences Window Title")];
608 | [self.preferencesWindowController showWindow:self];
609 | [self.preferencesWindowController.window orderFrontRegardless];
610 | }
611 |
612 |
613 | #pragma mark - auto launch controlling stack
614 |
615 | - (BOOL)launchAtStartup {
616 | LaunchAtLoginController *launchController = [[LaunchAtLoginController alloc] init];
617 | BOOL state = [launchController launchAtLogin];
618 | launchController = nil;
619 | return state;
620 | }
621 |
622 | - (void)setLaunchAtStartup:(BOOL)aState {
623 | LaunchAtLoginController *launchController = [[LaunchAtLoginController alloc] init];
624 | [launchController setLaunchAtLogin:aState];
625 | launchController = nil;
626 | }
627 |
628 | #pragma mark - ticker stack
629 |
630 | - (void)updateTicker
631 | {
632 | NSString *tickerName = [[NSUserDefaults standardUserDefaults] objectForKey:kTICKER_NAME_KEY];
633 | if(!tickerName || tickerName.length == 0)
634 | {
635 | tickerName = kDEFAULT_TICKER_NAME;
636 | }
637 | [[MWTickerController defaultController] loadTicketWithName:tickerName completionHandler:^(NSString *valueString, NSError *error){
638 | dispatch_async(dispatch_get_main_queue(), ^{
639 | self.ticketValue = valueString;
640 | [self updateStatusMenu];
641 | });
642 | }];
643 | }
644 |
645 |
646 | @end
647 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet/SendCoins/SendCoinsWindow.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
--------------------------------------------------------------------------------
/MacWalletApp/MacWallet.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | E50310D017E9986500C2F226 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E50310CF17E9986500C2F226 /* Cocoa.framework */; };
11 | E50310DA17E9986500C2F226 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E50310D817E9986500C2F226 /* InfoPlist.strings */; };
12 | E50310DC17E9986500C2F226 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E50310DB17E9986500C2F226 /* main.m */; };
13 | E50310E017E9986600C2F226 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = E50310DE17E9986600C2F226 /* Credits.rtf */; };
14 | E50310E317E9986600C2F226 /* MWAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E50310E217E9986600C2F226 /* MWAppDelegate.m */; };
15 | E50310E617E9986600C2F226 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E50310E417E9986600C2F226 /* MainMenu.xib */; };
16 | E504D7F617FD843100F94081 /* MWPreferenceWalletViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E504D7F417FD843100F94081 /* MWPreferenceWalletViewController.m */; };
17 | E504D7F717FD843100F94081 /* MWPreferenceWalletViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E504D7F517FD843100F94081 /* MWPreferenceWalletViewController.xib */; };
18 | E504D7FE17FDA09D00F94081 /* settings.png in Resources */ = {isa = PBXBuildFile; fileRef = E504D7FD17FDA09D00F94081 /* settings.png */; };
19 | E504D80017FDA0A300F94081 /* wallet.png in Resources */ = {isa = PBXBuildFile; fileRef = E504D7FF17FDA0A300F94081 /* wallet.png */; };
20 | E504D80217FDA4B500F94081 /* tickers.plist in Resources */ = {isa = PBXBuildFile; fileRef = E504D80117FDA4B500F94081 /* tickers.plist */; };
21 | E508D65817FB26A700CC3CF9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E508D65A17FB26A700CC3CF9 /* Localizable.strings */; };
22 | E528E91017FAB7B800BF4BAD /* Questionmark.png in Resources */ = {isa = PBXBuildFile; fileRef = E528E90E17FAB7B800BF4BAD /* Questionmark.png */; };
23 | E528E91117FAB7B800BF4BAD /* Questionmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E528E90F17FAB7B800BF4BAD /* Questionmark@2x.png */; };
24 | E548C6EE1802BFB400976CD7 /* MWTickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E548C6ED1802BFB400976CD7 /* MWTickerController.m */; };
25 | E548C6F41802BFE600976CD7 /* MWSendCoinsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = E548C6F11802BFE600976CD7 /* MWSendCoinsWindowController.m */; };
26 | E548C6F51802BFE600976CD7 /* SendCoinsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E548C6F31802BFE600976CD7 /* SendCoinsWindow.xib */; };
27 | E548C6FF1802BFFB00976CD7 /* MWTransactionDetailsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = E548C6F81802BFFB00976CD7 /* MWTransactionDetailsWindowController.m */; };
28 | E548C7001802BFFB00976CD7 /* MWTransactionDetailsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E548C6F91802BFFB00976CD7 /* MWTransactionDetailsWindowController.xib */; };
29 | E548C7011802BFFB00976CD7 /* MWTransactionMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E548C6FB1802BFFB00976CD7 /* MWTransactionMenuItem.m */; };
30 | E548C7021802BFFB00976CD7 /* MWTransactionsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = E548C6FD1802BFFB00976CD7 /* MWTransactionsWindowController.m */; };
31 | E548C7031802BFFB00976CD7 /* MWTransactionsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E548C6FE1802BFFB00976CD7 /* MWTransactionsWindowController.xib */; };
32 | E579C0AC1802CD7C00D8B61D /* sparkle_update_dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = E579C0AB1802CD7C00D8B61D /* sparkle_update_dsa_pub.pem */; };
33 | E579C0AF1802DAC800D8B61D /* New icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = E579C0AE1802DAC800D8B61D /* New icon.icns */; };
34 | E579C0B11802DCE300D8B61D /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = E579C0B01802DCE300D8B61D /* icon.png */; };
35 | E5B8390117F9FEED004FBBB5 /* RHKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = E5B8390017F9FEED004FBBB5 /* RHKeychain.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
36 | E5C359D417F1DFC200BA394E /* TrustedCheckmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C359D217F1DFC200BA394E /* TrustedCheckmark@2x.png */; };
37 | E5C359D617F1DFDE00BA394E /* TrustedCheckmark.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C359D517F1DFDE00BA394E /* TrustedCheckmark.png */; };
38 | E5CDA96017FC9F2A0037A01E /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5CDA95F17FC9F2A0037A01E /* Sparkle.framework */; };
39 | E5CDA96217FC9F4F0037A01E /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E5CDA95F17FC9F2A0037A01E /* Sparkle.framework */; };
40 | E5D2F47917F447E200A214F4 /* BitcoinJKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D2F47817F447DB00A214F4 /* BitcoinJKit.framework */; };
41 | E5D2F47A17F447E400A214F4 /* BitcoinJKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E5D2F47817F447DB00A214F4 /* BitcoinJKit.framework */; };
42 | E5E2CCC617FC98B3003EBA11 /* MWPreferenceGeneralViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E5E2CCBF17FC98B3003EBA11 /* MWPreferenceGeneralViewController.m */; };
43 | E5E2CCC717FC98B3003EBA11 /* MWPreferenceGeneralViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E5E2CCC017FC98B3003EBA11 /* MWPreferenceGeneralViewController.xib */; };
44 | E5E2CCC917FC98B3003EBA11 /* RHPreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = E5E2CCC417FC98B3003EBA11 /* RHPreferencesWindowController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
45 | E5E2CCCA17FC98B3003EBA11 /* RHPreferencesWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E5E2CCC517FC98B3003EBA11 /* RHPreferencesWindow.xib */; };
46 | E5E2CCCD17FC9A7D003EBA11 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = E5E2CCCC17FC9A7D003EBA11 /* LaunchAtLoginController.m */; };
47 | E5FBD34317F9FFB400E678FE /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5FBD34217F9FFB400E678FE /* Security.framework */; };
48 | /* End PBXBuildFile section */
49 |
50 | /* Begin PBXContainerItemProxy section */
51 | E5D2F47717F447DB00A214F4 /* PBXContainerItemProxy */ = {
52 | isa = PBXContainerItemProxy;
53 | containerPortal = E5D2F47317F447DB00A214F4 /* BitcoinJKit.xcodeproj */;
54 | proxyType = 2;
55 | remoteGlobalIDString = D958B09D17A29B0500B0EDD5;
56 | remoteInfo = BitcoinJKit;
57 | };
58 | /* End PBXContainerItemProxy section */
59 |
60 | /* Begin PBXCopyFilesBuildPhase section */
61 | E503242A17E9998A00C2F226 /* CopyFiles */ = {
62 | isa = PBXCopyFilesBuildPhase;
63 | buildActionMask = 2147483647;
64 | dstPath = "";
65 | dstSubfolderSpec = 10;
66 | files = (
67 | E5D2F47A17F447E400A214F4 /* BitcoinJKit.framework in CopyFiles */,
68 | E5CDA96217FC9F4F0037A01E /* Sparkle.framework in CopyFiles */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | /* End PBXCopyFilesBuildPhase section */
73 |
74 | /* Begin PBXFileReference section */
75 | E50310CC17E9986500C2F226 /* MacWallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MacWallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
76 | E50310CF17E9986500C2F226 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
77 | E50310D217E9986500C2F226 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
78 | E50310D317E9986500C2F226 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
79 | E50310D417E9986500C2F226 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
80 | E50310D717E9986500C2F226 /* MacWallet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MacWallet-Info.plist"; sourceTree = ""; };
81 | E50310D917E9986500C2F226 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
82 | E50310DB17E9986500C2F226 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
83 | E50310DD17E9986600C2F226 /* MacWallet-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MacWallet-Prefix.pch"; sourceTree = ""; };
84 | E50310DF17E9986600C2F226 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; };
85 | E50310E117E9986600C2F226 /* MWAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWAppDelegate.h; sourceTree = ""; };
86 | E50310E217E9986600C2F226 /* MWAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MWAppDelegate.m; sourceTree = ""; };
87 | E50310E517E9986600C2F226 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; };
88 | E504D7F317FD843100F94081 /* MWPreferenceWalletViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWPreferenceWalletViewController.h; sourceTree = ""; };
89 | E504D7F417FD843100F94081 /* MWPreferenceWalletViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWPreferenceWalletViewController.m; sourceTree = ""; };
90 | E504D7F517FD843100F94081 /* MWPreferenceWalletViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWPreferenceWalletViewController.xib; sourceTree = ""; };
91 | E504D7FD17FDA09D00F94081 /* settings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = settings.png; sourceTree = ""; };
92 | E504D7FF17FDA0A300F94081 /* wallet.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wallet.png; sourceTree = ""; };
93 | E504D80117FDA4B500F94081 /* tickers.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = tickers.plist; sourceTree = ""; };
94 | E508D65917FB26A700CC3CF9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; };
95 | E528E90E17FAB7B800BF4BAD /* Questionmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Questionmark.png; sourceTree = ""; };
96 | E528E90F17FAB7B800BF4BAD /* Questionmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Questionmark@2x.png"; sourceTree = ""; };
97 | E548C6EC1802BFB400976CD7 /* MWTickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWTickerController.h; sourceTree = ""; };
98 | E548C6ED1802BFB400976CD7 /* MWTickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWTickerController.m; sourceTree = ""; };
99 | E548C6F01802BFE600976CD7 /* MWSendCoinsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWSendCoinsWindowController.h; sourceTree = ""; };
100 | E548C6F11802BFE600976CD7 /* MWSendCoinsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWSendCoinsWindowController.m; sourceTree = ""; };
101 | E548C6F21802BFE600976CD7 /* MWSendCoinsWindowControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWSendCoinsWindowControllerDelegate.h; sourceTree = ""; };
102 | E548C6F31802BFE600976CD7 /* SendCoinsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SendCoinsWindow.xib; sourceTree = ""; };
103 | E548C6F71802BFFB00976CD7 /* MWTransactionDetailsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWTransactionDetailsWindowController.h; sourceTree = ""; };
104 | E548C6F81802BFFB00976CD7 /* MWTransactionDetailsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWTransactionDetailsWindowController.m; sourceTree = ""; };
105 | E548C6F91802BFFB00976CD7 /* MWTransactionDetailsWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWTransactionDetailsWindowController.xib; sourceTree = ""; };
106 | E548C6FA1802BFFB00976CD7 /* MWTransactionMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWTransactionMenuItem.h; sourceTree = ""; };
107 | E548C6FB1802BFFB00976CD7 /* MWTransactionMenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWTransactionMenuItem.m; sourceTree = ""; };
108 | E548C6FC1802BFFB00976CD7 /* MWTransactionsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWTransactionsWindowController.h; sourceTree = ""; };
109 | E548C6FD1802BFFB00976CD7 /* MWTransactionsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWTransactionsWindowController.m; sourceTree = ""; };
110 | E548C6FE1802BFFB00976CD7 /* MWTransactionsWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWTransactionsWindowController.xib; sourceTree = ""; };
111 | E579C0AB1802CD7C00D8B61D /* sparkle_update_dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sparkle_update_dsa_pub.pem; sourceTree = ""; };
112 | E579C0AE1802DAC800D8B61D /* New icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "New icon.icns"; sourceTree = ""; };
113 | E579C0B01802DCE300D8B61D /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; };
114 | E5B838FF17F9FEED004FBBB5 /* RHKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RHKeychain.h; path = ../vendor/RHKeychain/RHKeychain/RHKeychain.h; sourceTree = ""; };
115 | E5B8390017F9FEED004FBBB5 /* RHKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RHKeychain.m; path = ../vendor/RHKeychain/RHKeychain/RHKeychain.m; sourceTree = ""; };
116 | E5C359D217F1DFC200BA394E /* TrustedCheckmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TrustedCheckmark@2x.png"; sourceTree = ""; };
117 | E5C359D517F1DFDE00BA394E /* TrustedCheckmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TrustedCheckmark.png; sourceTree = ""; };
118 | E5CDA95F17FC9F2A0037A01E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = ../vendor/Sparkle.framework; sourceTree = ""; };
119 | E5D2F47317F447DB00A214F4 /* BitcoinJKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BitcoinJKit.xcodeproj; path = ../BitcoinJKit/BitcoinJKit.xcodeproj; sourceTree = ""; };
120 | E5E2CCBE17FC98B3003EBA11 /* MWPreferenceGeneralViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWPreferenceGeneralViewController.h; sourceTree = ""; };
121 | E5E2CCBF17FC98B3003EBA11 /* MWPreferenceGeneralViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWPreferenceGeneralViewController.m; sourceTree = ""; };
122 | E5E2CCC017FC98B3003EBA11 /* MWPreferenceGeneralViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWPreferenceGeneralViewController.xib; sourceTree = ""; };
123 | E5E2CCC217FC98B3003EBA11 /* RHPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RHPreferences.h; sourceTree = ""; };
124 | E5E2CCC317FC98B3003EBA11 /* RHPreferencesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RHPreferencesWindowController.h; sourceTree = ""; };
125 | E5E2CCC417FC98B3003EBA11 /* RHPreferencesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RHPreferencesWindowController.m; sourceTree = ""; };
126 | E5E2CCC517FC98B3003EBA11 /* RHPreferencesWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RHPreferencesWindow.xib; sourceTree = ""; };
127 | E5E2CCCB17FC9A7D003EBA11 /* LaunchAtLoginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LaunchAtLoginController.h; path = ../vendor/LaunchAtLoginController/LaunchAtLoginController.h; sourceTree = ""; };
128 | E5E2CCCC17FC9A7D003EBA11 /* LaunchAtLoginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LaunchAtLoginController.m; path = ../vendor/LaunchAtLoginController/LaunchAtLoginController.m; sourceTree = ""; };
129 | E5FBD34217F9FFB400E678FE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
130 | /* End PBXFileReference section */
131 |
132 | /* Begin PBXFrameworksBuildPhase section */
133 | E50310C917E9986500C2F226 /* Frameworks */ = {
134 | isa = PBXFrameworksBuildPhase;
135 | buildActionMask = 2147483647;
136 | files = (
137 | E5FBD34317F9FFB400E678FE /* Security.framework in Frameworks */,
138 | E50310D017E9986500C2F226 /* Cocoa.framework in Frameworks */,
139 | E5D2F47917F447E200A214F4 /* BitcoinJKit.framework in Frameworks */,
140 | E5CDA96017FC9F2A0037A01E /* Sparkle.framework in Frameworks */,
141 | );
142 | runOnlyForDeploymentPostprocessing = 0;
143 | };
144 | /* End PBXFrameworksBuildPhase section */
145 |
146 | /* Begin PBXGroup section */
147 | E50310C317E9986500C2F226 = {
148 | isa = PBXGroup;
149 | children = (
150 | E579C0B01802DCE300D8B61D /* icon.png */,
151 | E579C0AE1802DAC800D8B61D /* New icon.icns */,
152 | E5B838FE17F9FEE5004FBBB5 /* vendor */,
153 | E50310D517E9986500C2F226 /* MacWallet */,
154 | E50310CE17E9986500C2F226 /* Frameworks */,
155 | E50310CD17E9986500C2F226 /* Products */,
156 | );
157 | sourceTree = "";
158 | };
159 | E50310CD17E9986500C2F226 /* Products */ = {
160 | isa = PBXGroup;
161 | children = (
162 | E50310CC17E9986500C2F226 /* MacWallet.app */,
163 | );
164 | name = Products;
165 | sourceTree = "";
166 | };
167 | E50310CE17E9986500C2F226 /* Frameworks */ = {
168 | isa = PBXGroup;
169 | children = (
170 | E5CDA95F17FC9F2A0037A01E /* Sparkle.framework */,
171 | E5FBD34217F9FFB400E678FE /* Security.framework */,
172 | E5D2F47317F447DB00A214F4 /* BitcoinJKit.xcodeproj */,
173 | E50310CF17E9986500C2F226 /* Cocoa.framework */,
174 | E50310D117E9986500C2F226 /* Other Frameworks */,
175 | );
176 | name = Frameworks;
177 | sourceTree = "";
178 | };
179 | E50310D117E9986500C2F226 /* Other Frameworks */ = {
180 | isa = PBXGroup;
181 | children = (
182 | E50310D217E9986500C2F226 /* AppKit.framework */,
183 | E50310D317E9986500C2F226 /* CoreData.framework */,
184 | E50310D417E9986500C2F226 /* Foundation.framework */,
185 | );
186 | name = "Other Frameworks";
187 | sourceTree = "";
188 | };
189 | E50310D517E9986500C2F226 /* MacWallet */ = {
190 | isa = PBXGroup;
191 | children = (
192 | E548C6F61802BFFB00976CD7 /* Transaction */,
193 | E548C6EF1802BFE600976CD7 /* SendCoins */,
194 | E548C6EB1802BF9F00976CD7 /* Ticker */,
195 | E5E2CCBC17FC98A9003EBA11 /* Preferences */,
196 | E50310E417E9986600C2F226 /* MainMenu.xib */,
197 | E50310E117E9986600C2F226 /* MWAppDelegate.h */,
198 | E50310E217E9986600C2F226 /* MWAppDelegate.m */,
199 | E5C359D017F1DFC200BA394E /* res */,
200 | E50310D617E9986500C2F226 /* Supporting Files */,
201 | );
202 | path = MacWallet;
203 | sourceTree = "";
204 | };
205 | E50310D617E9986500C2F226 /* Supporting Files */ = {
206 | isa = PBXGroup;
207 | children = (
208 | E579C0AB1802CD7C00D8B61D /* sparkle_update_dsa_pub.pem */,
209 | E50310D717E9986500C2F226 /* MacWallet-Info.plist */,
210 | E50310D817E9986500C2F226 /* InfoPlist.strings */,
211 | E50310DB17E9986500C2F226 /* main.m */,
212 | E50310DD17E9986600C2F226 /* MacWallet-Prefix.pch */,
213 | E50310DE17E9986600C2F226 /* Credits.rtf */,
214 | E508D65A17FB26A700CC3CF9 /* Localizable.strings */,
215 | E504D80117FDA4B500F94081 /* tickers.plist */,
216 | );
217 | name = "Supporting Files";
218 | sourceTree = "";
219 | };
220 | E548C6EB1802BF9F00976CD7 /* Ticker */ = {
221 | isa = PBXGroup;
222 | children = (
223 | E548C6EC1802BFB400976CD7 /* MWTickerController.h */,
224 | E548C6ED1802BFB400976CD7 /* MWTickerController.m */,
225 | );
226 | path = Ticker;
227 | sourceTree = "";
228 | };
229 | E548C6EF1802BFE600976CD7 /* SendCoins */ = {
230 | isa = PBXGroup;
231 | children = (
232 | E548C6F01802BFE600976CD7 /* MWSendCoinsWindowController.h */,
233 | E548C6F11802BFE600976CD7 /* MWSendCoinsWindowController.m */,
234 | E548C6F21802BFE600976CD7 /* MWSendCoinsWindowControllerDelegate.h */,
235 | E548C6F31802BFE600976CD7 /* SendCoinsWindow.xib */,
236 | );
237 | path = SendCoins;
238 | sourceTree = "";
239 | };
240 | E548C6F61802BFFB00976CD7 /* Transaction */ = {
241 | isa = PBXGroup;
242 | children = (
243 | E548C6F71802BFFB00976CD7 /* MWTransactionDetailsWindowController.h */,
244 | E548C6F81802BFFB00976CD7 /* MWTransactionDetailsWindowController.m */,
245 | E548C6F91802BFFB00976CD7 /* MWTransactionDetailsWindowController.xib */,
246 | E548C6FA1802BFFB00976CD7 /* MWTransactionMenuItem.h */,
247 | E548C6FB1802BFFB00976CD7 /* MWTransactionMenuItem.m */,
248 | E548C6FC1802BFFB00976CD7 /* MWTransactionsWindowController.h */,
249 | E548C6FD1802BFFB00976CD7 /* MWTransactionsWindowController.m */,
250 | E548C6FE1802BFFB00976CD7 /* MWTransactionsWindowController.xib */,
251 | );
252 | path = Transaction;
253 | sourceTree = "";
254 | };
255 | E5B838FE17F9FEE5004FBBB5 /* vendor */ = {
256 | isa = PBXGroup;
257 | children = (
258 | E5E2CCCB17FC9A7D003EBA11 /* LaunchAtLoginController.h */,
259 | E5E2CCCC17FC9A7D003EBA11 /* LaunchAtLoginController.m */,
260 | E5B838FF17F9FEED004FBBB5 /* RHKeychain.h */,
261 | E5B8390017F9FEED004FBBB5 /* RHKeychain.m */,
262 | );
263 | name = vendor;
264 | sourceTree = "";
265 | };
266 | E5C359D017F1DFC200BA394E /* res */ = {
267 | isa = PBXGroup;
268 | children = (
269 | E504D7FF17FDA0A300F94081 /* wallet.png */,
270 | E504D7FD17FDA09D00F94081 /* settings.png */,
271 | E5C359D517F1DFDE00BA394E /* TrustedCheckmark.png */,
272 | E5C359D217F1DFC200BA394E /* TrustedCheckmark@2x.png */,
273 | E528E90E17FAB7B800BF4BAD /* Questionmark.png */,
274 | E528E90F17FAB7B800BF4BAD /* Questionmark@2x.png */,
275 | );
276 | path = res;
277 | sourceTree = SOURCE_ROOT;
278 | };
279 | E5D2F47417F447DB00A214F4 /* Products */ = {
280 | isa = PBXGroup;
281 | children = (
282 | E5D2F47817F447DB00A214F4 /* BitcoinJKit.framework */,
283 | );
284 | name = Products;
285 | sourceTree = "";
286 | };
287 | E5E2CCBC17FC98A9003EBA11 /* Preferences */ = {
288 | isa = PBXGroup;
289 | children = (
290 | E504D7F317FD843100F94081 /* MWPreferenceWalletViewController.h */,
291 | E504D7F417FD843100F94081 /* MWPreferenceWalletViewController.m */,
292 | E504D7F517FD843100F94081 /* MWPreferenceWalletViewController.xib */,
293 | E5E2CCBE17FC98B3003EBA11 /* MWPreferenceGeneralViewController.h */,
294 | E5E2CCBF17FC98B3003EBA11 /* MWPreferenceGeneralViewController.m */,
295 | E5E2CCC017FC98B3003EBA11 /* MWPreferenceGeneralViewController.xib */,
296 | E5E2CCC217FC98B3003EBA11 /* RHPreferences.h */,
297 | E5E2CCC317FC98B3003EBA11 /* RHPreferencesWindowController.h */,
298 | E5E2CCC417FC98B3003EBA11 /* RHPreferencesWindowController.m */,
299 | E5E2CCC517FC98B3003EBA11 /* RHPreferencesWindow.xib */,
300 | );
301 | path = Preferences;
302 | sourceTree = "";
303 | };
304 | /* End PBXGroup section */
305 |
306 | /* Begin PBXNativeTarget section */
307 | E50310CB17E9986500C2F226 /* MacWallet */ = {
308 | isa = PBXNativeTarget;
309 | buildConfigurationList = E50310E917E9986600C2F226 /* Build configuration list for PBXNativeTarget "MacWallet" */;
310 | buildPhases = (
311 | E50310C817E9986500C2F226 /* Sources */,
312 | E50310C917E9986500C2F226 /* Frameworks */,
313 | E50310CA17E9986500C2F226 /* Resources */,
314 | E503242A17E9998A00C2F226 /* CopyFiles */,
315 | );
316 | buildRules = (
317 | );
318 | dependencies = (
319 | );
320 | name = MacWallet;
321 | productName = MacWallet;
322 | productReference = E50310CC17E9986500C2F226 /* MacWallet.app */;
323 | productType = "com.apple.product-type.application";
324 | };
325 | /* End PBXNativeTarget section */
326 |
327 | /* Begin PBXProject section */
328 | E50310C417E9986500C2F226 /* Project object */ = {
329 | isa = PBXProject;
330 | attributes = {
331 | CLASSPREFIX = BA;
332 | LastUpgradeCheck = 0500;
333 | ORGANIZATIONNAME = "include7 AG";
334 | };
335 | buildConfigurationList = E50310C717E9986500C2F226 /* Build configuration list for PBXProject "MacWallet" */;
336 | compatibilityVersion = "Xcode 3.2";
337 | developmentRegion = English;
338 | hasScannedForEncodings = 0;
339 | knownRegions = (
340 | en,
341 | );
342 | mainGroup = E50310C317E9986500C2F226;
343 | productRefGroup = E50310CD17E9986500C2F226 /* Products */;
344 | projectDirPath = "";
345 | projectReferences = (
346 | {
347 | ProductGroup = E5D2F47417F447DB00A214F4 /* Products */;
348 | ProjectRef = E5D2F47317F447DB00A214F4 /* BitcoinJKit.xcodeproj */;
349 | },
350 | );
351 | projectRoot = "";
352 | targets = (
353 | E50310CB17E9986500C2F226 /* MacWallet */,
354 | );
355 | };
356 | /* End PBXProject section */
357 |
358 | /* Begin PBXReferenceProxy section */
359 | E5D2F47817F447DB00A214F4 /* BitcoinJKit.framework */ = {
360 | isa = PBXReferenceProxy;
361 | fileType = wrapper.framework;
362 | path = BitcoinJKit.framework;
363 | remoteRef = E5D2F47717F447DB00A214F4 /* PBXContainerItemProxy */;
364 | sourceTree = BUILT_PRODUCTS_DIR;
365 | };
366 | /* End PBXReferenceProxy section */
367 |
368 | /* Begin PBXResourcesBuildPhase section */
369 | E50310CA17E9986500C2F226 /* Resources */ = {
370 | isa = PBXResourcesBuildPhase;
371 | buildActionMask = 2147483647;
372 | files = (
373 | E50310DA17E9986500C2F226 /* InfoPlist.strings in Resources */,
374 | E579C0AC1802CD7C00D8B61D /* sparkle_update_dsa_pub.pem in Resources */,
375 | E5C359D417F1DFC200BA394E /* TrustedCheckmark@2x.png in Resources */,
376 | E548C6F51802BFE600976CD7 /* SendCoinsWindow.xib in Resources */,
377 | E50310E017E9986600C2F226 /* Credits.rtf in Resources */,
378 | E504D80017FDA0A300F94081 /* wallet.png in Resources */,
379 | E548C7001802BFFB00976CD7 /* MWTransactionDetailsWindowController.xib in Resources */,
380 | E504D7F717FD843100F94081 /* MWPreferenceWalletViewController.xib in Resources */,
381 | E508D65817FB26A700CC3CF9 /* Localizable.strings in Resources */,
382 | E5C359D617F1DFDE00BA394E /* TrustedCheckmark.png in Resources */,
383 | E528E91117FAB7B800BF4BAD /* Questionmark@2x.png in Resources */,
384 | E579C0AF1802DAC800D8B61D /* New icon.icns in Resources */,
385 | E5E2CCCA17FC98B3003EBA11 /* RHPreferencesWindow.xib in Resources */,
386 | E528E91017FAB7B800BF4BAD /* Questionmark.png in Resources */,
387 | E504D80217FDA4B500F94081 /* tickers.plist in Resources */,
388 | E50310E617E9986600C2F226 /* MainMenu.xib in Resources */,
389 | E579C0B11802DCE300D8B61D /* icon.png in Resources */,
390 | E548C7031802BFFB00976CD7 /* MWTransactionsWindowController.xib in Resources */,
391 | E504D7FE17FDA09D00F94081 /* settings.png in Resources */,
392 | E5E2CCC717FC98B3003EBA11 /* MWPreferenceGeneralViewController.xib in Resources */,
393 | );
394 | runOnlyForDeploymentPostprocessing = 0;
395 | };
396 | /* End PBXResourcesBuildPhase section */
397 |
398 | /* Begin PBXSourcesBuildPhase section */
399 | E50310C817E9986500C2F226 /* Sources */ = {
400 | isa = PBXSourcesBuildPhase;
401 | buildActionMask = 2147483647;
402 | files = (
403 | E548C7021802BFFB00976CD7 /* MWTransactionsWindowController.m in Sources */,
404 | E5E2CCC617FC98B3003EBA11 /* MWPreferenceGeneralViewController.m in Sources */,
405 | E504D7F617FD843100F94081 /* MWPreferenceWalletViewController.m in Sources */,
406 | E5E2CCCD17FC9A7D003EBA11 /* LaunchAtLoginController.m in Sources */,
407 | E548C6EE1802BFB400976CD7 /* MWTickerController.m in Sources */,
408 | E548C6F41802BFE600976CD7 /* MWSendCoinsWindowController.m in Sources */,
409 | E5B8390117F9FEED004FBBB5 /* RHKeychain.m in Sources */,
410 | E548C7011802BFFB00976CD7 /* MWTransactionMenuItem.m in Sources */,
411 | E50310DC17E9986500C2F226 /* main.m in Sources */,
412 | E548C6FF1802BFFB00976CD7 /* MWTransactionDetailsWindowController.m in Sources */,
413 | E5E2CCC917FC98B3003EBA11 /* RHPreferencesWindowController.m in Sources */,
414 | E50310E317E9986600C2F226 /* MWAppDelegate.m in Sources */,
415 | );
416 | runOnlyForDeploymentPostprocessing = 0;
417 | };
418 | /* End PBXSourcesBuildPhase section */
419 |
420 | /* Begin PBXVariantGroup section */
421 | E50310D817E9986500C2F226 /* InfoPlist.strings */ = {
422 | isa = PBXVariantGroup;
423 | children = (
424 | E50310D917E9986500C2F226 /* en */,
425 | );
426 | name = InfoPlist.strings;
427 | sourceTree = "";
428 | };
429 | E50310DE17E9986600C2F226 /* Credits.rtf */ = {
430 | isa = PBXVariantGroup;
431 | children = (
432 | E50310DF17E9986600C2F226 /* en */,
433 | );
434 | name = Credits.rtf;
435 | sourceTree = "";
436 | };
437 | E50310E417E9986600C2F226 /* MainMenu.xib */ = {
438 | isa = PBXVariantGroup;
439 | children = (
440 | E50310E517E9986600C2F226 /* en */,
441 | );
442 | name = MainMenu.xib;
443 | sourceTree = "";
444 | };
445 | E508D65A17FB26A700CC3CF9 /* Localizable.strings */ = {
446 | isa = PBXVariantGroup;
447 | children = (
448 | E508D65917FB26A700CC3CF9 /* en */,
449 | );
450 | name = Localizable.strings;
451 | sourceTree = "";
452 | };
453 | /* End PBXVariantGroup section */
454 |
455 | /* Begin XCBuildConfiguration section */
456 | E50310E717E9986600C2F226 /* Debug */ = {
457 | isa = XCBuildConfiguration;
458 | buildSettings = {
459 | ALWAYS_SEARCH_USER_PATHS = NO;
460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
461 | CLANG_CXX_LIBRARY = "libc++";
462 | CLANG_ENABLE_OBJC_ARC = YES;
463 | CLANG_WARN_CONSTANT_CONVERSION = YES;
464 | CLANG_WARN_EMPTY_BODY = YES;
465 | CLANG_WARN_ENUM_CONVERSION = YES;
466 | CLANG_WARN_INT_CONVERSION = YES;
467 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
468 | COPY_PHASE_STRIP = NO;
469 | GCC_C_LANGUAGE_STANDARD = gnu99;
470 | GCC_DYNAMIC_NO_PIC = NO;
471 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
472 | GCC_OPTIMIZATION_LEVEL = 0;
473 | GCC_PREPROCESSOR_DEFINITIONS = (
474 | "DEBUG=1",
475 | "$(inherited)",
476 | );
477 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
478 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
479 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
480 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
481 | GCC_WARN_UNUSED_VARIABLE = YES;
482 | MACOSX_DEPLOYMENT_TARGET = 10.7;
483 | ONLY_ACTIVE_ARCH = YES;
484 | SDKROOT = macosx10.7;
485 | };
486 | name = Debug;
487 | };
488 | E50310E817E9986600C2F226 /* Release */ = {
489 | isa = XCBuildConfiguration;
490 | buildSettings = {
491 | ALWAYS_SEARCH_USER_PATHS = NO;
492 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
493 | CLANG_CXX_LIBRARY = "libc++";
494 | CLANG_ENABLE_OBJC_ARC = YES;
495 | CLANG_WARN_CONSTANT_CONVERSION = YES;
496 | CLANG_WARN_EMPTY_BODY = YES;
497 | CLANG_WARN_ENUM_CONVERSION = YES;
498 | CLANG_WARN_INT_CONVERSION = YES;
499 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
500 | COPY_PHASE_STRIP = YES;
501 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
502 | GCC_C_LANGUAGE_STANDARD = gnu99;
503 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
504 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
505 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
506 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
507 | GCC_WARN_UNUSED_VARIABLE = YES;
508 | MACOSX_DEPLOYMENT_TARGET = 10.7;
509 | SDKROOT = macosx10.7;
510 | };
511 | name = Release;
512 | };
513 | E50310EA17E9986600C2F226 /* Debug */ = {
514 | isa = XCBuildConfiguration;
515 | buildSettings = {
516 | COMBINE_HIDPI_IMAGES = YES;
517 | FRAMEWORK_SEARCH_PATHS = (
518 | "$(inherited)",
519 | /Users/jonasschnelli/Documents/bitcoin/MacWalletApp/vendor,
520 | );
521 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
522 | GCC_PREFIX_HEADER = "MacWallet/MacWallet-Prefix.pch";
523 | INFOPLIST_FILE = "MacWallet/MacWallet-Info.plist";
524 | PRODUCT_NAME = MacWallet;
525 | WRAPPER_EXTENSION = app;
526 | };
527 | name = Debug;
528 | };
529 | E50310EB17E9986600C2F226 /* Release */ = {
530 | isa = XCBuildConfiguration;
531 | buildSettings = {
532 | COMBINE_HIDPI_IMAGES = YES;
533 | FRAMEWORK_SEARCH_PATHS = (
534 | "$(inherited)",
535 | /Users/jonasschnelli/Documents/bitcoin/MacWalletApp/vendor,
536 | );
537 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
538 | GCC_PREFIX_HEADER = "MacWallet/MacWallet-Prefix.pch";
539 | INFOPLIST_FILE = "MacWallet/MacWallet-Info.plist";
540 | PRODUCT_NAME = MacWallet;
541 | WRAPPER_EXTENSION = app;
542 | };
543 | name = Release;
544 | };
545 | /* End XCBuildConfiguration section */
546 |
547 | /* Begin XCConfigurationList section */
548 | E50310C717E9986500C2F226 /* Build configuration list for PBXProject "MacWallet" */ = {
549 | isa = XCConfigurationList;
550 | buildConfigurations = (
551 | E50310E717E9986600C2F226 /* Debug */,
552 | E50310E817E9986600C2F226 /* Release */,
553 | );
554 | defaultConfigurationIsVisible = 0;
555 | defaultConfigurationName = Release;
556 | };
557 | E50310E917E9986600C2F226 /* Build configuration list for PBXNativeTarget "MacWallet" */ = {
558 | isa = XCConfigurationList;
559 | buildConfigurations = (
560 | E50310EA17E9986600C2F226 /* Debug */,
561 | E50310EB17E9986600C2F226 /* Release */,
562 | );
563 | defaultConfigurationIsVisible = 0;
564 | defaultConfigurationName = Release;
565 | };
566 | /* End XCConfigurationList section */
567 | };
568 | rootObject = E50310C417E9986500C2F226 /* Project object */;
569 | }
570 |
--------------------------------------------------------------------------------