Merge branch 'jake' of git@github.com:280north/cappuccino into jake

This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-11-14 07:25:37 -08:00
commit 9d50b33268
2 files changed
+28 -1

No files matched your search

+24 -1
View File
@@ -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;
+4
View File
@@ -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