mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 10:20:59 +00:00
Merge branch 'jake' of git@github.com:280north/cappuccino into jake
This commit is contained in:
commit
9d50b33268
2 files changed
+28
-1
No files matched your search
+24
-1
@@ -5,6 +5,13 @@
|
||||
@implementation CPSavePanel : CPPanel
|
||||
{
|
||||
CPURL _URL;
|
||||
|
||||
BOOL _isExtensionHidden @accessors(getter=isExtensionHidden, setter=setExtensionHidden:);
|
||||
BOOL _canSelectHiddenExtension @accessors(property=canSelectHiddenExtension);
|
||||
BOOL _allowsOtherFileTypes @accessors(property=allowsOtherFileTypes);
|
||||
BOOL _canCreateDirectories @accessors(property=canCreateDirectories);
|
||||
|
||||
CPArray _allowedFileTypes @accessors(property=allowedFileTypes);
|
||||
}
|
||||
|
||||
+ (id)savePanel
|
||||
@@ -12,6 +19,16 @@
|
||||
return [[CPSavePanel alloc] init];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [super init])
|
||||
{
|
||||
_canCreateDirectories = YES;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (CPInteger)runModal
|
||||
{
|
||||
// FIXME: Is this correct???
|
||||
@@ -19,7 +36,13 @@
|
||||
|
||||
if (typeof window["cpSavePanel"] === "function")
|
||||
{
|
||||
var resultObject = window.cpSavePanel(),
|
||||
var resultObject = window.cpSavePanel({
|
||||
isExtensionHidden: _isExtensionHidden,
|
||||
canSelectHiddenExtension: _canSelectHiddenExtension,
|
||||
allowsOtherFileTypes: _allowsOtherFileTypes,
|
||||
canCreateDirectories: _canCreateDirectories,
|
||||
allowedFileTypes: _allowedFileTypes
|
||||
}),
|
||||
result = resultObject.button;
|
||||
|
||||
_URL = result ? [CPURL URLWithString:resultObject.URL] : nil;
|
||||
|
||||
@@ -588,10 +588,14 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
|
||||
- (void)mouseUp:(CPEvent)anEvent
|
||||
{
|
||||
if (![self isEditable] || ![self isEnabled])
|
||||
[[self nextResponder] mouseUp:anEvent];
|
||||
}
|
||||
|
||||
- (void)mouseDragged:(CPEvent)anEvent
|
||||
{
|
||||
if (![self isEditable] || ![self isEnabled])
|
||||
[[self nextResponder] mouseDragged:anEvent];
|
||||
}
|
||||
|
||||
- (void)keyUp:(CPEvent)anEvent
|
||||
|
||||
Reference in new issue
Block a user