Permalink
Browse files

Capp lint where possible

  • Loading branch information...
1 parent 3e4e966 commit f5108835e3be1bf055532adf0cdce95e56a36187 @primalmotion primalmotion committed Jan 19, 2013
Showing with 43 additions and 43 deletions.
  1. +1 −1 TNStropheClient.j
  2. +35 −35 TNStropheConnection.j
  3. +7 −7 TNStropheContact.j
View
2 TNStropheClient.j
@@ -452,7 +452,7 @@ TNStropheClientVCardReceivedNotification = @"TNStropheClientVCardReceived
#pragma mark -
#pragma mark Password management
-/*! Change the current user password using XEP-0077 (InBand Registration)
+/*! Change the current user password using XEP 0077 (InBand Registration)
@param aPassword string containing the new password
*/
- (void)changePassword:(CPString)aPassword
View
70 TNStropheConnection.j
@@ -147,7 +147,7 @@ var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
if ([bundle objectForInfoDictionaryKey:@"TNStropheJSUseCappuccinoRunLoop"] == 1)
{
- CPLog.info("StropheCappuccino has been compiled to use the Cappuccino runloop. unsing interval of "+ _stropheJSRunloopInterval);
+ CPLog.info("StropheCappuccino has been compiled to use the Cappuccino runloop. unsing interval of " + _stropheJSRunloopInterval);
Strophe.setTimeout = function(f, delay)
{
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
@@ -402,40 +402,40 @@ var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
- (id)registerSelector:(SEL)aSelector ofObject:(CPObject)anObject withDict:(id)aDict userInfo:(id)someUserInfo handlerDelegate:(id)aHandlerDelegate
{
var from = ([[aDict valueForKey:@"from"] isKindOfClass:CPString]) ? [aDict valueForKey:@"from"] : [[aDict valueForKey:@"from"] stringValue],
- handlerId = _connection.addHandler(function(stanza)
- {
- // seems to be a good practice to pump the runloop in async function
- [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
-
- var stanzaObject = [TNStropheStanza stanzaWithStanza:stanza],
- ret;
-
- if (someUserInfo)
- ret = [anObject performSelector:aSelector withObject:stanzaObject withObject:someUserInfo];
- else
- ret = [anObject performSelector:aSelector withObject:stanzaObject];
-
- CPLog.trace("StropheCappuccino stanza received that trigger selector : " + [anObject class] + "." + aSelector);
- CPLog.trace(stanzaObject);
-
- // experimental thing
- delete aDict.options;
- delete someUserInfo;
-
- if (aHandlerDelegate && [aHandlerDelegate respondsToSelector:@selector(stropheConnection:performedHandlerId:)])
- [aHandlerDelegate stropheConnection:self performedHandlerId:handlerId]
-
- someUserInfo = nil;
-
- [_registeredHandlers removeObject:handlerId];
- return ret;
- },
- [aDict valueForKey:@"namespace"],
- [aDict valueForKey:@"name"],
- [aDict valueForKey:@"type"],
- [aDict valueForKey:@"id"],
- from,
- [aDict valueForKey:@"options"]);
+ handlerId = _connection.addHandler(function(stanza)
+ {
+ // seems to be a good practice to pump the runloop in async function
+ [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
+
+ var stanzaObject = [TNStropheStanza stanzaWithStanza:stanza],
+ ret;
+
+ if (someUserInfo)
+ ret = [anObject performSelector:aSelector withObject:stanzaObject withObject:someUserInfo];
+ else
+ ret = [anObject performSelector:aSelector withObject:stanzaObject];
+
+ CPLog.trace("StropheCappuccino stanza received that trigger selector : " + [anObject class] + "." + aSelector);
+ CPLog.trace(stanzaObject);
+
+ // experimental thing
+ delete aDict.options;
+ delete someUserInfo;
+
+ if (aHandlerDelegate && [aHandlerDelegate respondsToSelector:@selector(stropheConnection:performedHandlerId:)])
+ [aHandlerDelegate stropheConnection:self performedHandlerId:handlerId]
+
+ someUserInfo = nil;
+
+ [_registeredHandlers removeObject:handlerId];
+ return ret;
+ },
+ [aDict valueForKey:@"namespace"],
+ [aDict valueForKey:@"name"],
+ [aDict valueForKey:@"type"],
+ [aDict valueForKey:@"id"],
+ from,
+ [aDict valueForKey:@"options"]);
[_registeredHandlers addObject:handlerId];
View
14 TNStropheContact.j
@@ -124,13 +124,13 @@ TNStropheContactImageNewError = nil;
{
var bundle = [CPBundle bundleForClass:TNStropheContact];
- TNStropheContactImageOffline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"gray.png"] size:CPSizeMake(8.0, 8.0)];
- TNStropheContactImageOnline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"green.png"] size:CPSizeMake(8.0, 8.0)];
- TNStropheContactImageBusy = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"red.png"] size:CPSizeMake(8.0, 8.0)];
- TNStropheContactImageAway = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"orange.png"] size:CPSizeMake(8.0, 8.0)];
- TNStropheContactImageDND = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"black.png"] size:CPSizeMake(8.0, 8.0)];
- TNStropheContactImageNewMessage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"blue.png"] size:CPSizeMake(8.0, 8.0)];
- TNStropheContactImageNewError = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"error.png"] size:CPSizeMake(8.0, 8.0)];
+ TNStropheContactImageOffline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"gray.png"] size:CGSizeMake(8.0, 8.0)];
+ TNStropheContactImageOnline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"green.png"] size:CGSizeMake(8.0, 8.0)];
+ TNStropheContactImageBusy = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"red.png"] size:CGSizeMake(8.0, 8.0)];
+ TNStropheContactImageAway = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"orange.png"] size:CGSizeMake(8.0, 8.0)];
+ TNStropheContactImageDND = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"black.png"] size:CGSizeMake(8.0, 8.0)];
+ TNStropheContactImageNewMessage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"blue.png"] size:CGSizeMake(8.0, 8.0)];
+ TNStropheContactImageNewError = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"error.png"] size:CGSizeMake(8.0, 8.0)];
}

0 comments on commit f510883

Please sign in to comment.