Addboard sheet update
@@ -1,9 +1,9 @@ | ||
1 | 1 | // |
2 | -// $Id: AddBoardSheetController.h,v 1.7 2007-12-19 13:20:40 tsawada2 Exp $ | |
2 | +// AddBoardSheetController.h | |
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Created by Tsutomu Sawada on 05/10/12. |
6 | -// Copyright 2005-2006 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2005-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // |
8 | 8 | |
9 | 9 | #import <Cocoa/Cocoa.h> |
@@ -51,6 +51,9 @@ | ||
51 | 51 | - (IBAction) close : (id) sender; |
52 | 52 | - (IBAction) doAddAndClose : (id) sender; |
53 | 53 | |
54 | +- (IBAction)syncDefaultList:(id)sender; | |
55 | +- (IBAction)openAdvancedPref:(id)sender; | |
56 | + | |
54 | 57 | - (BOOL) addToUserListFromOLView : (id) sender; |
55 | 58 | - (BOOL) addToUserListFromForm : (id) sender; |
56 | 59 |
@@ -3,7 +3,7 @@ | ||
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Created by Tsutomu Sawada on 05/10/12. |
6 | -// Copyright 2005-2013 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2005-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // encoding="UTF-8" |
8 | 8 | // |
9 | 9 |
@@ -12,6 +12,8 @@ | ||
12 | 12 | #import "SmartBoardList.h" |
13 | 13 | #import "BoardManager.h" |
14 | 14 | #import "DatabaseManager.h" |
15 | +#import "BoardWarrior.h" | |
16 | +#import "AppDefaults.h" | |
15 | 17 | |
16 | 18 | |
17 | 19 | static NSString *const kABSNibFileNameKey = @"AddBoardSheet"; |
@@ -112,6 +114,28 @@ | ||
112 | 114 | [[NSHelpManager sharedHelpManager] openHelpAnchor:[self localizedString:@"Boards list"] inBook:[NSBundle applicationHelpBookName]]; |
113 | 115 | } |
114 | 116 | |
117 | +- (IBAction)syncDefaultList:(id)sender; | |
118 | +{ | |
119 | + [[BoardWarrior warrior] setDelegate:self]; | |
120 | + [[BoardWarrior warrior] syncBoardLists]; | |
121 | +} | |
122 | + | |
123 | +- (IBAction)openAdvancedPref:(id)sender; | |
124 | +{ | |
125 | + [[CMRPref sharedPreferencesPane] showPreferencesPaneWithIdentifier:PPAdvancedPreferencesIdentifier]; | |
126 | +} | |
127 | + | |
128 | +- (void)warriorDidFinishSyncing:(BoardWarrior *)warrior | |
129 | +{ | |
130 | + [[self defaultListOLView] reloadData]; | |
131 | + [warrior setDelegate:nil]; | |
132 | +} | |
133 | + | |
134 | +- (void)warrior:(BoardWarrior *)warrior didFailSync:(NSError *)error | |
135 | +{ | |
136 | + [warrior setDelegate:nil]; | |
137 | +} | |
138 | + | |
115 | 139 | - (IBAction) close : (id) sender |
116 | 140 | { |
117 | 141 | [NSApp endSheet : [self window] |
@@ -3,7 +3,7 @@ | ||
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Created by Tsutomu Sawada on 11/06/06. |
6 | -// Copyright 2011 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2011-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // encoding="UTF-8" |
8 | 8 | // |
9 | 9 |
@@ -12,7 +12,7 @@ | ||
12 | 12 | |
13 | 13 | static NSString *const AppDefaultsBWSettingsKey = @"Preferences - BoardWarrior"; |
14 | 14 | |
15 | -//static NSString *const kBWBBSMenuURLKey = @"BoardWarrior:bbsmenu URL"; | |
15 | +static NSString *const kBWBBSMenuURLKey = @"BoardWarrior:bbsmenu html URL"; | |
16 | 16 | static NSString *const kBWAutoSyncBoardListKey = @"BoardWarrior:Auto Sync"; |
17 | 17 | //static NSString *const kBWAutoSyncIntervalKey = @"BoardWarrior:Auto Sync Interval"; |
18 | 18 | static NSString *const kBWLastSyncDateKey = @"BoardWarrior:Last Sync Date"; |
@@ -35,12 +35,17 @@ | ||
35 | 35 | |
36 | 36 | - (NSURL *)BBSMenuURL |
37 | 37 | { |
38 | - return [NSURL URLWithString:DEFAULT_BW_BBSMENU_URL]; | |
38 | + NSString *urlString = [[self boardWarriorSettingsDictionary] objectForKey:kBWBBSMenuURLKey defaultObject:DEFAULT_BW_BBSMENU_URL]; | |
39 | + return [NSURL URLWithString:urlString]; | |
39 | 40 | } |
40 | 41 | |
41 | 42 | - (void)setBBSMenuURL:(NSURL *)anURL |
42 | 43 | { |
43 | - [self doesNotRecognizeSelector:_cmd]; | |
44 | + NSString *urlString = [anURL absoluteString]; | |
45 | + if (!urlString) { | |
46 | + ; | |
47 | + } | |
48 | + [[self boardWarriorSettingsDictionary] setObject:urlString forKey:kBWBBSMenuURLKey]; | |
44 | 49 | } |
45 | 50 | |
46 | 51 | - (BOOL)autoSyncBoardList |
@@ -563,7 +563,7 @@ | ||
563 | 563 | /* MeteorSweeper Additions */ |
564 | 564 | @interface AppDefaults(BoardWarriorSupport) |
565 | 565 | - (NSURL *)BBSMenuURL; |
566 | -//- (void)setBBSMenuURL:(NSURL *)anURL; | |
566 | +- (void)setBBSMenuURL:(NSURL *)anURL; | |
567 | 567 | |
568 | 568 | - (BOOL)autoSyncBoardList; |
569 | 569 | - (void)setAutoSyncBoardList:(BOOL)autoSync; |
@@ -17,11 +17,11 @@ | ||
17 | 17 | <key>CFBundlePackageType</key> |
18 | 18 | <string>BNDL</string> |
19 | 19 | <key>CFBundleShortVersionString</key> |
20 | - <string>2.4.3</string> | |
20 | + <string>2.4.4</string> | |
21 | 21 | <key>CFBundleSignature</key> |
22 | 22 | <string>????</string> |
23 | 23 | <key>CFBundleVersion</key> |
24 | - <string>118</string> | |
24 | + <string>120</string> | |
25 | 25 | <key>NSHumanReadableCopyright</key> |
26 | 26 | <string>© 2005-2015 tsawada2 & BathyScaphe Project</string> |
27 | 27 | <key>NSMainNibFile</key> |
@@ -3,7 +3,7 @@ | ||
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Created by tsawada2 on 05/05/22. |
6 | -// Copyright 2005-2007 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2005-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // encoding="UTF-8" |
8 | 8 | // |
9 | 9 |
@@ -10,10 +10,10 @@ | ||
10 | 10 | #import "PreferencesController.h" |
11 | 11 | |
12 | 12 | @interface AdvancedPrefController : PreferencesController { |
13 | -// IBOutlet NSComboBox *m_bbsMenuURLChooser; | |
13 | + IBOutlet NSComboBox *m_bbsMenuURLChooser; | |
14 | 14 | } |
15 | 15 | |
16 | -//- (NSComboBox *)bbsMenuURLChooser; | |
16 | +- (NSComboBox *)bbsMenuURLChooser; | |
17 | 17 | |
18 | -//- (IBAction)didChooseBbsMenuURL:(id)sender; | |
18 | +- (IBAction)didChooseBbsMenuURL:(id)sender; | |
19 | 19 | @end |
@@ -3,7 +3,7 @@ | ||
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Created by Tsutomu Sawada on 05/05/22. |
6 | -// Copyright 2005-2010 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2005-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // encoding="UTF-8" |
8 | 8 | // |
9 | 9 |
@@ -21,14 +21,14 @@ | ||
21 | 21 | return @"AdvancedPreferences"; |
22 | 22 | } |
23 | 23 | |
24 | -/*- (NSComboBox *)bbsMenuURLChooser | |
24 | +- (NSComboBox *)bbsMenuURLChooser | |
25 | 25 | { |
26 | 26 | return m_bbsMenuURLChooser; |
27 | -}*/ | |
27 | +} | |
28 | 28 | |
29 | 29 | - (void)updateUIComponents |
30 | 30 | { |
31 | -// [[self bbsMenuURLChooser] setStringValue:[[[self preferences] BBSMenuURL] absoluteString]]; | |
31 | + [[self bbsMenuURLChooser] setStringValue:[[[self preferences] BBSMenuURL] absoluteString]]; | |
32 | 32 | } |
33 | 33 | |
34 | 34 | - (void)setupUIComponents |
@@ -39,7 +39,7 @@ | ||
39 | 39 | [self updateUIComponents]; |
40 | 40 | } |
41 | 41 | |
42 | -/*- (IBAction)didChooseBbsMenuURL:(id)sender | |
42 | +- (IBAction)didChooseBbsMenuURL:(id)sender | |
43 | 43 | { |
44 | 44 | NSString *typedText = [sender stringValue]; |
45 | 45 | NSString *currentURLStr = [[[self preferences] BBSMenuURL] absoluteString]; |
@@ -54,7 +54,7 @@ | ||
54 | 54 | } |
55 | 55 | |
56 | 56 | [[self preferences] setBBSMenuURL:[NSURL URLWithString:typedText]]; |
57 | -}*/ | |
57 | +} | |
58 | 58 | @end |
59 | 59 | |
60 | 60 |
@@ -87,7 +87,7 @@ | ||
87 | 87 | </dict> |
88 | 88 | </array> |
89 | 89 | <key>CFBundleVersion</key> |
90 | - <string>768</string> | |
90 | + <string>770</string> | |
91 | 91 | <key>LSMinimumSystemVersion</key> |
92 | 92 | <string>10.7.5</string> |
93 | 93 | <key>NSAppleScriptEnabled</key> |
@@ -1,3 +1,13 @@ | ||
1 | +2015-02-22 tsawada2 <tsawada2@users.sourceforge.jp> | |
2 | + * application/Resources/ja.lproj/AddBoardSheet.xib | |
3 | + * application/source/browser/AddBoardSheetController.m | |
4 | + * application/source/preferences/AppDefaults-BoardWarrior.m | |
5 | + * application/source/preferences/AppDefaults.h | |
6 | + 掲示板の追加シートから、「掲示板リストの同期」と「掲示板リストの同期先の設定」(「詳細」環境設定を開く)を | |
7 | + 行えるようにした。 | |
8 | + * application/subproj/preference/AdvancedPrefController.m | |
9 | + * application/subproj/preference/ja.lproj/AdvancedPreferences.xib | |
10 | + 「詳細」環境設定に「掲示板リストの同期先」設定を追加(正確には、復活)。プリセットは3種類。 | |
1 | 11 | 2015-02-21 tsawada2 <tsawada2@users.sourceforge.jp> |
2 | 12 | * application/source/manager/DatabaseManager-DatabaseAccess.m |
3 | 13 | 一部のデータベース操作時のエラー発生時に、-[SQLiteDB lastErrorID] がコンソールログに出力されていなかったのを改善し |