• R/O
  • SSH
  • HTTPS

bathyscaphe: Commit


Commit MetaInfo

Revision1810 (tree)
Time2015-02-27 02:05:00
Authortsawada2

Log Message

Sync after choose bbsmenu URL

Change Summary

Incremental Difference

--- bathyscaphe/trunk/application/Info-bathyscaphe.plist (revision 1809)
+++ bathyscaphe/trunk/application/Info-bathyscaphe.plist (revision 1810)
@@ -87,7 +87,7 @@
8787 </dict>
8888 </array>
8989 <key>CFBundleVersion</key>
90- <string>772</string>
90+ <string>773</string>
9191 <key>LSMinimumSystemVersion</key>
9292 <string>10.7.5</string>
9393 <key>NSAppleScriptEnabled</key>
--- bathyscaphe/trunk/application/source/browser/AddBoardSheetController.m (revision 1809)
+++ bathyscaphe/trunk/application/source/browser/AddBoardSheetController.m (revision 1810)
@@ -28,74 +28,71 @@
2828 return kABSLocalizableStringsFileNameKey;
2929 }
3030
31-- (id) init
31+- (id)init
3232 {
33- if (self = [super initWithWindowNibName : kABSNibFileNameKey]) {
33+ if (self = [super initWithWindowNibName:kABSNibFileNameKey]) {
3434 ;
3535 }
3636 return self;
3737 }
3838
39-- (void) dealloc
39+- (void)dealloc
4040 {
41- [[NSNotificationCenter defaultCenter] removeObserver : self];
41+ [[NSNotificationCenter defaultCenter] removeObserver:self];
4242 [_currentSearchStr release];
4343 [super dealloc];
4444 }
4545
46-- (void) awakeFromNib
46+- (void)awakeFromNib
4747 {
48- [[NSNotificationCenter defaultCenter]
49- addObserver : self
50- selector : @selector(boardListDidChange:)
51- name : CMRBBSListDidChangeNotification
52- object : [[BoardManager defaultManager] defaultList]];
48+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boardListDidChange:) name:CMRBBSListDidChangeNotification object:[[BoardManager defaultManager] defaultList]];
49+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(defaultListDidSync:) name:BoardWarriorDidFinishSyncingNotification object:[BoardWarrior warrior]];
5350
54- [[self defaultListOLView] setDataSource : [[BoardManager defaultManager] defaultList]];
55- [[self defaultListOLView] setAutoresizesOutlineColumn : NO];
56- [[self defaultListOLView] setVerticalMotionCanBeginDrag : NO];
57- [[self defaultListOLView] setDoubleAction: @selector(doAddAndClose:)];
58- [[self OKButton] setEnabled : NO];
51+ [[self defaultListOLView] setDataSource:[[BoardManager defaultManager] defaultList]];
52+ [[self defaultListOLView] setAutoresizesOutlineColumn:NO];
53+ [[self defaultListOLView] setVerticalMotionCanBeginDrag:NO];
54+ [[self defaultListOLView] setDoubleAction:@selector(doAddAndClose:)];
55+ [[self OKButton] setEnabled:NO];
5956 }
6057
6158 #pragma mark Accessors
6259
63-- (NSOutlineView *) defaultListOLView
60+- (NSOutlineView *)defaultListOLView
6461 {
6562 return m_defaultListOLView;
6663 }
67-- (NSSearchField *) searchField
64+- (NSSearchField *)searchField
6865 {
6966 return m_searchField;
7067 }
7168
72-- (NSTextFieldCell *) brdNameField
69+- (NSTextFieldCell *)brdNameField
7370 {
7471 return m_brdNameField;
7572 }
76-- (NSTextFieldCell *) brdURLField
73+- (NSTextFieldCell *)brdURLField
7774 {
7875 return m_brdURLField;
7976 }
8077
81-- (NSButton *) OKButton
78+- (NSButton *)OKButton
8279 {
8380 return m_OKButton;
8481 }
85-- (NSButton *) cancelButton
82+- (NSButton *)cancelButton
8683 {
8784 return m_cancelButton;
8885 }
89-- (NSButton *) helpButton
86+- (NSButton *)helpButton
9087 {
9188 return m_helpButton;
9289 }
9390
94-- (NSString *) currentSearchStr
91+- (NSString *)currentSearchStr
9592 {
9693 return _currentSearchStr;
9794 }
98-- (void) setCurrentSearchStr : (NSString *) newStr
95+- (void)setCurrentSearchStr:(NSString *)newStr
9996 {
10097 [newStr retain];
10198 [_currentSearchStr release];
@@ -104,7 +101,7 @@
104101
105102 #pragma mark IBActions
106103
107-- (IBAction) searchBoards : (id) sender
104+- (IBAction)searchBoards:(id)sender
108105 {
109106 [self showMatchedItemsWithCurrentSearchStr];
110107 }
@@ -114,9 +111,8 @@
114111 [[NSHelpManager sharedHelpManager] openHelpAnchor:[self localizedString:@"Boards list"] inBook:[NSBundle applicationHelpBookName]];
115112 }
116113
117-- (IBAction)syncDefaultList:(id)sender;
114+- (IBAction)syncDefaultList:(id)sender
118115 {
119- [[BoardWarrior warrior] setDelegate:self];
120116 [[BoardWarrior warrior] syncBoardLists];
121117 }
122118
@@ -125,17 +121,6 @@
125121 [[CMRPref sharedPreferencesPane] showPreferencesPaneWithIdentifier:PPAdvancedPreferencesIdentifier];
126122 }
127123
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-
139124 - (IBAction) close : (id) sender
140125 {
141126 [NSApp endSheet : [self window]
@@ -418,4 +403,9 @@
418403 [self showMatchedItemsWithCurrentSearchStr];
419404 }
420405 }
406+
407+- (void)defaultListDidSync:(NSNotification *)notification
408+{
409+ [[self defaultListOLView] reloadData];
410+}
421411 @end
--- bathyscaphe/trunk/application/source/bbs/BoardWarrior.h (revision 1809)
+++ bathyscaphe/trunk/application/source/bbs/BoardWarrior.h (revision 1810)
@@ -3,11 +3,12 @@
33 // BathyScaphe
44 //
55 // Created by Tsutomu Sawada on 06/08/06.
6-// Copyright 2006-2010 BathyScaphe Project. All rights reserved.
6+// Copyright 2006-2015 BathyScaphe Project. All rights reserved.
77 // encoding="UTF-8"
88 //
99
1010 #import <Foundation/Foundation.h>
11+#import <AppKit/NSApplication.h> // For NSModalSession...
1112
1213 @class BSURLDownload, BSModalStatusWindowController;
1314
@@ -49,3 +50,5 @@
4950 @end
5051
5152 extern NSString *const kBoardWarriorErrorDomain;
53+
54+extern NSString *const BoardWarriorDidFinishSyncingNotification;
--- bathyscaphe/trunk/application/source/bbs/BoardWarrior.m (revision 1809)
+++ bathyscaphe/trunk/application/source/bbs/BoardWarrior.m (revision 1810)
@@ -3,7 +3,7 @@
33 // BathyScaphe
44 //
55 // Created by Tsutomu Sawada on 06/08/06.
6-// Copyright 2006-2014 BathyScaphe Project. All rights reserved.
6+// Copyright 2006-2015 BathyScaphe Project. All rights reserved.
77 // encoding="UTF-8"
88 //
99
@@ -19,6 +19,8 @@
1919
2020 NSString *const kBoardWarriorErrorDomain = @"BoardWarriorErrorDomain";
2121
22+NSString *const BoardWarriorDidFinishSyncingNotification = @"jp.tsawada2.BathyScaphe.BoardWarriorDidFinishSyncingNotification";
23+
2224 static NSString *const kBWLocalizedStringsTableName = @"BoardWarrior";
2325
2426 //static NSString *const kBWLogFolderName = @"Logs";
@@ -297,6 +299,7 @@
297299 if ([self delegateRespondsToSelector:@selector(warriorDidFinishSyncing:)]) {
298300 [[self delegate] warriorDidFinishSyncing:self];
299301 }
302+ UTILNotifyName(BoardWarriorDidFinishSyncingNotification);
300303 }
301304
302305 - (BOOL)createLogFileIfNeededAtPath:(NSString *)filePath
--- bathyscaphe/trunk/application/Info-preferences.plist (revision 1809)
+++ bathyscaphe/trunk/application/Info-preferences.plist (revision 1810)
@@ -21,7 +21,7 @@
2121 <key>CFBundleSignature</key>
2222 <string>????</string>
2323 <key>CFBundleVersion</key>
24- <string>120</string>
24+ <string>121</string>
2525 <key>NSHumanReadableCopyright</key>
2626 <string>© 2005-2015 tsawada2 &amp; BathyScaphe Project</string>
2727 <key>NSMainNibFile</key>
--- bathyscaphe/trunk/application/subproj/preference/AdvancedPrefController.m (revision 1809)
+++ bathyscaphe/trunk/application/subproj/preference/AdvancedPrefController.m (revision 1810)
@@ -14,7 +14,11 @@
1414 static NSString *const kAdvancedPaneToolTipKey = @"Advanced ToolTip";
1515 static NSString *const kAdvancedPaneHelpAnchorKey = @"Help_Advanced";
1616
17+@interface NSObject(CMRAppDelegateStub)
18+- (void)runBoardWarrior:(id)sender;
19+@end
1720
21+
1822 @implementation AdvancedPrefController
1923 - (NSString *)mainNibName
2024 {
@@ -53,8 +57,22 @@
5357 return;
5458 }
5559
56- [[self preferences] setBBSMenuURL:[NSURL URLWithString:typedText]];
60+ [[self preferences] setBBSMenuURL:[NSURL URLWithString:typedText]];
61+ [self performSelector:@selector(showConfirmSyncAlert:) withObject:sender afterDelay:0.3];
5762 }
63+
64+- (void)showConfirmSyncAlert:(id)sender
65+{
66+ NSAlert *alert = [[[NSAlert alloc] init] autorelease];
67+ [alert setAlertStyle:NSInformationalAlertStyle];
68+ [alert setMessageText:PPLocalizedString(@"Confirm Sync Alert Message")];
69+ [alert setInformativeText:PPLocalizedString(@"Confirm Sync Alert Informative")];
70+ [alert addButtonWithTitle:PPLocalizedString(@"Confirm Sync Alert OK")];
71+ [alert addButtonWithTitle:PPLocalizedString(@"Confirm Sync Alert Not Yet")];
72+ if ([alert runModal] == NSAlertFirstButtonReturn) {
73+ [[NSApp delegate] runBoardWarrior:sender];
74+ }
75+}
5876 @end
5977
6078
--- bathyscaphe/trunk/changelog.txt (revision 1809)
+++ bathyscaphe/trunk/changelog.txt (revision 1810)
@@ -1,3 +1,9 @@
1+2015-02-27 tsawada2 <tsawada2@users.sourceforge.jp>
2+ * application/source/bbs/BoardWarrior.m
3+ * application/source/browser/AddBoardSheetController.m
4+ * application/subproj/preference/AdvancedPrefController.m
5+ * application/subproj/preference/ja.lproj/Localizable.strings
6+ 「詳細」環境設定で掲示板リストの同期先を変更した際、すぐに同期が行えるようにした。
17 2015-02-26 tsawada2 <tsawada2@users.sourceforge.jp>
28 * application/source/manager/BSSSSPIconManager.m
39 * application/source/preferences/AppDefaults-BoardWarrior.m
Show on old repository browser