Changeset 2484

Show
Ignore:
Timestamp:
03/18/05 14:12:42 (4 years ago)
Author:
eridius
Message:

Strip non-breaking spaces when copying. This fixes copying URLs from the output because we add non-breaking spaces to the URLs there.
Note that this doesn't affect German or Dutch localizations because I didn't touch those nib files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Languages/English.lproj/Colloquy.nib/classes.nib

    r2241 r2484  
    66                clearDisplay = id;  
    77                closeCurrentPanel = id;  
     8                copyStripped = id;  
    89                detachCurrentPanel = id;  
    910                findNext = id;  
  • trunk/Languages/English.lproj/Colloquy.nib/info.nib

    r2463 r2484  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>53 77 356 240 0 0 1280 832 </string> 
     6        <string>38 66 356 240 0 0 1024 746 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>29</key> 
    10                 <string>29 598 366 44 0 0 1280 832 </string> 
     10                <string>21 533 383 44 0 0 1024 746 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
    13         <string>364.0</string> 
    14         <key>IBOpenObjects</key> 
    15         <array> 
    16                 <integer>29</integer> 
    17         </array> 
     13        <string>437.0</string> 
     14        <key>IBOldestOS</key> 
     15        <integer>3</integer> 
    1816        <key>IBSystem Version</key> 
    19         <string>7W77</string> 
     17        <string>8A414</string> 
    2018</dict> 
    2119</plist> 
  • trunk/MVApplicationController.h

    r2066 r2484  
    1313- (IBAction) showBuddyList:(id) sender; 
    1414 
     15- (IBAction) copyStripped:(id) sender; 
     16 
    1517+ (BOOL) isTerminating; 
    1618@end 
  • trunk/MVApplicationController.m

    r2463 r2484  
    124124#pragma mark - 
    125125 
     126- (IBAction) copyStripped:(id) sender { 
     127        if( [NSApp sendAction:@selector(copy:) to:nil from:sender] ) { 
     128                NSPasteboard *pb = [NSPasteboard generalPasteboard]; 
     129                if( [[pb types] containsObject:NSStringPboardType] ) { 
     130                        NSMutableString *text = [[pb stringForType:NSStringPboardType] mutableCopy]; 
     131                        if( text ) { 
     132                                unichar chr = 0x200b; 
     133                                NSString *space = [NSString stringWithCharacters:&chr length:1]; 
     134                                [text replaceOccurrencesOfString:space 
     135                                                                          withString:@"" 
     136                                                                                 options:NSLiteralSearch 
     137                                                                                   range:NSMakeRange(0, [text length])]; 
     138                                 
     139                                [pb addTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; 
     140                                [pb setString:text forType:NSStringPboardType]; 
     141                                [text release]; 
     142                        } 
     143                } 
     144        } 
     145} 
     146 
     147#pragma mark - 
     148 
    126149- (void) setupPreferences { 
    127150        static BOOL setupAlready = NO;