Changeset 3974
- Timestamp:
- 03/27/06 20:04:57 (3 years ago)
- Files:
-
- WiredClient/trunk/English.lproj/Files.nib/info.nib (modified) (2 diffs)
- WiredClient/trunk/English.lproj/Files.nib/keyedobjects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/Files.nib/objects.nib (modified) (previous)
- WiredClient/trunk/WCAccountEditor.m (modified) (4 diffs)
- WiredClient/trunk/WCAccounts.m (modified) (2 diffs)
- WiredClient/trunk/WCChat.m (modified) (2 diffs)
- WiredClient/trunk/WCConnectionController.h (modified) (2 diffs)
- WiredClient/trunk/WCConnectionController.m (modified) (8 diffs)
- WiredClient/trunk/WCConsole.m (modified) (1 diff)
- WiredClient/trunk/WCFileInfo.m (modified) (4 diffs)
- WiredClient/trunk/WCFiles.m (modified) (6 diffs)
- WiredClient/trunk/WCMessages.m (modified) (2 diffs)
- WiredClient/trunk/WCNews.m (modified) (2 diffs)
- WiredClient/trunk/WCPreferences.m (modified) (2 diffs)
- WiredClient/trunk/WCPreview.m (modified) (2 diffs)
- WiredClient/trunk/WCPrivateChat.m (modified) (3 diffs)
- WiredClient/trunk/WCPublicChat.m (modified) (4 diffs)
- WiredClient/trunk/WCSearch.m (modified) (2 diffs)
- WiredClient/trunk/WCServerConnection.h (modified) (1 diff)
- WiredClient/trunk/WCServerConnection.m (modified) (6 diffs)
- WiredClient/trunk/WCServerInfo.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (1 diff)
- WiredClient/trunk/WCUserInfo.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/English.lproj/Files.nib/info.nib
r3656 r3974 8 8 <dict> 9 9 <key>161</key> 10 <string> 519 158 104 99 0 0 1280 1002</string>10 <string>801 189 104 99 0 0 1920 1178 </string> 11 11 <key>190</key> 12 12 <string>844 570 190 49 0 0 1920 1178 </string> … … 18 18 <key>IBOpenObjects</key> 19 19 <array> 20 <integer>52</integer> 21 <integer>5</integer> 20 22 <integer>161</integer> 21 <integer>5</integer>22 <integer>52</integer>23 23 </array> 24 24 <key>IBSystem Version</key> 25 <string>8 G32</string>25 <string>8H14</string> 26 26 </dict> 27 27 </plist> WiredClient/trunk/WCAccountEditor.m
r3672 r3974 50 50 connection:connection]; 51 51 52 [self setReleasedWhenClosed:YES]; 52 53 [self window]; 53 54 … … 186 187 187 188 - (void)_setForAccount:(WCAccount *)account { 188 /* if([_typePopUpButton selectedItem] == _groupMenuItem)189 [_nameTextField setStringValue:[account name]];190 191 if([account type] == WCAccountUser) {192 [_passwordTextField setStringValue:[account password]];193 194 if([[account group] length] > 0)195 [_groupPopUpButton selectItemWithTitle:[account group]];196 }197 */198 189 [_getUserInfoButton setState:[account getUserInfo]]; 199 190 [_broadcastButton setState:[account broadcast]]; … … 264 255 265 256 [[self window] setTitle:[[self connection] name] withSubtitle:[self name]]; 266 [self setShouldSaveWindowSizeOnly:YES];257 267 258 [self setShouldCascadeWindows:YES]; 268 259 [self setWindowFrameAutosaveName:@"AccountEditor"]; … … 302 293 _cannotBeKickedButton, 303 294 NULL]; 304 } 305 306 307 308 - (void)windowWillClose:(NSNotification *)notification { 309 [self autorelease]; 295 296 [super windowDidLoad]; 310 297 } 311 298 WiredClient/trunk/WCAccounts.m
r3960 r3974 236 236 [iconCell release]; 237 237 238 [self setShouldCascadeWindows:NO];239 [self setWindowFrameAutosaveName:@"Accounts"];240 241 238 [_accountsTableView setDoubleAction:@selector(edit:)]; 242 239 [_accountsTableView setDeleteAction:@selector(delete:)]; 243 [_accountsTableView setAutosaveName:@"Accounts"]; 244 [_accountsTableView setAutosaveTableColumns:YES]; 240 [_accountsTableView setDefaultHighlightedTableColumnIdentifier:@"Name"]; 245 241 [[self window] makeFirstResponder:_accountsTableView]; 246 242 … … 248 244 [self _updateStatus]; 249 245 [self _validate]; 246 247 [super windowDidLoad]; 248 } 249 250 251 252 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 253 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCAccountsWindow"]]; 254 [_accountsTableView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCAccountsTableView"]]; 255 } 256 257 258 259 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 260 [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCAccountsWindow"]; 261 [windowTemplate setObject:[_accountsTableView propertiesDictionary] forKey:@"WCAccountsTableView"]; 250 262 } 251 263 WiredClient/trunk/WCChat.m
r3965 r3974 645 645 [self _update]; 646 646 [self validate]; 647 648 [super windowDidLoad]; 647 649 } 648 650 … … 651 653 - (void)windowWillClose:(NSNotification *)notification { 652 654 [_userListTableView setDataSource:NULL]; 655 } 656 657 658 659 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 660 [_userListSplitView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCChatUserListSplitView"]]; 661 [_chatSplitView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCChatSplitView"]]; 662 } 663 664 665 666 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 667 [windowTemplate setObject:[_userListSplitView propertiesDictionary] forKey:@"WCChatUserListSplitView"]; 668 [windowTemplate setObject:[_chatSplitView propertiesDictionary] forKey:@"WCChatSplitView"]; 653 669 } 654 670 WiredClient/trunk/WCConnectionController.h
r3961 r3974 33 33 34 34 BOOL _hidden; 35 BOOL _releasedWhenClosed; 35 36 } 36 37 … … 45 46 - (void)setHidden:(BOOL)value; 46 47 - (BOOL)isHidden; 48 - (void)setReleasedWhenClosed:(BOOL)value; 49 - (BOOL)isReleasedWhenClosed; 47 50 48 51 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate; WiredClient/trunk/WCConnectionController.m
r3963 r3974 54 54 55 55 if(windowTemplate) 56 _windowTemplate = [windowTemplate mutableCopy]; 57 else 56 _windowTemplate = [[windowTemplate objectForKey:[self windowNibName]] mutableCopy]; 57 58 if(!_windowTemplate) 58 59 _windowTemplate = [[NSMutableDictionary alloc] init]; 59 60 … … 64 65 65 66 - (void)_saveWindowTemplate { 67 NSMutableDictionary *windowTemplate; 68 66 69 [self windowTemplateShouldSave:_windowTemplate]; 67 70 68 if([[self connection] bookmark]) 69 [WCSettings setWindowTemplate:_windowTemplate forKey:[[[self connection] bookmark] objectForKey:WCBookmarksIdentifier]]; 70 else 71 [WCSettings setWindowTemplate:_windowTemplate forKey:[[[self connection] URL] hostpair]]; 71 windowTemplate = [[WCSettings windowTemplateForKey:[[self connection] identifier]] mutableCopy]; 72 73 if(!windowTemplate) 74 windowTemplate = [[NSMutableDictionary alloc] init]; 75 76 [windowTemplate setObject:_windowTemplate forKey:[self windowNibName]]; 77 78 [WCSettings setWindowTemplate:windowTemplate forKey:[[self connection] identifier]]; 79 80 [windowTemplate release]; 72 81 } 73 82 … … 89 98 _connection = connection; 90 99 91 [self _loadWindowTemplate]; 92 100 [_connection addObserver:self 101 selector:@selector(_connectionWillTerminate:) 102 name:WCConnectionWillTerminate]; 103 104 [_connection addObserver:self 105 selector:@selector(_connectionDidTerminate:) 106 name:WCConnectionDidTerminate]; 107 108 [_connection addObserver:self 109 selector:@selector(_serverConnectionShouldHide:) 110 name:WCServerConnectionShouldHide]; 111 112 [_connection addObserver:self 113 selector:@selector(_serverConnectionShouldUnhide:) 114 name:WCServerConnectionShouldUnhide]; 115 116 [_connection addObserver:self 117 selector:@selector(_serverConnectionShouldLoadWindowTemplate:) 118 name:WCServerConnectionShouldLoadWindowTemplate]; 119 120 [_connection addObserver:self 121 selector:@selector(_serverConnectionShouldSaveWindowTemplate:) 122 name:WCServerConnectionShouldSaveWindowTemplate]; 123 93 124 if([self respondsToSelector:@selector(connectionDidConnect:)]) { 94 125 [_connection addObserver:self … … 145 176 } 146 177 147 [_connection addObserver:self148 selector:@selector(_connectionDidTerminate:)149 name:WCConnectionDidTerminate];150 151 [_connection addObserver:self152 selector:@selector(_serverConnectionShouldHide:)153 name:WCServerConnectionShouldHide];154 155 [_connection addObserver:self156 selector:@selector(_serverConnectionShouldUnhide:)157 name:WCServerConnectionShouldUnhide];158 159 [_connection addObserver:self160 selector:@selector(_serverConnectionShouldLoadWindowTemplate:)161 name:WCServerConnectionShouldLoadWindowTemplate];162 163 [_connection addObserver:self164 selector:@selector(_serverConnectionShouldSaveWindowTemplate:)165 name:WCServerConnectionShouldSaveWindowTemplate];166 167 178 return self; 168 179 } … … 185 196 #pragma mark - 186 197 198 - (void)_WC_windowWillClose:(NSNotification *)notification { 199 if([self isReleasedWhenClosed]) { 200 [self _saveWindowTemplate]; 201 202 [self autorelease]; 203 } 204 } 205 206 207 208 - (void)_connectionWillTerminate:(NSNotification *)notification { 209 [self _saveWindowTemplate]; 210 } 211 212 213 187 214 - (void)_connectionDidTerminate:(NSNotification *)notification { 188 [self _saveWindowTemplate];189 190 215 [_connection removeObserver:self]; 191 216 _connection = NULL; … … 195 220 196 221 - (void)_serverConnectionShouldHide:(NSNotification *)notification { 197 _hidden = ![[self window] is Visible];222 _hidden = ![[self window] isOnScreen]; 198 223 199 224 [[self window] orderOut:self]; … … 223 248 #pragma mark - 224 249 225 - (void)setWindowFrameAutosaveName:(NSString *)value { 226 [super setWindowFrameAutosaveName:value]; 227 228 if([self connection]) { 229 if([[self connection] bookmark]) { 230 [super setWindowFrameAutosaveName:[NSSWF:@"%@ %@", 231 value, 232 [[[self connection] bookmark] objectForKey:WCBookmarksIdentifier]]]; 233 } else { 234 [super setWindowFrameAutosaveName:[NSSWF:@"%@ %@", 235 value, 236 [[[self connection] URL] hostpair]]]; 237 } 238 } 250 - (void)windowDidLoad { 251 [[NSNotificationCenter defaultCenter] 252 addObserver:self 253 selector:@selector(_WC_windowWillClose:) 254 name:NSWindowWillCloseNotification 255 object:[self window]]; 256 257 [self _loadWindowTemplate]; 239 258 } 240 259 … … 281 300 - (BOOL)isHidden { 282 301 return _hidden; 302 } 303 304 305 306 - (void)setReleasedWhenClosed:(BOOL)value { 307 _releasedWhenClosed = value; 308 } 309 310 311 312 - (BOOL)isReleasedWhenClosed { 313 return _releasedWhenClosed; 283 314 } 284 315 WiredClient/trunk/WCConsole.m
r3943 r3974 135 135 #pragma mark - 136 136 137 - (void)windowDidLoad { 138 [self setShouldCascadeWindows:NO]; 139 [self setWindowFrameAutosaveName:@"Console"]; 137 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 138 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCConsoleWindow"]]; 139 } 140 141 142 143 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 144 [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCConsoleWindow"]; 140 145 } 141 146 WiredClient/trunk/WCFileInfo.m
r3667 r3974 50 50 _file = [file retain]; 51 51 52 [self setReleasedWhenClosed:YES]; 52 53 [self window]; 53 54 … … 139 140 [[self window] setTitle:[NSSWF: 140 141 NSLS(@"%@ Info", @"File info window title (filename)"), [_file name]]]; 142 141 143 [self setShouldCascadeWindows:YES]; 142 [self setShouldSaveWindow SizeOnly:YES];144 [self setShouldSaveWindowFrameOriginOnly:YES]; 143 145 [self setWindowFrameAutosaveName:@"FileInfo"]; 146 147 [super windowDidLoad]; 144 148 } 145 149 … … 154 158 path = [parentPath stringByAppendingPathComponent:[_fileTextField stringValue]]; 155 159 156 if([[self window] is Visible] && [[[self connection] account] alterFiles] && [[self connection] isConnected]) {160 if([[self window] isOnScreen] && [[[self connection] account] alterFiles] && [[self connection] isConnected]) { 157 161 // --- compare the existing file name with the one in the text field 158 162 if(![[_file name] isEqualToString:[_fileTextField stringValue]]) { … … 195 199 userInfo:dictionary]; 196 200 } 197 198 [self autorelease];199 201 } 200 202 WiredClient/trunk/WCFiles.m
r3956 r3974 91 91 [self _validate]; 92 92 93 [self setReleasedWhenClosed:YES]; 93 94 [self showWindow:self]; 94 95 … … 629 630 [_filesBrowser setAction:@selector(browserDidSingleClick:)]; 630 631 [_filesBrowser setDoubleAction:@selector(open:)]; 631 [_filesBrowser setColumnsAutosaveName:@"Files"];632 632 [_filesBrowser loadColumnZero]; 633 633 … … 644 644 [_filesTableView setDefaultTableColumnIdentifiers: 645 645 [NSArray arrayWithObjects:@"Name", @"Size", NULL]]; 646 [_filesTableView setAutosaveName:@"Files"];647 [_filesTableView setAutosaveTableColumns:YES];648 646 649 647 [_titleBarMenu removeAllItems]; … … 667 665 668 666 [self _update]; 667 668 [super windowDidLoad]; 669 669 } 670 670 … … 673 673 - (void)windowWillClose:(NSNotification *)notification { 674 674 [_filesTableView setDataSource:NULL]; 675 676 [self autorelease];677 675 } 678 676 … … 693 691 694 692 return frame; 693 } 694 695 696 697 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 698 [_filesTableView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCFilesTableView"]]; 699 } 700 701 702 703 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 704 [windowTemplate setObject:[_filesTableView propertiesDictionary] forKey:@"WCFilesTableView"]; 695 705 } 696 706 WiredClient/trunk/WCMessages.m
r3732 r3974 477 477 [iconCell release]; 478 478 479 [self setShouldCascadeWindows:NO];480 [self setWindowFrameAutosaveName:@"Messages"];481 482 [_conversationsSplitView setAutosaveName:@"Conversations"];483 [_messagesSplitView setAutosaveName:@"Messages"];484 485 479 [_messagesTableView setDoubleAction:@selector(reply:)]; 486 [_messagesTableView setAutosaveName:@"Messages2"];487 [_messagesTableView setAutosaveTableColumns:YES];488 480 [_messagesTableView setAllowsUserCustomization:YES]; 481 [_messagesTableView setDefaultHighlightedTableColumnIdentifier:@"Time"]; 482 [_messagesTableView setDefaultSortOrder:WISortAscending]; 489 483 [_conversationsOutlineView expandItem:[_titles objectAtIndex:0]]; 490 484 [_conversationsOutlineView expandItem:[_titles objectAtIndex:1]]; … … 494 488 [self _update]; 495 489 [self _validate]; 490 491 [super windowDidLoad]; 492 } 493 494 495 496 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 497 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCMessagesWindow"]]; 498 [_conversationsSplitView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCMessagesConversationsSplitView"]]; 499 [_messagesSplitView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCMessagesMessagesSplitView"]]; 500 [_messagesTableView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCMessagesMessagesTableView"]]; 501 } 502 503 504 505 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 506 [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCMessagesWindow"]; 507 [windowTemplate setObject:[_conversationsSplitView propertiesDictionary] forKey:@"WCMessagesConversationsSplitView"]; 508 [windowTemplate setObject:[_messagesSplitView propertiesDictionary] forKey:@"WCMessagesMessagesSplitView"]; 509 [windowTemplate setObject:[_messagesTableView propertiesDictionary] forKey:@"WCMessagesMessagesTableView"]; 496 510 } 497 511 WiredClient/trunk/WCNews.m
r3732 r3974 160 160 161 161 - (void)windowDidLoad { 162 [self setShouldCascadeWindows:NO];163 [self setWindowFrameAutosaveName:@"News"];164 165 162 [_newsTextView setEditable:NO]; 166 163 167 164 [self _update]; 168 165 [self _validate]; 166 167 [super windowDidLoad]; 169 168 } 170 169 … … 177 176 [[self connection] postNotificationName:WCNewsDidReadPost object:[self connection]]; 178 177 } 178 } 179 180 181 182 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 183 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCNewsWindow"]]; 184 } 185 186 187 188 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 189 [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCNewsWindow"]; 179 190 } 180 191 WiredClient/trunk/WCPreferences.m
r3959 r3974 75 75 NSToolbarItem *item; 76 76 77 toolbar = [[NSToolbar alloc] initWithIdentifier:WCPreferencesToolbar];78 77 _toolbarItems = [[NSMutableDictionary alloc] init]; 79 78 … … 142 141 [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 143 142 143 toolbar = [[NSToolbar alloc] initWithIdentifier:WCPreferencesToolbar]; 144 144 [toolbar setDelegate:self]; 145 [toolbar setVisible:YES];146 145 [toolbar setAllowsUserCustomization:YES]; 147 146 [toolbar setAutosavesConfiguration:NO]; 148 [toolbar setDisplayMode:NSToolbarDisplayModeDefault];149 147 150 148 return [toolbar autorelease]; WiredClient/trunk/WCPreview.m
r3597 r3974 53 53 self = [super initWithWindowNibName:@"Preview" connection:connection]; 54 54 55 [self setReleasedWhenClosed:YES]; 55 56 [self window]; 56 57 … … 400 401 401 402 [self _update]; 402 } 403 404 405 406 - (void)windowWillClose:(NSNotification *)notification { 407 if([[notification object] isVisible]) 408 [self autorelease]; 403 404 [super windowDidLoad]; 409 405 } 410 406 WiredClient/trunk/WCPrivateChat.m
r3570 r3974 46 46 name:NSLS(@"Private Chat", @"Chat window title")]; 47 47 48 [self setReleasedWhenClosed:YES]; 49 48 50 _cid = cid; 49 51 _user = [user retain]; … … 96 98 [self setShouldCascadeWindows:YES]; 97 99 [self setWindowFrameAutosaveName:@"Private Chat"]; 100 98 101 [[self window] setTitle:[_connection name] withSubtitle:[self name]]; 99 102 100 103 [_userListTableView registerForDraggedTypes:[NSArray arrayWithObject:WCUserPboardType]]; 101 104 102 [_chatSplitView setAutosaveName:@"Private Chat"];103 [_userListSplitView setAutosaveName:@"Private Chat User List"];104 105 105 [super windowDidLoad]; 106 106 } … … 110 110 - (void)windowWillClose:(NSNotification *)notification { 111 111 [_connection sendCommand:WCLeaveCommand withArgument:[NSSWF:@"%u", [self chatID]]]; 112 113 [self autorelease];114 112 } 115 113 WiredClient/trunk/WCPublicChat.m
r3967 r3974 207 207 - (void)windowDidLoad { 208 208 [[self window] setToolbar:[self _toolbar]]; 209 [self setShouldCascadeWindows:YES];210 [self setWindowFrameAutosaveName:@"Public Chat"];211 212 [_chatSplitView setAutosaveName:@"Public Chat"];213 [_userListSplitView setAutosaveName:@"Public Chat User List"];214 209 215 210 [super windowDidLoad]; … … 246 241 247 242 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 248 [[[self window] toolbar] setPropertiesFromDictionary:[windowTemplate objectForKey:@"Toolbar"]]; 243 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCChatWindow"]]; 244 245 [super windowTemplateShouldLoad:windowTemplate]; 249 246 } 250 247 … … 252 249 253 250 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 254 [windowTemplate setObject:[[[self window] toolbar] propertiesDictionary] forKey:@"Toolbar"]; 251 [windowTemplate setObject:[[self window] propertiesDictionaryWithoutVisibility] forKey:@"WCChatWindow"]; 252 253 [super windowTemplateShouldSave:windowTemplate]; 255 254 } 256 255 … … 300 299 WCError *error; 301 300 302 if([[self window] isVisible]) { 303 [[self window] setTitle:[[self connection] name] withSubtitle:[NSSWF:@"%@ %C %@", 304 NSLS(@"Chat", @"Chat window title"), 305 0x2014, 306 NSLS(@"Disconnected", "Chat window title")]]; 301 [[self window] setTitle:[[self connection] name] withSubtitle:[NSSWF:@"%@ %C %@", 302 NSLS(@"Chat", @"Chat window title"), 303 0x2014, 304 NSLS(@"Disconnected", "Chat window title")]]; 305 306 if(![[self connection] isReconnecting]) { 307 error = [[notification userInfo] objectForKey:WCErrorKey]; 307 308 308 if(![[self connection] isReconnecting]) { 309 error = [[notification userInfo] objectForKey:WCErrorKey]; 310 311 if(!error) 312 error = [WCError errorWithDomain:WCWiredClientErrorDomain code:WCWiredClientServerDisconnected]; 313 309 if(!error) 310 error = [WCError errorWithDomain:WCWiredClientErrorDomain code:WCWiredClientServerDisconnected]; 311 312 if([[self window] isMiniaturized]) 313 [self showWindow:self]; 314 315 if([[self window] isVisible]) 314 316 [[error alert] beginSheetModalForWindow:[self window]]; 315 }316 317 } 317 318 WiredClient/trunk/WCSearch.m
r3621 r3974 253 253 [iconCell release]; 254 254 255 [self setShouldCascadeWindows:NO];256 [self setWindowFrameAutosaveName:@"Search"];257 258 255 [_searchTableView setDoubleAction:@selector(open:)]; 259 256 [_searchTableView setAllowsUserCustomization:YES]; … … 261 258 [_searchTableView setDefaultTableColumnIdentifiers: 262 259 [NSArray arrayWithObjects:@"Name", @"Size", NULL]]; 263 [_searchTableView setAutosaveName:@"Search"];264 [_searchTableView setAutosaveTableColumns:YES];265 260 266 261 [self _update]; 262 263 [super windowDidLoad]; 264 } 265 266 267 268 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 269 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCSearchWindow"]]; 270 [_searchTableView setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCSearchTableView"]]; 271 } 272 273 274 275 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 276 [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCSearchWindow"]; 277 [windowTemplate setObject:[_searchTableView propertiesDictionary] forKey:@"WCSearchTableView"]; 267 278 } 268 279 WiredClient/trunk/WCServerConnection.h
r3963 r3974 59 59 BOOL _sentLogin; 60 60 BOOL _loginFailed; 61 BOOL _dismissingWindow; 61 62 BOOL _closingWindow; 62 63 BOOL _reconnecting; WiredClient/trunk/WCServerConnection.m
r3963 r3974 157 157 _cache = [[WCCache alloc] initWithCapacity:100]; 158 158 159 _chat = [[WCPublicChat publicChatWithConnection:self] retain]; 160 159 161 #if defined(DEBUG) || defined(TEST) 160 162 _console = [[WCConsole consoleWithConnection:self] retain]; … … 167 169 _serverInfo = [[WCServerInfo serverInfoWithConnection:self] retain]; 168 170 _transfers = [[WCTransfers transfersWithConnection:self] retain]; 169 _chat = [[WCPublicChat publicChatWithConnection:self] retain];170 171 } 171 172 … … 276 277 277 278 - (void)windowWillClose:(NSNotification *)notification { 278 if(!_ reconnecting && [[notification object] isVisible]) {279 if(!_dismissingWindow && !_reconnecting && [[notification object] isOnScreen]) { 279 280 _closingWindow = YES; 280 281 … … 392 393 error = [[notification userInfo] objectForKey:WCErrorKey]; 393 394 394 if(error && [[self window] isVisible]) 395 [[error alert] beginSheetModalForWindow:[self window]]; 395 if(error) { 396 if([[self window] isMiniaturized]) 397 [self showWindow:self]; 398 399 if([[self window] isVisible]) 400 [[error alert] beginSheetModalForWindow:[self window]]; 401 } 396 402 397 403 if(![[self window] isVisible]) … … 406 412 407 413 error = [[notification userInfo] objectForKey:WCErrorKey]; 414 415 if([[self window] isMiniaturized]) 416 [self showWindow:self]; 408 417 409 418 if([[self window] isVisible]) … … 471 480 [_link sendCommand:WCBannerCommand]; 472 481 473 [[self window] orderOut:self]; 482 _dismissingWindow = YES; 483 [[self window] close]; 484 _dismissingWindow = NO; 474 485 475 486 _reconnecting = NO; WiredClient/trunk/WCServerInfo.m
r3910 r3974 170 170 #pragma mark - 171 171 172 - (void)windowDidLoad {173 NSSize size;174 NSRect rect;175 176 size = [[self window] frame].size;177 178 [self setShouldCascadeWindows:NO];179 [self setWindowFrameAutosaveName:@"ServerInfo"];180 181 rect = [[self window] frame];182 rect.size = size;183 [[self window] setFrame:rect display:NO];184 }185 186 187 188 172 - (void)windowDidBecomeKey:(NSNotification *)notification { 189 173 WCServer *server; … … 200 184 201 185 186 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 187 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCServerInfoWindow"]]; 188 } 189 190 191 192 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 193 [windowTemplate setObject:[[self window] propertiesDictionaryWithoutFrameSize] forKey:@"WCServerInfoWindow"]; 194 } 195 196 197 202 198 - (void)connectionWillTerminate:(NSNotification *)notification { 203 199 [self close]; WiredClient/trunk/WCTransfers.m
r3867 r3974 1051 1051 [NSArray arrayWithObjects:NSStringPboardType, WCTransferPboardType, NULL]]; 1052 1052 1053 [self setShouldCascadeWindows:NO];1054 [self setWindowFrameAutosaveName:@"Transfers"];1055 1056 1053 [self _update]; 1057 1054 [self _validate]; 1055 1056 [super windowDidLoad]; 1057 } 1058 1059 1060 1061 - (void)windowTemplateShouldLoad:(NSMutableDictionary *)windowTemplate { 1062 [[self window] setPropertiesFromDictionary:[windowTemplate objectForKey:@"WCTransfersWindow"]]; 1063 } 1064 1065 1066 1067 - (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 1068 [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCTransfersWindow"]; 1058 1069 } 1059 1070 WiredClient/trunk/WCUserInfo.m
r3570 r3974 55 55 _user = [user retain]; 56 56 57 [self setReleasedWhenClosed:YES]; 57 58 [self window]; 58 59 … … 217 218 [[self window] setTitle:[NSSWF: 218 219 NSLS(@"%@ Info", @"User info window title (nick)"), [_user nick]]]; 220 219 221 [self setShouldCascadeWindows:YES]; 222 [self setShouldSaveWindowFrameOriginOnly:YES]; 220 223 [self setWindowFrameAutosaveName:@"UserInfo"]; 224 225 [super windowDidLoad]; 221 226 } 222 227 … … 225 230 - (void)windowWillClose:(NSNotification *)notification { 226 231 [NSObject cancelPreviousPerformRequestsWithTarget:self]; 227 228 [self autorelease];229 232 } 230 233 … … 326 329 [[self window] setFrame:rect display:YES animate:YES]; 327 330 328 if(![[self window] is Visible])331 if(![[self window] isOnScreen]) 329 332 [self showWindow:self]; 330 333
