Changeset 277

Show
Ignore:
Timestamp:
01/01/08 12:06:37 (1 year ago)
Author:
wolf
Message:

[NEW] JRShellView: color errors returned from the command handler a dark red.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cocoa/JRShellView/JRShellView.m

    r276 r277  
    8686#endif 
    8787 
    88 #pragma mark Misc 
     88#pragma mark Return 
    8989 
    9090- (void)insertNewline:(id)sender_ { // return 
     
    100100    [super insertNewline:sender_]; 
    101101    if (errorString) { 
    102         [super insertText:errorString]; 
     102        NSDictionary *errorStringAttributes = [NSDictionary dictionaryWithObjectsAndKeys: 
     103                                               [NSFont fontWithName:@"Courier" size:12], NSFontAttributeName, 
     104                                               [NSColor colorWithDeviceRed:128./255. green:0. blue:0 alpha:1.], NSForegroundColorAttributeName, 
     105                                               nil]; 
     106        [[self textStorage] appendAttributedString:[[[NSAttributedString alloc] initWithString:errorString 
     107                                                                                    attributes:errorStringAttributes] autorelease]]; 
    103108        [super insertNewline:sender_]; 
    104109    } else { 
  • trunk/cocoa/JRShellView/JRShellViewDemo/AppController.m

    r276 r277  
    1212        return nil; 
    1313    } else { 
     14        //  Reverse the command and return it as the "result". 
    1415        unsigned charIndex = 0, charCount = [command_ length]; 
    1516        unichar *input = (unichar*)[[NSMutableData dataWithCapacity:charCount * sizeof(unichar)] mutableBytes]; 
  • trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/project.pbxproj

    r271 r277  
    5050                                795A7F90099D0E3600450061 /* AppController.h */, 
    5151                                795A7F91099D0E3600450061 /* AppController.m */, 
     52                                79AEA9A70D29CB1100A2C50F /* JRShellView.h */, 
    5253                                79AEA9A60D29CB1100A2C50F /* JRShellView.m */, 
    53                                 79AEA9A70D29CB1100A2C50F /* JRShellView.h */, 
    5454                        ); 
    5555                        name = Classes; 
  • trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/wolf.mode1v3

    r276 r277  
    232232                        <array> 
    233233                                <dict> 
     234                                        <key>BecomeActive</key> 
     235                                        <true/> 
    234236                                        <key>ContentConfiguration</key> 
    235237                                        <dict> 
     
    275277                                                        <array> 
    276278                                                                <array> 
    277                                                                         <integer>2</integer> 
     279                                                                        <integer>5</integer> 
    278280                                                                        <integer>1</integer> 
    279281                                                                        <integer>0</integer> 
     
    300302                                                </array> 
    301303                                                <key>RubberWindowFrame</key> 
    302                                                 <string>1886 1141 690 397 0 0 2560 1578 </string> 
     304                                                <string>1823 1148 690 397 0 0 2560 1578 </string> 
    303305                                        </dict> 
    304306                                        <key>Module</key> 
     
    337339                                                                <string>{{0, 0}, {482, 0}}</string> 
    338340                                                                <key>RubberWindowFrame</key> 
    339                                                                 <string>1886 1141 690 397 0 0 2560 1578 </string> 
     341                                                                <string>1823 1148 690 397 0 0 2560 1578 </string> 
    340342                                                        </dict> 
    341343                                                        <key>Module</key> 
     
    357359                                                                <string>{{0, 5}, {482, 351}}</string> 
    358360                                                                <key>RubberWindowFrame</key> 
    359                                                                 <string>1886 1141 690 397 0 0 2560 1578 </string> 
     361                                                                <string>1823 1148 690 397 0 0 2560 1578 </string> 
    360362                                                        </dict> 
    361363                                                        <key>Module</key> 
     
    381383                        <key>TableOfContents</key> 
    382384                        <array> 
    383                                 <string>794053AA0D2AFF9A00976130</string> 
     385                                <string>79A4908A0D2B0460008FEBAE</string> 
    384386                                <string>1CE0B1FE06471DED0097A5F4</string> 
    385                                 <string>794053AB0D2AFF9A00976130</string> 
     387                                <string>79A4908B0D2B0460008FEBAE</string> 
    386388                                <string>1CE0B20306471E060097A5F4</string> 
    387389                                <string>1CE0B20506471E060097A5F4</string> 
     
    517519        <key>WindowOrderList</key> 
    518520        <array> 
    519                 <string>794053D20D2B029600976130</string> 
    520                 <string>794053C20D2B018D00976130</string> 
    521                 <string>794053C30D2B018D00976130</string> 
    522                 <string>794053C40D2B018D00976130</string> 
    523521                <string>1C78EAAD065D492600B07095</string> 
    524522                <string>1CD10A99069EF8BA00B06720</string> 
    525523                <string>79AEA9B00D29CC0E00A2C50F</string> 
    526                 <string>7940539F0D2AFF8300976130</string> 
    527                 <string>79AEA9BA0D29CC6E00A2C50F</string> 
     524                <string>79A4909A0D2B0BD3008FEBAE</string> 
     525                <string>79A4909B0D2B0BD3008FEBAE</string> 
    528526                <string>/Users/wolf/code/trac/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj</string> 
    529527        </array> 
    530528        <key>WindowString</key> 
    531         <string>1886 1141 690 397 0 0 2560 1578 </string> 
     529        <string>1823 1148 690 397 0 0 2560 1578 </string> 
    532530        <key>WindowToolsV3</key> 
    533531        <array> 
     
    606604                        <array> 
    607605                                <string>79AEA9B00D29CC0E00A2C50F</string> 
    608                                 <string>794053AE0D2AFF9A00976130</string> 
     606                                <string>79A490920D2B0BD3008FEBAE</string> 
    609607                                <string>1CD0528F0623707200166675</string> 
    610608                                <string>XCMainBuildResultsModuleGUID</string> 
     
    648646                                                                                <key>sizes</key> 
    649647                                                                                <array> 
    650                                                                                         <string>{{0, 0}, {316, 198}}</string> 
    651                                                                                         <string>{{316, 0}, {378, 198}}</string> 
     648                                                                                        <string>{{0, 0}, {316, 201}}</string> 
     649                                                                                        <string>{{316, 0}, {378, 201}}</string> 
    652650                                                                                </array> 
    653651                                                                        </dict> 
     
    664662                                                                                <key>sizes</key> 
    665663                                                                                <array> 
    666                                                                                         <string>{{0, 0}, {694, 198}}</string> 
    667                                                                                         <string>{{0, 198}, {694, 183}}</string> 
     664                                                                                        <string>{{0, 0}, {694, 201}}</string> 
     665                                                                                        <string>{{0, 201}, {694, 180}}</string> 
    668666                                                                                </array> 
    669667                                                                        </dict> 
     
    698696                                                                        </array> 
    699697                                                                        <key>Frame</key> 
    700                                                                         <string>{{316, 0}, {378, 198}}</string> 
     698                                                                        <string>{{316, 0}, {378, 201}}</string> 
    701699                                                                        <key>RubberWindowFrame</key> 
    702700                                                                        <string>1319 1019 694 422 0 0 2560 1578 </string> 
     
    726724                        <array> 
    727725                                <string>1CD10A99069EF8BA00B06720</string> 
    728                                 <string>794053AF0D2AFF9A00976130</string> 
     726                                <string>79A490930D2B0BD3008FEBAE</string> 
    729727                                <string>1C162984064C10D400B95A72</string> 
    730                                 <string>794053B00D2AFF9A00976130</string> 
    731                                 <string>794053B10D2AFF9A00976130</string> 
    732                                 <string>794053B20D2AFF9A00976130</string> 
    733                                 <string>794053B30D2AFF9A00976130</string> 
    734                                 <string>794053B40D2AFF9A00976130</string> 
     728                                <string>79A490940D2B0BD3008FEBAE</string> 
     729                                <string>79A490950D2B0BD3008FEBAE</string> 
     730                                <string>79A490960D2B0BD3008FEBAE</string> 
     731                                <string>79A490970D2B0BD3008FEBAE</string> 
     732                                <string>79A490980D2B0BD3008FEBAE</string> 
    735733                        </array> 
    736734                        <key>ToolbarConfiguration</key> 
     
    894892                        <array> 
    895893                                <string>1C78EAAD065D492600B07095</string> 
    896                                 <string>794053B50D2AFF9A00976130</string> 
     894                                <string>79A490990D2B0BD3008FEBAE</string> 
    897895                                <string>1C78EAAC065D492600B07095</string> 
    898896                        </array> 
  • trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/wolf.pbxuser

    r276 r277  
    3838                                ); 
    3939                        }; 
    40                         PBXPerProjectTemplateStateSaveDate = 220921734
    41                         PBXWorkspaceStateSaveDate = 220921734
     40                        PBXPerProjectTemplateStateSaveDate = 220922966
     41                        PBXWorkspaceStateSaveDate = 220922966
    4242                }; 
    4343                sourceControlManager = 79AEA9A40D29CB0A00A2C50F /* Source Control */; 
     
    5656                uiCtxt = { 
    5757                        sepNavIntBoundsRect = "{{0, 0}, {997, 1246}}"; 
    58                         sepNavSelRange = "{383, 0}"; 
    59                         sepNavVisRange = "{0, 1041}"; 
     58                        sepNavSelRange = "{479, 0}"; 
     59                        sepNavVisRange = "{0, 1104}"; 
    6060                        sepNavWindowFrame = "{{746, 173}, {1056, 1350}}"; 
    6161                }; 
     
    102102        79AEA9A60D29CB1100A2C50F /* JRShellView.m */ = { 
    103103                uiCtxt = { 
    104                         sepNavIntBoundsRect = "{{0, 0}, {997, 6538}}"; 
    105                         sepNavSelRange = "{3135, 0}"; 
    106                         sepNavVisRange = "{1592, 3140}"; 
     104                        sepNavIntBoundsRect = "{{0, 0}, {997, 6622}}"; 
     105                        sepNavSelRange = "{3378, 0}"; 
     106                        sepNavVisRange = "{1847, 3619}"; 
    107107                        sepNavWindowFrame = "{{838, 185}, {1056, 1350}}"; 
    108108                };