diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2015-02-17 20:15:25 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2015-02-17 20:23:30 +0300 |
commit | ccf4298c817a023c7f209f0315f4735d23861e51 (patch) | |
tree | 6336fc8cf282fbd772641cfb51fe71cfafd25fba /shell_integration | |
parent | 0b461e227502d581ecebc7ab0ee759eacb3121c9 (diff) |
shell_integration: Cleanup our uses of NSLog
Remove info messages and make sure that error messages
have an OwnCloud prefix since they will be reported by
Finder's process.
Diffstat (limited to 'shell_integration')
4 files changed, 25 insertions, 25 deletions
diff --git a/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m b/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m index 5c403b7ee..0d24af8cb 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m +++ b/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m @@ -72,7 +72,7 @@ static ContentManager* sharedInstance = nil; _icnWarnSwm = [[IconCache sharedInstance] registerIcon:[base stringByAppendingPathComponent:@"warning_swm.icns"]]; _icnErrSwm = [[IconCache sharedInstance] registerIcon:[base stringByAppendingPathComponent:@"error_swm.icns"]]; - NSLog(@"Icon ok identifier: %d from %@", [_icnOk intValue], [base stringByAppendingString:@"ok.icns"]); + // NSLog(@"Icon ok identifier: %d from %@", [_icnOk intValue], [base stringByAppendingString:@"ok.icns"]); } - (void)enableFileIcons:(BOOL)enable @@ -111,7 +111,7 @@ static ContentManager* sharedInstance = nil; }else if( [result isEqualToString:@"NOP"]) { // Nothing. } else { - NSLog(@"Unknown status code %@", result); + NSLog(@"OwnCloud: Unknown status code %@", result); } NSString* normalizedPath = [path decomposedStringWithCanonicalMapping]; @@ -129,7 +129,7 @@ static ContentManager* sharedInstance = nil; //NSLog(@"%@ %@", NSStringFromSelector(_cmd), path); if (!_fileIconsEnabled) { - NSLog(@"Icons are NOT ENABLED!"); + NSLog(@"OwnCloud: Icons are NOT ENABLED!"); // return nil; } diff --git a/shell_integration/MacOSX/OwnCloudFinder/FinderHook.m b/shell_integration/MacOSX/OwnCloudFinder/FinderHook.m index 72b0445f8..72baab269 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/FinderHook.m +++ b/shell_integration/MacOSX/OwnCloudFinder/FinderHook.m @@ -44,12 +44,12 @@ static BOOL installed = NO; { if (installed) { - NSLog(@"OwnCloudFinder: already installed"); + // NSLog(@"OwnCloudFinder: already installed"); return; } - NSLog(@"OwnCloudFinder: installing ownCloud Shell extension"); + // NSLog(@"OwnCloudFinder: installing ownCloud Shell extension"); [RequestManager sharedInstance]; @@ -81,19 +81,19 @@ static BOOL installed = NO; installed = YES; - NSLog(@"OwnCloudFinder: installed"); + // NSLog(@"OwnCloudFinder: installed"); } + (void)uninstall { if (!installed) { - NSLog(@"OwnCloudFinder: not installed"); + // NSLog(@"OwnCloudFinder: not installed"); return; } - NSLog(@"OwnCloudFinder: uninstalling"); + // NSLog(@"OwnCloudFinder: uninstalling"); [[ContentManager sharedInstance] dealloc]; @@ -119,7 +119,7 @@ static BOOL installed = NO; installed = NO; - NSLog(@"OwnCloudFinder: uninstalled"); + // NSLog(@"OwnCloudFinder: uninstalled"); } @end
\ No newline at end of file diff --git a/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m b/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m index 37e8df191..8d8f96730 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m +++ b/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m @@ -138,7 +138,7 @@ static RequestManager* sharedInstance = nil; ContentManager *contentman = [ContentManager sharedInstance]; if( chunks && [chunks count] > 0 && tag == READ_TAG ) { - NSLog(@"READ from socket (%ld): <%@>", tag, answer); + // NSLog(@"READ from socket (%ld): <%@>", tag, answer); if( [[chunks objectAtIndex:0] isEqualToString:@"STATUS"] ) { NSString *path = [chunks objectAtIndex:2]; if( [chunks count] > 3 ) { @@ -154,7 +154,7 @@ static RequestManager* sharedInstance = nil; } else if( [[chunks objectAtIndex:0 ] isEqualToString:@"REGISTER_PATH"] ) { NSNumber *one = [NSNumber numberWithInt:1]; NSString *path = [chunks objectAtIndex:1]; - NSLog(@"Registering path: %@", path); + // NSLog(@"Registering path: %@", path); [_registeredPathes setObject:one forKey:path]; [contentman repaintAllWindows]; @@ -168,12 +168,12 @@ static RequestManager* sharedInstance = nil; [[ContentManager sharedInstance] loadIconResourcePath:path]; } else if( [[chunks objectAtIndex:0 ] isEqualToString:@"SHARE_MENU_TITLE"] ) { _shareMenuTitle = [[chunks objectAtIndex:1] copy]; - NSLog(@"Received shar menu title: %@", _shareMenuTitle); + // NSLog(@"Received shar menu title: %@", _shareMenuTitle); } else { - NSLog(@"Unknown command %@", [chunks objectAtIndex:0]); + NSLog(@"OwnCloud: Unknown command %@", [chunks objectAtIndex:0]); } } else if (tag != READ_TAG) { - NSLog(@"Received unknown tag %ld <%@>", tag, answer); + NSLog(@"OwnCloud: Received unknown tag %ld <%@>", tag, answer); } // Read on and on NSData* stop = [@"\n" dataUsingEncoding:NSUTF8StringEncoding]; @@ -188,13 +188,13 @@ static RequestManager* sharedInstance = nil; } -(void)socket:(GCDAsyncSocket*)socket didConnectToUrl:(NSURL *)url { - NSLog( @"Connected to sync client successfully on %@", url); + // NSLog( @"Connected to sync client successfully on %@", url); _isConnected = YES; [self askOnSocket:@"" query:@"SHARE_MENU_TITLE"]; if( [_requestQueue count] > 0 ) { - NSLog( @"We have to empty the queue"); + // NSLog( @"We have to empty the queue"); for( NSString *path in _requestQueue ) { [self askOnSocket:path query:@"RETRIEVE_FILE_STATUS"]; } @@ -211,7 +211,7 @@ static RequestManager* sharedInstance = nil; - (void)socketDidDisconnect:(GCDAsyncSocket*)socket withError:(NSError*)err { - NSLog(@"Socket DISconnected! %@", [err localizedDescription]); + // NSLog(@"Socket DISconnected! %@", [err localizedDescription]); _isConnected = NO; @@ -272,7 +272,7 @@ static RequestManager* sharedInstance = nil; if (!pnsError && paths && [paths count] > 0) { NSString *currentLatestPath = nil; if (paths.count > 1) { - NSLog(@"Possible paths: %@", paths); + // NSLog(@"Possible paths: %@", paths); } for (int i = 0; i < paths.count; i++) { NSString *currentPath = [syncStateHelperDir stringByAppendingPathComponent:[paths objectAtIndex:i]]; @@ -288,7 +288,7 @@ static RequestManager* sharedInstance = nil; } } if (url) { - NSLog(@"Connect Socket to %@", url); + // NSLog(@"Connect Socket to %@", url); [_socket connectToUrl:url withTimeout:1 error:&err]; } } @@ -296,7 +296,7 @@ static RequestManager* sharedInstance = nil; - (void)menuItemClicked:(NSDictionary*)actionDictionary { - NSLog(@"RequestManager menuItemClicked %@", actionDictionary); + // NSLog(@"RequestManager menuItemClicked %@", actionDictionary); NSArray *filePaths = [actionDictionary valueForKey:@"files"]; for (int i = 0; i < filePaths.count; i++) { [self askOnSocket:[filePaths objectAtIndex:i] query:@"SHARE"]; diff --git a/shell_integration/MacOSX/OwnCloudInjector/OwnCloudInjector.m b/shell_integration/MacOSX/OwnCloudInjector/OwnCloudInjector.m index 0f8c55f3a..67760090c 100644 --- a/shell_integration/MacOSX/OwnCloudInjector/OwnCloudInjector.m +++ b/shell_integration/MacOSX/OwnCloudInjector/OwnCloudInjector.m @@ -78,14 +78,14 @@ static OSErr loadBundle(LNBundleType type, AppleEvent* reply, long refcon) { minVersion = FINDER_MIN_TESTED_VERSION; break; default: - NSLog(@"Failed to load bundle for type %d", type); + NSLog(@"OwnCloudInjector: Failed to load bundle for type %d", type); return 8; break; } if (isLoaded) { - NSLog(@"OwnCloudInjector: %@ already loaded.", bundleName); + // NSLog(@"OwnCloudInjector: %@ already loaded.", bundleName); return noErr; } @@ -149,7 +149,7 @@ static OSErr loadBundle(LNBundleType type, AppleEvent* reply, long refcon) { } id principalClassObject = NSClassFromString(NSStringFromClass(principalClass)); if ([principalClassObject respondsToSelector:@selector(install)]) { - NSLog(@"LiferayNativityInjector: Installing %@ ...", bundleName); + // NSLog(@"OwnCloudInjector: Installing %@ ...", bundleName); [principalClassObject install]; } @@ -232,7 +232,7 @@ EXPORT OSErr HandleUnloadEvent(const AppleEvent* ev, AppleEvent* reply, long ref @autoreleasepool { @try { if (!liferayNativityLoaded) { - NSLog(@"OwnCloudInjector: not loaded."); + // NSLog(@"OwnCloudInjector: not loaded."); return noErr; } @@ -253,7 +253,7 @@ EXPORT OSErr HandleUnloadEvent(const AppleEvent* ev, AppleEvent* reply, long ref } id principalClassObject = NSClassFromString(NSStringFromClass(principalClass)); if ([principalClassObject respondsToSelector:@selector(uninstall)]) { - NSLog(@"LiferayNativityInjector: Uninstalling %@ ...", bundleName); + // NSLog(@"OwnCloudInjector: Uninstalling %@ ...", bundleName); [principalClassObject uninstall]; } |