Changeset 1186


Ignore:
Timestamp:
Dec 11, 2006, 3:42:15 AM (15 years ago)
Author:
livings124
Message:

display error message in the inspector

Location:
branches/multitracker/macosx
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/multitracker/macosx/English.lproj/InfoWindow.nib/classes.nib

    r1149 r1186  
    2929                fDownloadedValidField = NSTextField;
    3030                fDownloadingFromField = NSTextField;
     31                fErrorMessageView = NSTextView;
    3132                fFileTable = NSTableView;
    3233                fFileTableStatusField = NSTextField;
  • branches/multitracker/macosx/English.lproj/InfoWindow.nib/info.nib

    r1119 r1186  
    44<dict>
    55        <key>IBDocumentLocation</key>
    6         <string>58 51 356 240 0 0 1024 746 </string>
     6        <string>69 61 356 240 0 0 1152 842 </string>
    77        <key>IBEditorPositions</key>
    88        <dict>
  • branches/multitracker/macosx/InfoWindowController.h

    r1149 r1186  
    5151    IBOutlet NSTextField * fSeedersField, * fLeechersField, * fConnectedPeersField,
    5252                        * fDownloadingFromField, * fUploadingToField, * fCompletedFromTrackerField;
     53    IBOutlet NSTextView * fErrorMessageView;
     54    IBOutlet PiecesView * fPiecesView;
    5355   
    5456    IBOutlet NSTableView * fFileTable;
     
    5759    IBOutlet NSMatrix * fRatioMatrix;
    5860    IBOutlet NSTextField * fRatioLimitField;
    59    
    60     IBOutlet PiecesView * fPiecesView;
    6161}
    6262
  • branches/multitracker/macosx/InfoWindowController.m

    r1154 r1186  
    4141//15 spacing at the bottom of each tab
    4242#define TAB_INFO_HEIGHT 268.0
    43 #define TAB_ACTIVITY_HEIGHT 109.0
     43#define TAB_ACTIVITY_HEIGHT 170.0
    4444#define TAB_PEERS_HEIGHT 268.0
    4545#define TAB_FILES_HEIGHT 268.0
     
    157157        [fHashField setToolTip: nil];
    158158        [fCommentView setString: @""];
    159         [fCommentView setSelectable: NO];
    160159       
    161160        [fCreatorField setStringValue: @""];
     
    167166        [fDataLocationField setToolTip: nil];
    168167        [fDateStartedField setStringValue: @""];
     168        [fCommentView setSelectable: NO];
    169169       
    170170        [fRevealDataButton setHidden: YES];
     
    188188        [fUploadingToField setStringValue: @""];
    189189        [fSwarmSpeedField setStringValue: @""];
     190        [fErrorMessageView setString: @""];
     191        [fErrorMessageView setSelectable: NO];
    190192       
    191193        [fPeers removeAllObjects];
     
    212214        [fHashField setToolTip: hashString];
    213215        [fCommentView setString: commentString];
    214         [fCommentView setSelectable: YES];
    215216       
    216217        [fCreatorField setStringValue: [torrent creator]];
     
    325326       
    326327        [fStateField setStringValue: [torrent stateString]];
    327        
    328328        [fRatioField setStringValue: [NSString stringForRatioWithDownload: downloadedTotal upload: uploadedTotal]];
    329        
    330329        [fSwarmSpeedField setStringValue: [torrent isActive] ? [NSString stringForSpeed: [torrent swarmSpeed]] : @""];
     330       
     331        NSString * errorMessage = [torrent errorMessage];
     332        if (![errorMessage isEqualToString: [fErrorMessageView string]])
     333        {
     334            [fErrorMessageView setString: errorMessage];
     335            [fErrorMessageView setSelectable: ![errorMessage isEqualToString: @""]];
     336        }
    331337       
    332338        [fPiecesView updateView: NO];
  • branches/multitracker/macosx/Torrent.h

    r1149 r1186  
    128128- (int)     eta;
    129129
    130 - (BOOL)    isActive;
    131 - (BOOL)    isSeeding;
    132 - (BOOL)    isPaused;
    133 - (BOOL)    isError;
    134 - (BOOL)    justFinished;
     130- (BOOL)        isActive;
     131- (BOOL)        isSeeding;
     132- (BOOL)        isPaused;
     133- (BOOL)        isError;
     134- (NSString *)  errorMessage;
     135- (BOOL)        justFinished;
    135136
    136137- (NSArray *) peers;
  • branches/multitracker/macosx/Torrent.m

    r1178 r1186  
    350350    {
    351351        [fStatusString setString: [NSLocalizedString(@"Error: ", "Torrent -> status string") stringByAppendingString:
    352                                     [NSString stringWithUTF8String: fStat->trackerError]]];
     352                                    [self errorMessage]]];
    353353        if (!fError && [self isActive])
    354354        {
     
    821821{
    822822    return fStat->error & TR_ETRACKER;
     823}
     824
     825- (NSString *) errorMessage
     826{
     827    [NSString stringWithUTF8String: fStat->trackerError];
    823828}
    824829
Note: See TracChangeset for help on using the changeset viewer.