More desktop differences.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-09-22 19:32:53 -07:00
1 parent f109313d32
commit ebbf3c4576
1 file changed
+44
+44
View File
@@ -0,0 +1,44 @@
@import <AppKit/CPPanel.j>
@implementation CPSavePanel : CPPanel
{
JSObject _savePanel;
}
+ (id)savePanel
{
return [[CPSavePanel alloc] init];
}
- (id)init
{
if (self = [super init])
_savePanel = window.application.createSavePanel();
return self;
}
- (CPInteger)runModal
{
// FIXME: Is this correct???
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
return _savePanel.runModal();
}
- (CPInteger)runModalForDirectory:(CPString)anAbsoluteDirectoryPath
{
// FIXME: Is this correct???
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
return _savePanel.runModal(anAbsoluteDirectoryPath);
}
- (CPString)filename
{
return _savePanel.filename;
}
@end