diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index f48ce0774..c2372db84 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -84,6 +84,8 @@ A2265F420B5EF5F40093DDA5 /* FileNameCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A2265F400B5EF5F40093DDA5 /* FileNameCell.m */; }; A22A067E0CB83507009694FE /* InfoTabBack.tif in Resources */ = {isa = PBXBuildFile; fileRef = A22A067D0CB83507009694FE /* InfoTabBack.tif */; }; A22A06980CB83880009694FE /* InfoTabBorder.tif in Resources */ = {isa = PBXBuildFile; fileRef = A22A06970CB83880009694FE /* InfoTabBorder.tif */; }; + A22A06F00CB84903009694FE /* InfoTabMatrix.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A22A06EE0CB84903009694FE /* InfoTabMatrix.h */; }; + A22A06F10CB84903009694FE /* InfoTabMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = A22A06EF0CB84903009694FE /* InfoTabMatrix.m */; }; A22A8D560AEEAFA5007E9CB9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A22A8D540AEEAFA5007E9CB9 /* Localizable.strings */; }; A22BC9A30C5BBCF100F5FB72 /* BottomBorder.png in Resources */ = {isa = PBXBuildFile; fileRef = A22BC9A20C5BBCF100F5FB72 /* BottomBorder.png */; }; A22D602E0CB67E4A00F67A8B /* InfoTabBackAqua.tif in Resources */ = {isa = PBXBuildFile; fileRef = A22D602C0CB67E4A00F67A8B /* InfoTabBackAqua.tif */; }; @@ -290,6 +292,7 @@ A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */, A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */, A257C1810CAD3003004E121C /* PeerTableView.h in CopyFiles */, + A22A06F00CB84903009694FE /* InfoTabMatrix.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -396,6 +399,8 @@ A2265F400B5EF5F40093DDA5 /* FileNameCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = FileNameCell.m; path = macosx/FileNameCell.m; sourceTree = ""; }; A22A067D0CB83507009694FE /* InfoTabBack.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = InfoTabBack.tif; path = macosx/Images/InfoTabBack.tif; sourceTree = ""; }; A22A06970CB83880009694FE /* InfoTabBorder.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = InfoTabBorder.tif; path = macosx/Images/InfoTabBorder.tif; sourceTree = ""; }; + A22A06EE0CB84903009694FE /* InfoTabMatrix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = InfoTabMatrix.h; path = macosx/InfoTabMatrix.h; sourceTree = ""; }; + A22A06EF0CB84903009694FE /* InfoTabMatrix.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = InfoTabMatrix.m; path = macosx/InfoTabMatrix.m; sourceTree = ""; }; A22A7EBC0C627FC200E30364 /* Greek */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Greek; path = macosx/Greek.lproj/InfoPlist.strings; sourceTree = ""; }; A22A7EBD0C627FC200E30364 /* Greek */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Greek; path = macosx/Greek.lproj/InfoWindow.nib; sourceTree = ""; }; A22A7EBE0C627FC200E30364 /* Greek */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Greek; path = macosx/Greek.lproj/Localizable.strings; sourceTree = ""; }; @@ -734,6 +739,8 @@ A257C1800CAD3003004E121C /* PeerTableView.m */, A2E23AC30CB5E1930002BB25 /* InfoTabButtonCell.h */, A2E23AC40CB5E1930002BB25 /* InfoTabButtonCell.m */, + A22A06EE0CB84903009694FE /* InfoTabMatrix.h */, + A22A06EF0CB84903009694FE /* InfoTabMatrix.m */, ); name = Sources; sourceTree = ""; @@ -1517,6 +1524,7 @@ A21282A80CA6C66800EAEE0F /* StatusBarView.m in Sources */, A257C1820CAD3003004E121C /* PeerTableView.m in Sources */, A2E23AC60CB5E1930002BB25 /* InfoTabButtonCell.m in Sources */, + A22A06F10CB84903009694FE /* InfoTabMatrix.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/macosx/English.lproj/InfoWindow.nib/classes.nib b/macosx/English.lproj/InfoWindow.nib/classes.nib index 88ee1dffb..cc8d3b9c7 100644 --- a/macosx/English.lproj/InfoWindow.nib/classes.nib +++ b/macosx/English.lproj/InfoWindow.nib/classes.nib @@ -4,6 +4,7 @@ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = ImageBackgroundView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = InfoTabButtonCell; LANGUAGE = ObjC; SUPERCLASS = NSButtonCell; }, + {CLASS = InfoTabMatrix; LANGUAGE = ObjC; SUPERCLASS = NSMatrix; }, { ACTIONS = { revealDataFile = id; diff --git a/macosx/English.lproj/InfoWindow.nib/info.nib b/macosx/English.lproj/InfoWindow.nib/info.nib index 0170f87c2..73bad5f91 100644 --- a/macosx/English.lproj/InfoWindow.nib/info.nib +++ b/macosx/English.lproj/InfoWindow.nib/info.nib @@ -29,8 +29,8 @@ IBOpenObjects - 5 1066 + 5 IBSystem Version 8R4031 diff --git a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib index 8bab1fe74..93dae1422 100644 Binary files a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib and b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib differ diff --git a/macosx/InfoTabButtonCell.h b/macosx/InfoTabButtonCell.h index 1dc083486..d10887a02 100644 --- a/macosx/InfoTabButtonCell.h +++ b/macosx/InfoTabButtonCell.h @@ -27,5 +27,10 @@ @interface InfoTabButtonCell : NSButtonCell { NSImage * fRegularImage, * fSelectedImage; + + BOOL fPushed; } + +- (void) setPushed: (BOOL) pushed; + @end diff --git a/macosx/InfoTabButtonCell.m b/macosx/InfoTabButtonCell.m index 3002ba444..489159d85 100644 --- a/macosx/InfoTabButtonCell.m +++ b/macosx/InfoTabButtonCell.m @@ -65,10 +65,16 @@ } } +- (void) setPushed: (BOOL) pushed +{ + fPushed = pushed; +} + - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView { + #warning dim instead of set selected NSImage * image; - if ([(NSMatrix *)controlView selectedCell] == self) + if ([(NSMatrix *)controlView selectedCell] == self || fPushed) { if (!fSelectedImage) [self setImage: nil]; diff --git a/macosx/InfoTabMatrix.h b/macosx/InfoTabMatrix.h new file mode 100644 index 000000000..ab7dd9de9 --- /dev/null +++ b/macosx/InfoTabMatrix.h @@ -0,0 +1,30 @@ +/****************************************************************************** + * $Id$ + * + * Copyright (c) 2007 Transmission authors and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +#import + +@interface InfoTabMatrix : NSMatrix +{ +} +@end diff --git a/macosx/InfoTabMatrix.m b/macosx/InfoTabMatrix.m new file mode 100644 index 000000000..4013592c5 --- /dev/null +++ b/macosx/InfoTabMatrix.m @@ -0,0 +1,35 @@ +/****************************************************************************** + * $Id$ + * + * Copyright (c) 2007 Transmission authors and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ + +#import "InfoTabMatrix.h" + +@implementation InfoTabMatrix + +- (void) highlightCell: (BOOL) flag atRow: (int) row column: (int) column +{ + [[self cellAtRow: row column: column] setPushed: flag]; + [super highlightCell: flag atRow: row column: column]; +} + +@end