Changeset 3300


Ignore:
Timestamp:
Oct 7, 2007, 2:25:39 AM (14 years ago)
Author:
livings124
Message:

get selected tab in inspector closer to working: 1. it doesn't select at startup 2. needs missing images and cleaned up back images

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r3299 r3300  
    8585                A22A067E0CB83507009694FE /* InfoTabBack.tif in Resources */ = {isa = PBXBuildFile; fileRef = A22A067D0CB83507009694FE /* InfoTabBack.tif */; };
    8686                A22A06980CB83880009694FE /* InfoTabBorder.tif in Resources */ = {isa = PBXBuildFile; fileRef = A22A06970CB83880009694FE /* InfoTabBorder.tif */; };
    87                 A22A06F00CB84903009694FE /* InfoTabMatrix.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A22A06EE0CB84903009694FE /* InfoTabMatrix.h */; };
    88                 A22A06F10CB84903009694FE /* InfoTabMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = A22A06EF0CB84903009694FE /* InfoTabMatrix.m */; };
     87                A22A07350CB86B11009694FE /* InfoTabMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = A22A07330CB86B11009694FE /* InfoTabMatrix.m */; };
    8988                A22A8D560AEEAFA5007E9CB9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A22A8D540AEEAFA5007E9CB9 /* Localizable.strings */; };
    9089                A22BC9A30C5BBCF100F5FB72 /* BottomBorder.png in Resources */ = {isa = PBXBuildFile; fileRef = A22BC9A20C5BBCF100F5FB72 /* BottomBorder.png */; };
     
    108107                A253F6F30A698970008EE24F /* FilterBarBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = A253F6F20A698970008EE24F /* FilterBarBackground.png */; };
    109108                A256588D0A9A695400E8A03B /* MessageWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A256588B0A9A695400E8A03B /* MessageWindowController.m */; };
    110                 A257C1810CAD3003004E121C /* PeerTableView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A257C17F0CAD3003004E121C /* PeerTableView.h */; };
    111109                A257C1820CAD3003004E121C /* PeerTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A257C1800CAD3003004E121C /* PeerTableView.m */; };
    112110                A259317E0A73B2CC002F4FE7 /* TransmissionHelp in Resources */ = {isa = PBXBuildFile; fileRef = A259316A0A73B2CC002F4FE7 /* TransmissionHelp */; };
     
    292290                                A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */,
    293291                                A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */,
    294                                 A257C1810CAD3003004E121C /* PeerTableView.h in CopyFiles */,
    295                                 A22A06F00CB84903009694FE /* InfoTabMatrix.h in CopyFiles */,
    296292                        );
    297293                        runOnlyForDeploymentPostprocessing = 0;
     
    400396                A22A067D0CB83507009694FE /* InfoTabBack.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = InfoTabBack.tif; path = macosx/Images/InfoTabBack.tif; sourceTree = "<group>"; };
    401397                A22A06970CB83880009694FE /* InfoTabBorder.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = InfoTabBorder.tif; path = macosx/Images/InfoTabBorder.tif; sourceTree = "<group>"; };
    402                 A22A06EE0CB84903009694FE /* InfoTabMatrix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = InfoTabMatrix.h; path = macosx/InfoTabMatrix.h; sourceTree = "<group>"; };
    403                 A22A06EF0CB84903009694FE /* InfoTabMatrix.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = InfoTabMatrix.m; path = macosx/InfoTabMatrix.m; sourceTree = "<group>"; };
     398                A22A07320CB86B11009694FE /* InfoTabMatrix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = InfoTabMatrix.h; path = macosx/InfoTabMatrix.h; sourceTree = "<group>"; };
     399                A22A07330CB86B11009694FE /* InfoTabMatrix.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = InfoTabMatrix.m; path = macosx/InfoTabMatrix.m; sourceTree = "<group>"; };
    404400                A22A7EBC0C627FC200E30364 /* Greek */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Greek; path = macosx/Greek.lproj/InfoPlist.strings; sourceTree = "<group>"; };
    405401                A22A7EBD0C627FC200E30364 /* Greek */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Greek; path = macosx/Greek.lproj/InfoWindow.nib; sourceTree = "<group>"; };
     
    740736                                A2E23AC30CB5E1930002BB25 /* InfoTabButtonCell.h */,
    741737                                A2E23AC40CB5E1930002BB25 /* InfoTabButtonCell.m */,
    742                                 A22A06EE0CB84903009694FE /* InfoTabMatrix.h */,
    743                                 A22A06EF0CB84903009694FE /* InfoTabMatrix.m */,
     738                                A22A07320CB86B11009694FE /* InfoTabMatrix.h */,
     739                                A22A07330CB86B11009694FE /* InfoTabMatrix.m */,
    744740                        );
    745741                        name = Sources;
     
    843839                                A232D29D0A70903E00973B12 /* Filter.png */,
    844840                                A253F6F20A698970008EE24F /* FilterBarBackground.png */,
     841                                A22A067D0CB83507009694FE /* InfoTabBack.tif */,
    845842                                A22D602C0CB67E4A00F67A8B /* InfoTabBackAqua.tif */,
    846                                 A22A067D0CB83507009694FE /* InfoTabBack.tif */,
    847843                                A22A06970CB83880009694FE /* InfoTabBorder.tif */,
    848844                                A26E75950CB6AB4800226674 /* InfoGeneral.png */,
     
    15251521                                A257C1820CAD3003004E121C /* PeerTableView.m in Sources */,
    15261522                                A2E23AC60CB5E1930002BB25 /* InfoTabButtonCell.m in Sources */,
    1527                                 A22A06F10CB84903009694FE /* InfoTabMatrix.m in Sources */,
     1523                                A22A07350CB86B11009694FE /* InfoTabMatrix.m in Sources */,
    15281524                        );
    15291525                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/macosx/InfoTabButtonCell.h

    r3299 r3300  
    2828{
    2929    NSImage * fRegularImage, * fSelectedImage;
    30    
    31     BOOL fPushed;
    3230}
    3331
    34 - (void) setPushed: (BOOL) pushed;
    35 
    3632@end
  • trunk/macosx/InfoTabButtonCell.m

    r3299 r3300  
    3434}
    3535
    36 - (void) setImage: (NSImage *) image
     36- (void) setIcon: (NSImage *) image
    3737{
    3838    //create regular back image
     
    4040        [fRegularImage release];
    4141    fRegularImage = [[NSImage imageNamed: @"InfoTabBack.tif"] copy];
    42     [fRegularImage setFlipped: YES];
    4342   
    4443    //create selected back image
     
    4645        [fSelectedImage release];
    4746    fSelectedImage = [[NSImage imageNamed: @"InfoTabBackAqua.tif"] copy];
    48     [fSelectedImage setFlipped: YES];
    4947   
    5048    //composite image to back images
     
    6462        [fSelectedImage unlockFocus];
    6563    }
     64   
     65    [self setImage: fRegularImage];
    6666}
    6767
    68 - (void) setPushed: (BOOL) pushed
     68- (void) setSelectedTab: (BOOL) selected
    6969{
    70     fPushed = pushed;
     70    [self setImage: selected ? fSelectedImage : fRegularImage];
    7171}
    7272
    73 - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView
     73/*- (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView
    7474{
    7575    #warning dim instead of set selected
     
    9090    [image drawInRect: cellFrame fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
    9191    //[super drawWithFrame: cellFrame inView: controlView];
    92 }
     92}*/
    9393
    9494@end
  • trunk/macosx/InfoTabMatrix.h

    r3299 r3300  
    2525#import <Cocoa/Cocoa.h>
    2626
     27#warning remove!?!?!
    2728@interface InfoTabMatrix : NSMatrix
    2829{
  • trunk/macosx/InfoTabMatrix.m

    r3299 r3300  
    2727@implementation InfoTabMatrix
    2828
    29 - (void) highlightCell: (BOOL) flag atRow: (int) row column: (int) column
     29/*- (BOOL)selectCell:(int)anInt
    3030{
    31     [[self cellAtRow: row column: column] setPushed: flag];
    32     [super highlightCell: flag atRow: row column: column];
     31NSLog(@"%d", anInt);
    3332}
    3433
     34- (void)selectCellAtRow:(int)row column:(int)column
     35{
     36NSLog(@"%d", column);
     37}
     38
     39- (void)highlightCell:(BOOL)flag atRow:(int)row column:(int)column
     40{
     41NSLog(@"%d", column);
     42}*/
     43
    3544@end
  • trunk/macosx/InfoWindowController.h

    r3296 r3300  
    3939   
    4040    IBOutlet NSView * fInfoView, * fActivityView, * fPeersView, * fFilesView, * fOptionsView;
     41    #warning streamline
    4142    NSView * fCurrentView;
     43    int fCurrentTabTag;
    4244    IBOutlet NSMatrix * fTabMatrix;
    4345    IBOutlet ImageBackgroundView * fTabBackBar;
  • trunk/macosx/InfoWindowController.m

    r3298 r3300  
    2424
    2525#import "InfoWindowController.h"
     26#import "InfoTabButtonCell.h"
    2627#import "NSStringAdditions.h"
    2728
     
    6263- (void) updateInfoOptions;
    6364
    64 - (void) setWindowForTab: (NSString *) identifier animate: (BOOL) animate;
    6565- (NSArray *) peerSortDescriptors;
    6666
     
    8585    //set selected tab
    8686    fCanResizeVertical = NO;
     87    fCurrentTabTag = INVALID;
    8788    NSString * identifier = [[NSUserDefaults standardUserDefaults] stringForKey: @"InspectorSelected"];
    8889    int tag;
     
    107108    //set tab images and tooltips
    108109    [fTabBackBar setBackgroundImage: [NSImage imageNamed: @"InfoTabBorder.tif"]];
    109     [[fTabMatrix cellWithTag: TAB_INFO_TAG] setImage: [NSImage imageNamed: @"InfoGeneral.png"]];
    110     [[fTabMatrix cellWithTag: TAB_OPTIONS_TAG] setImage: [NSImage imageNamed: @"InfoOptions.png"]];
     110    [[fTabMatrix cellWithTag: TAB_INFO_TAG] setIcon: [NSImage imageNamed: @"InfoGeneral.png"]];
     111    [[fTabMatrix cellWithTag: TAB_ACTIVITY_TAG] setIcon: nil];
     112    [[fTabMatrix cellWithTag: TAB_PEERS_TAG] setIcon: nil];
     113    [[fTabMatrix cellWithTag: TAB_FILES_TAG] setIcon: nil];
     114    [[fTabMatrix cellWithTag: TAB_OPTIONS_TAG] setIcon: [NSImage imageNamed: @"InfoOptions.png"]];
    111115   
    112116    [fTabMatrix setToolTip: NSLocalizedString(@"General Info", "Inspector -> tab tooltip")
     
    752756}
    753757
    754 - (void) tabView: (NSTabView *) tabView didSelectTabViewItem: (NSTabViewItem *) tabViewItem
     758/*- (void) tabView: (NSTabView *) tabView didSelectTabViewItem: (NSTabViewItem *) tabViewItem
    755759{
    756760    NSString * identifier = [tabViewItem identifier];
    757761    [self setWindowForTab: identifier animate: YES];
    758762    [[NSUserDefaults standardUserDefaults] setObject: identifier forKey: @"InspectorSelected"];
    759 }
     763}*/
    760764
    761765/*- (void) setWindowForTab: (NSString *) identifier animate: (BOOL) animate
     
    853857    }
    854858   
     859    //change selected tab item
     860    if (fCurrentTabTag != INVALID)
     861        [(InfoTabButtonCell *)[fTabMatrix cellWithTag: fCurrentTabTag] setSelectedTab: NO];
     862    [(InfoTabButtonCell *)[fTabMatrix selectedCell] setSelectedTab: YES];
     863       
    855864    [[NSUserDefaults standardUserDefaults] setObject: identifier forKey: @"InspectorSelected"];
    856865   
     
    908917   
    909918    fCurrentView = view;
     919    fCurrentTabTag = [fTabMatrix selectedTag];
    910920}
    911921
Note: See TracChangeset for help on using the changeset viewer.