1 // MacTF Copyright 2004 Nathan Oates
5 * This source code is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Public License as published
7 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version.
10 * This source code is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * Please refer to the GNU Public License for more details.
15 * You should have received a copy of the GNU Public License along with
16 * this source code; if not, write to:
17 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /* This file was modified by Kalle Olavi Niemitalo on 2007-10-18. */
22 #import <Cocoa/Cocoa.h>
23 #import "DataHandler.h"
24 #import "TFUSBController.h"
25 #import <iLifeControls/NFIWindow.h>
27 @interface UIElements
: NSObject
29 IBOutlet id availSpaceField
;
30 IBOutlet id freeSpaceField
;
31 IBOutlet DataHandler
* dh
; //move
32 IBOutlet id tableView
;// and this?
33 IBOutlet id statusField
;
34 IBOutlet id progressBar
;
35 IBOutlet id connectButton
;
36 IBOutlet id connectLight
;
38 IBOutlet NSTextField
* versionField
;
39 IBOutlet NFIWindow
* mainWindow
;
40 IBOutlet id prefsWindow
;
41 IBOutlet id renameWindow
;
42 IBOutlet id newFolderWindow
;
44 IBOutlet id altRateSlider
;
47 IBOutlet id previewDrawer
;
48 IBOutlet id progressTime
;
49 IBOutlet id renameOld
;
50 IBOutlet id renameNew
;
51 IBOutlet id newFolderNew
;
52 IBOutlet id downloadMenu
;
53 IBOutlet id uploadMenu
;
54 IBOutlet id renameMenu
;
55 IBOutlet id deleteMenu
;
56 IBOutlet id currentlyField
;
58 IBOutlet id recDuration
;
59 IBOutlet id recDescription
;
60 IBOutlet id recExtInfo
;
62 IBOutlet id recChannel
;
63 IBOutlet id drawerTabView
;
65 IBOutlet id pauseButton
;
66 IBOutlet id searchField
;
67 NSTableColumn
* selectedColumn
;
70 TFUSBController
* tfusbc
;
71 USBDeviceContext
* context
;
72 NSString
* currentPath
;
73 NSUserDefaults
*prefs
;
75 NSString
*highlightImageData
;
76 NSImage
*highlightImage
;
78 - (BOOL
)validateMenuItem
:(NSMenuItem
*)anItem
;
79 - (void)tableViewSelectionDidChange
:(NSNotification
*)aNotification
;
80 - (void) setAvailableSpace
:(NSData
*) input
;
81 - (void) setFreeSpace
: (NSData
*) input
;
82 - (NSString
*) prepForSizeDisplay
:(NSData
*) input
;
83 - (IBAction
) connect
: (id
) sender
;
84 //- (IBAction) tempGoToPath: (id) sender;
85 - (int) goToPath
:(NSString
*) path
;
86 - (void)doubleClick
:(id
)sender
;
87 - (void) downloadFileDoubleClickThread
:(NSDictionary
*)fileInfo
;
88 //- (void) updateHDDSize ;
89 - (NSString
*) currentPath
;
90 //- (IBAction) snapshot:(id) sender;
91 - (IBAction
) downloadSelectedFile
:(id
)sender
;
92 - (IBAction
) uploadFile
: (id
) sender
;
93 - (void) uploadPath
:(NSString
*) path toPath
:(NSString
*) toPath
;
94 - (IBAction
) toggleTurbo
:(id
)sender
;
95 - (IBAction
) toggleTurboCB
:(id
)sender
;
96 - (IBAction
) togglePreview
:(id
)sender
;
97 //- (IBAction) epg:(id) sender;
98 - (void) finishTransfer
;
99 - (IBAction
)deleteFile
:(id
)sender
;
100 - (void)sheetDidEnd
:(NSWindow
*)sheet returnCode
:(int)returnCode contextInfo
:(void *)contextInfo
;
101 - (IBAction
)openPrefsSheet
:(id
)sender
;
102 - (IBAction
) mySheetDidEnd
:(NSWindow
*)sheet returnCode
:(int)returnCode contextInfo
:(void *)contextInfo
;
103 - (IBAction
)closePrefsSheet
:(id
)sender
;
104 - (IBAction
)openRenameSheet
:(id
)sender
;
105 - (IBAction
)closeRenameSheet
:(id
)sender
;
106 - (IBAction
)cancelRename
:(id
)sender
;
107 - (IBAction
)openNewFolderSheet
:(id
)sender
;
108 - (IBAction
)closeNewFolderSheet
:(id
)sender
;
109 - (IBAction
)cancelNewFolder
:(id
)sender
;
110 - (IBAction
)pathBarClick
:(id
)sender
;
111 - (IBAction
)pauseCurrentTransfer
:(id
)sender
;
113 - (USBDeviceContext
*) getContext
;
114 - (NSNumber
*) isConnected
;
115 - (id
) selectedColumn
;
116 - (id
) currentlyField
;
119 //- (NSArray*) snapshotOfPath:(NSString*)path ;