source: trunk/macosx/PrefsController.h @ 11421

Last change on this file since 11421 was 11421, checked in by livings124, 11 years ago

#3742 entering a blocklist URL should register while typing (and support undo) - boo for glue code replacing bindings!

  • Property svn:keywords set to Date Rev Author Id
File size: 5.4 KB
Line 
1/******************************************************************************
2 * $Id: PrefsController.h 11421 2010-11-15 00:25:18Z livings124 $
3 *
4 * Copyright (c) 2005-2010 Transmission authors and contributors
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *****************************************************************************/
24
25#import <Cocoa/Cocoa.h>
26#import <transmission.h>
27
28@class PortChecker;
29
30@interface PrefsController : NSWindowController
31{
32    NSUserDefaults * fDefaults;
33    BOOL fHasLoaded;
34   
35    IBOutlet NSView * fGeneralView, * fTransfersView, * fBandwidthView, * fPeersView, * fNetworkView, * fRemoteView, * fGroupsView;
36   
37    NSString * fInitialString;
38   
39    IBOutlet NSPopUpButton * fFolderPopUp, * fIncompleteFolderPopUp, * fImportFolderPopUp;
40    IBOutlet NSTextField * fRatioStopField, * fIdleStopField, * fQueueDownloadField, * fQueueSeedField, * fStalledField;
41
42    IBOutlet NSTextField * fUploadField, * fDownloadField,
43                        * fSpeedLimitUploadField, * fSpeedLimitDownloadField;
44    IBOutlet NSPopUpButton * fAutoSpeedDayTypePopUp;
45   
46    IBOutlet NSTextField * fPeersGlobalField, * fPeersTorrentField,
47                        * fBlocklistURLField, * fBlocklistMessageField, * fBlocklistDateField;
48    IBOutlet NSButton * fBlocklistButton;
49   
50    PortChecker * fPortChecker;
51    IBOutlet NSTextField * fPortField, * fPortStatusField;
52    IBOutlet NSButton * fNatCheck;
53    IBOutlet NSImageView * fPortStatusImage;
54    IBOutlet NSProgressIndicator * fPortStatusProgress;
55    NSTimer * fPortStatusTimer;
56    int fPeerPort, fNatStatus;
57   
58    IBOutlet NSTextField * fRPCPortField, * fRPCPasswordField;
59    IBOutlet NSTableView * fRPCWhitelistTable;
60    NSMutableArray * fRPCWhitelistArray;
61    IBOutlet NSSegmentedControl * fRPCAddRemoveControl;
62    NSString * fRPCPassword;
63}
64
65+ (void) setHandle: (tr_session *) handle;
66+ (tr_session *) handle;
67
68- (void) setAutoUpdateToBeta: (id) sender;
69
70- (void) setPort: (id) sender;
71- (void) randomPort: (id) sender;
72- (void) setRandomPortOnStart: (id) sender;
73- (void) setNat: (id) sender;
74- (void) updatePortStatus;
75- (void) portCheckerDidFinishProbing: (PortChecker *) portChecker;
76
77- (NSArray *) sounds;
78- (void) setSound: (id) sender;
79
80- (void) setPeersGlobal: (id) sender;
81- (void) setPeersTorrent: (id) sender;
82
83- (void) setPEX: (id) sender;
84- (void) setDHT: (id) sender;
85- (void) setLPD: (id) sender;
86
87- (void) setEncryptionMode: (id) sender;
88
89- (void) setBlocklistEnabled: (id) sender;
90- (void) setBlocklistURL: (id) sender;
91- (void) updateBlocklist: (id) sender;
92- (void) setBlocklistAutoUpdate: (id) sender;
93- (void) updateBlocklistFields;
94- (void) updateBlocklistURLField;
95- (void) updateBlocklistButton;
96
97- (void) setAutoStartDownloads: (id) sender;
98
99- (void) setBadge: (id) sender;
100
101- (void) resetWarnings: (id) sender;
102
103- (void) setDefaultForMagnets: (id) sender;
104
105- (void) setQueue: (id) sender;
106- (void) setQueueNumber: (id) sender;
107
108- (void) setStalled: (id) sender;
109- (void) setStalledMinutes: (id) sender;
110
111- (void) setDownloadLocation: (id) sender;
112- (void) folderSheetShow: (id) sender;
113- (void) incompleteFolderSheetShow: (id) sender;
114- (void) setUseIncompleteFolder: (id) sender;
115
116- (void) setRenamePartialFiles: (id) sender;
117
118- (void) applyRatioSetting: (id) sender;
119- (void) setRatioStop: (id) sender;
120- (void) updateRatioStopField;
121
122- (void) applyIdleStopSetting: (id) sender;
123- (void) setIdleStop: (id) sender;
124
125- (void) applySpeedSettings: (id) sender;
126- (void) applyAltSpeedSettings;
127
128- (void) updateLimitFields;
129- (void) setGlobalLimit: (id) sender;
130
131- (void) setSpeedLimit: (id) sender;
132- (void) setAutoSpeedLimit: (id) sender;
133- (void) setAutoSpeedLimitTime: (id) sender;
134- (void) setAutoSpeedLimitDay: (id) sender;
135+ (NSInteger) dateToTimeSum: (NSDate *) date;
136+ (NSDate *) timeSumToDate: (NSInteger) sum;
137
138- (void) setAutoImport: (id) sender;
139- (void) importFolderSheetShow: (id) sender;
140
141- (void) setAutoSize: (id) sender;
142
143- (void) setRPCEnabled: (id) sender;
144- (void) linkWebUI: (id) sender;
145- (void) setRPCAuthorize: (id) sender;
146- (void) setRPCUsername: (id) sender;
147- (void) setRPCPassword: (id) sender;
148- (void) updateRPCPassword;
149- (void) setRPCPort: (id) sender;
150- (void) setRPCUseWhitelist: (id) sender;
151- (void) setRPCWebUIDiscovery: (id) sender;
152- (void) updateRPCWhitelist;
153- (void) addRemoveRPCIP: (id) sender;
154
155- (void) helpForPeers: (id) sender;
156- (void) helpForNetwork: (id) sender;
157- (void) helpForRemote: (id) sender;
158
159- (void) rpcUpdatePrefs;
160
161@end
Note: See TracBrowser for help on using the repository browser.