mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 10:43:50 +00:00
Adjustments to save panel.
Reviewed by me.
This commit is contained in:
1 parent
95274f618c
commit
e6ea4c267a
2 files changed
+8
-17
No files matched your search
+1
-1
@@ -791,7 +791,7 @@ var CPDocumentUntitledCount = 0;
|
||||
if (!response)
|
||||
return;
|
||||
|
||||
var saveURL = [savePanel filename];
|
||||
var saveURL = [savePanel URL];
|
||||
|
||||
[[CPNotificationCenter defaultCenter]
|
||||
postNotificationName:CPDocumentWillSaveNotification
|
||||
|
||||
+7
-16
@@ -4,7 +4,7 @@
|
||||
|
||||
@implementation CPSavePanel : CPPanel
|
||||
{
|
||||
JSObject _savePanel;
|
||||
Object result;
|
||||
}
|
||||
|
||||
+ (id)savePanel
|
||||
@@ -12,20 +12,9 @@
|
||||
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();
|
||||
return [self runModalForDirectory:nil];
|
||||
}
|
||||
|
||||
- (CPInteger)runModalForDirectory:(CPString)anAbsoluteDirectoryPath
|
||||
@@ -33,12 +22,14 @@
|
||||
// FIXME: Is this correct???
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
return _savePanel.runModal(anAbsoluteDirectoryPath);
|
||||
var result = window.cpSavePanel(anAbsoluteDirectoryPath);
|
||||
|
||||
return result.button;
|
||||
}
|
||||
|
||||
- (CPString)filename
|
||||
- (CPURL)URL
|
||||
{
|
||||
return _savePanel.filename;
|
||||
return [CPURL URLWithString:result.URL];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user