mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 01:18:02 +00:00
Merge remote-tracking branch 'upstream/master' into CPTableView-enumerateRows
This commit is contained in:
commit
b775cbb3bf
2 files changed
+20
-9
No files matched your search
+17
-2
@@ -26,7 +26,8 @@
|
||||
@class CPSplitView
|
||||
|
||||
@global CPPopUpButtonStatePullsDown
|
||||
|
||||
@global CPKeyValueChangeOldKey
|
||||
@global CPKeyValueChangeNewKey
|
||||
|
||||
@implementation CPButtonBar : CPView
|
||||
{
|
||||
@@ -129,10 +130,16 @@
|
||||
|
||||
- (void)setButtons:(CPArray)buttons
|
||||
{
|
||||
for (var i = [_buttons count] - 1; i >= 0; i--)
|
||||
[_buttons[i] removeObserver:self forKeyPath:@"hidden"];
|
||||
|
||||
_buttons = [CPArray arrayWithArray:buttons];
|
||||
|
||||
for (var i = 0, count = [_buttons count]; i < count; i++)
|
||||
for (var i = [_buttons count] - 1; i >= 0; i--)
|
||||
{
|
||||
[_buttons[i] addObserver:self forKeyPath:@"hidden" options:nil context:nil];
|
||||
[_buttons[i] setBordered:YES];
|
||||
}
|
||||
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
@@ -280,6 +287,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(CPString)keyPath ofObject:(id)object change:(CPDictionary)change context:(id)context
|
||||
{
|
||||
if ([change objectForKey:CPKeyValueChangeOldKey] == [change objectForKey:CPKeyValueChangeNewKey])
|
||||
return;
|
||||
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)setFrameSize:(CGSize)aSize
|
||||
{
|
||||
[super setFrameSize:aSize];
|
||||
|
||||
@@ -99,7 +99,6 @@ GLOBAL(CFHTTPRequest) = function()
|
||||
this._isOpen = false;
|
||||
this._requestHeaders = {};
|
||||
this._mimeType = null;
|
||||
this._withCredentials = false;
|
||||
|
||||
this._eventDispatcher = new EventDispatcher(this);
|
||||
this._nativeRequest = new NativeRequest();
|
||||
@@ -225,9 +224,7 @@ CFHTTPRequest.prototype.open = function(/*String*/ aMethod, /*String*/ aURL, /*B
|
||||
this._method = aMethod;
|
||||
this._user = aUser;
|
||||
this._password = aPassword;
|
||||
var result = this._nativeRequest.open(aMethod, aURL, isAsynchronous, aUser, aPassword);
|
||||
this._nativeRequest.withCredentials = this._withCredentials;
|
||||
return result;
|
||||
return this._nativeRequest.open(aMethod, aURL, isAsynchronous, aUser, aPassword);
|
||||
};
|
||||
|
||||
CFHTTPRequest.prototype.send = function(/*Object*/ aBody)
|
||||
@@ -236,7 +233,6 @@ CFHTTPRequest.prototype.send = function(/*Object*/ aBody)
|
||||
{
|
||||
delete this._nativeRequest.onreadystatechange;
|
||||
this._nativeRequest.open(this._method, this._URL, this._async, this._user, this._password);
|
||||
this._nativeRequest.withCredentials = this._withCredentials;
|
||||
this._nativeRequest.onreadystatechange = this._stateChangeHandler;
|
||||
}
|
||||
|
||||
@@ -280,12 +276,12 @@ CFHTTPRequest.prototype.removeEventListener = function(/*String*/ anEventName, /
|
||||
|
||||
CFHTTPRequest.prototype.setWithCredentials = function(/*Boolean*/ willSendWithCredentials)
|
||||
{
|
||||
this.withCredentials = willSendWithCredentials;
|
||||
this._nativeRequest.withCredentials = willSendWithCredentials;
|
||||
};
|
||||
|
||||
CFHTTPRequest.prototype.getWithCredentials = function()
|
||||
{
|
||||
return this.withCredentials;
|
||||
return this._nativeRequest.withCredentials;
|
||||
};
|
||||
|
||||
function determineAndDispatchHTTPRequestEvents(/*CFHTTPRequest*/ aRequest)
|
||||
|
||||
Reference in new issue
Block a user