Changeset 2132
- Timestamp:
- 11/21/04 10:50:28 (4 years ago)
- Files:
-
- branches/overhaul/JVChatTranscript.m (modified) (5 diffs)
- branches/overhaul/JVDirectChat.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/overhaul/JVChatTranscript.m
r2112 r2132 152 152 [display setUIDelegate:self]; 153 153 [display setPolicyDelegate:self]; 154 [display setFrameLoadDelegate:self]; 154 155 155 156 if( [self isMemberOfClass:[JVChatTranscript class]] ) { 157 if( ! _chatEmoticons && xmlHasProp( xmlDocGetRootElement( _xmlLog ), "emoticon" ) ) { 158 xmlChar *emoticonProp = xmlGetProp( xmlDocGetRootElement( _xmlLog ), "emoticon" ); 159 [self setChatEmoticons:[NSBundle bundleWithIdentifier:[NSString stringWithUTF8String:emoticonProp]] performRefresh:NO]; 160 xmlFree( emoticonProp ); 161 } 162 156 163 if( ! _chatStyle && xmlHasProp( xmlDocGetRootElement( _xmlLog ), "style" ) ) { 157 164 xmlChar *styleProp = xmlGetProp( xmlDocGetRootElement( _xmlLog ), "style" ); … … 160 167 xmlFree( styleProp ); 161 168 } 162 163 if( ! _chatEmoticons && xmlHasProp( xmlDocGetRootElement( _xmlLog ), "emoticon" ) ) {164 xmlChar *emoticonProp = xmlGetProp( xmlDocGetRootElement( _xmlLog ), "emoticon" );165 [self setChatEmoticons:[NSBundle bundleWithIdentifier:[NSString stringWithUTF8String:emoticonProp]]];166 xmlFree( emoticonProp );167 }168 169 } 169 170 … … 185 186 [self _updateChatStylesMenu]; 186 187 [self _updateChatEmoticonsMenu]; 187 188 [self performSelector:@selector( _reloadCurrentStyle: ) withObject:nil afterDelay:0.];189 188 } 190 189 … … 428 427 [[display window] disableFlushWindow]; 429 428 430 [display setFrameLoadDelegate:self];431 429 [[display mainFrame] loadHTMLString:[self _fullDisplayHTMLWithBody:@""] baseURL:nil]; 432 430 } … … 829 827 [[display window] enableFlushWindow]; 830 828 831 [display setFrameLoadDelegate:nil];832 833 829 NSScrollView *scrollView = [[[[display mainFrame] frameView] documentView] enclosingScrollView]; 834 830 [scrollView setHasHorizontalScroller:NO]; branches/overhaul/JVDirectChat.m
r2122 r2132 259 259 NSString *variant = nil; 260 260 NSBundle *emoticon = nil; 261 261 262 262 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _refreshIcon: ) name:MVChatConnectionDidConnectNotification object:[self connection]]; 263 263 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _refreshIcon: ) name:MVChatConnectionDidDisconnectNotification object:[self connection]]; 264 264 265 [display setUIDelegate:self]; 266 [display setPolicyDelegate:self]; 267 [display setFrameLoadDelegate:self]; 268 269 if( [(NSString *)[self preferenceForKey:@"emoticon"] length] ) { 270 emoticon = [NSBundle bundleWithIdentifier:[self preferenceForKey:@"emoticon"]]; 271 if( emoticon ) [self setChatEmoticons:emoticon performRefresh:NO]; 272 } 273 265 274 if( [self preferenceForKey:@"style"] ) { 266 275 style = [JVStyle styleWithIdentifier:[self preferenceForKey:@"style"]]; 267 276 variant = [self preferenceForKey:@"style variant"]; 268 277 if( style ) [self setChatStyle:style withVariant:variant]; 269 }270 271 if( [(NSString *)[self preferenceForKey:@"emoticon"] length] ) {272 emoticon = [NSBundle bundleWithIdentifier:[self preferenceForKey:@"emoticon"]];273 if( emoticon ) [self setChatEmoticons:emoticon];274 278 } 275 279
