mirror of
https://github.com/transmission/transmission
synced 2025-02-24 23:12:35 +00:00
Clicking on the pieces view will toggle between piece progress view and availability view (a tooltip clarifies which view is current).
This commit is contained in:
parent
631df817ae
commit
c0351c64c8
7 changed files with 98 additions and 5 deletions
Transmission.xcodeproj
macosx
|
@ -142,6 +142,8 @@
|
|||
A2A3065E0AAD24A80049E2AC /* UKFNSubscribeFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306560AAD24A80049E2AC /* UKFNSubscribeFileWatcher.m */; };
|
||||
A2A306600AAD24A80049E2AC /* UKKQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306580AAD24A80049E2AC /* UKKQueue.m */; };
|
||||
A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A3065A0AAD24A80049E2AC /* UKMainThreadProxy.m */; };
|
||||
A2AA579C0ADFCAB400CA59F6 /* PiecesImageView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A2AA579A0ADFCAB400CA59F6 /* PiecesImageView.h */; };
|
||||
A2AA579D0ADFCAB400CA59F6 /* PiecesImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AA579B0ADFCAB400CA59F6 /* PiecesImageView.m */; };
|
||||
A2AF1C390A3D0F6200F1575D /* FileTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AF1C370A3D0F6200F1575D /* FileTableView.m */; };
|
||||
A2BD40070A09BBEA008CCE96 /* bencode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1838B709DEC0430047D688 /* bencode.h */; };
|
||||
A2C655650A04FEDC00E9FD82 /* BottomBorder.png in Resources */ = {isa = PBXBuildFile; fileRef = A2C655640A04FEDC00E9FD82 /* BottomBorder.png */; };
|
||||
|
@ -179,6 +181,7 @@
|
|||
files = (
|
||||
A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */,
|
||||
A24F19210A3A796800C9C145 /* Sparkle.framework in CopyFiles */,
|
||||
A2AA579C0ADFCAB400CA59F6 /* PiecesImageView.h in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -285,7 +288,7 @@
|
|||
4DAB87C40ABE1F730081CF7E /* http.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = http.c; path = libtransmission/http.c; sourceTree = "<group>"; };
|
||||
4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TorrentCell.m; path = macosx/TorrentCell.m; sourceTree = "<group>"; };
|
||||
4DCCBB3D09C3D71100D3CABF /* TorrentCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TorrentCell.h; path = macosx/TorrentCell.h; sourceTree = "<group>"; };
|
||||
4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4DDBB71B09E16BF100284745 /* transmissioncli.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = transmissioncli.c; path = cli/transmissioncli.c; sourceTree = "<group>"; };
|
||||
4DDFDD20099A5D8E00189D81 /* DownloadBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownloadBadge.png; path = macosx/Images/DownloadBadge.png; sourceTree = "<group>"; };
|
||||
4DDFDD21099A5D8E00189D81 /* UploadBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = UploadBadge.png; path = macosx/Images/UploadBadge.png; sourceTree = "<group>"; };
|
||||
|
@ -373,6 +376,8 @@
|
|||
A2A306590AAD24A80049E2AC /* UKMainThreadProxy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = UKMainThreadProxy.h; path = macosx/UKKQueue/UKMainThreadProxy.h; sourceTree = "<group>"; };
|
||||
A2A3065A0AAD24A80049E2AC /* UKMainThreadProxy.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = UKMainThreadProxy.m; path = macosx/UKKQueue/UKMainThreadProxy.m; sourceTree = "<group>"; };
|
||||
A2A84AD20A04FCDC00C898D4 /* BottomBorder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = BottomBorder.png; path = macosx/Images/BottomBorder.png; sourceTree = "<group>"; };
|
||||
A2AA579A0ADFCAB400CA59F6 /* PiecesImageView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PiecesImageView.h; path = macosx/PiecesImageView.h; sourceTree = "<group>"; };
|
||||
A2AA579B0ADFCAB400CA59F6 /* PiecesImageView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PiecesImageView.m; path = macosx/PiecesImageView.m; sourceTree = "<group>"; };
|
||||
A2AF1C360A3D0F6200F1575D /* FileTableView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FileTableView.h; path = macosx/FileTableView.h; sourceTree = "<group>"; };
|
||||
A2AF1C370A3D0F6200F1575D /* FileTableView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = FileTableView.m; path = macosx/FileTableView.m; sourceTree = "<group>"; };
|
||||
A2C655640A04FEDC00E9FD82 /* BottomBorder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = BottomBorder.png; path = macosx/Images/BottomBorder.png; sourceTree = "<group>"; };
|
||||
|
@ -461,6 +466,8 @@
|
|||
A27ABC220A6ADE410020EC71 /* ImageBackgroundView.m */,
|
||||
A2710E740A86796000CE4F7D /* PrefsWindow.h */,
|
||||
A2710E750A86796000CE4F7D /* PrefsWindow.m */,
|
||||
A2AA579A0ADFCAB400CA59F6 /* PiecesImageView.h */,
|
||||
A2AA579B0ADFCAB400CA59F6 /* PiecesImageView.m */,
|
||||
);
|
||||
name = Sources;
|
||||
sourceTree = "<group>";
|
||||
|
@ -912,6 +919,7 @@
|
|||
A2A306620AAD24A80049E2AC /* UKMainThreadProxy.m in Sources */,
|
||||
A291DAAF0AC8BEB6003385E9 /* PiecesView.m in Sources */,
|
||||
A29C8B370ACC6EB3000ED9F9 /* PortChecker.m in Sources */,
|
||||
A2AA579D0ADFCAB400CA59F6 /* PiecesImageView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
6
macosx/English.lproj/InfoWindow.nib/classes.nib
generated
6
macosx/English.lproj/InfoWindow.nib/classes.nib
generated
|
@ -45,6 +45,12 @@
|
|||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
|
||||
{
|
||||
CLASS = PiecesImageView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {fPiecesView = PiecesView; };
|
||||
SUPERCLASS = NSImageView;
|
||||
},
|
||||
{
|
||||
CLASS = PiecesView;
|
||||
LANGUAGE = ObjC;
|
||||
|
|
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
Binary file not shown.
32
macosx/PiecesImageView.h
Normal file
32
macosx/PiecesImageView.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/******************************************************************************
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (c) 2005-2006 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 <Cocoa/Cocoa.h>
|
||||
#import "PiecesView.h"
|
||||
|
||||
@interface PiecesImageView : NSImageView
|
||||
{
|
||||
IBOutlet PiecesView * fPiecesView;
|
||||
}
|
||||
@end
|
40
macosx/PiecesImageView.m
Normal file
40
macosx/PiecesImageView.m
Normal file
|
@ -0,0 +1,40 @@
|
|||
/******************************************************************************
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (c) 2005-2006 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 "PiecesImageView.h"
|
||||
|
||||
@implementation PiecesImageView
|
||||
|
||||
- (BOOL) acceptsFirstMouse: (NSEvent *) event
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void) mouseDown: (NSEvent *) event
|
||||
{
|
||||
[fPiecesView toggleView];
|
||||
[super mouseDown: event];
|
||||
}
|
||||
|
||||
@end
|
|
@ -41,5 +41,6 @@
|
|||
|
||||
- (void) setTorrent: (Torrent *) torrent;
|
||||
- (void) updateView: (BOOL) first;
|
||||
- (void) toggleView;
|
||||
|
||||
@end
|
||||
|
|
|
@ -134,6 +134,9 @@
|
|||
[bp fill];
|
||||
[fBluePiece unlockFocus];
|
||||
|
||||
[fImageView setToolTip: [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]
|
||||
? @"Piece Availability" : @"Piece Progress"];
|
||||
|
||||
//actually draw the box
|
||||
[self setTorrent: nil];
|
||||
}
|
||||
|
@ -377,13 +380,16 @@
|
|||
free(piecesPercent);
|
||||
}
|
||||
|
||||
/*- (void) toggleView: (id) sender
|
||||
- (void) toggleView
|
||||
{
|
||||
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
|
||||
[defaults setBool: ![defaults boolForKey: @"PiecesViewShowAvailability"]
|
||||
forKey: @"PiecesViewShowAvailability"];
|
||||
BOOL showAvailability = ![defaults boolForKey: @"PiecesViewShowAvailability"];
|
||||
|
||||
[defaults setBool: showAvailability forKey: @"PiecesViewShowAvailability"];
|
||||
|
||||
[fImageView setToolTip: showAvailability ? @"Piece Availability" : @"Piece Progress"];
|
||||
|
||||
[self updateView: YES];
|
||||
}*/
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue