[Pkg-owncloud-commits] [owncloud-client] 272/332: OverlaysMac: Make use of REGISTER_PATH to learn the synced dirs.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:11 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 68f0227ca1f5c07a0696ad8902bd4f60d3928e47
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon Jul 28 15:11:19 2014 +0200

    OverlaysMac: Make use of REGISTER_PATH to learn the synced dirs.
---
 .../MacOSX/LiferayNativityFinder/RequestManager.m  | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/shell_integration/MacOSX/LiferayNativityFinder/RequestManager.m b/shell_integration/MacOSX/LiferayNativityFinder/RequestManager.m
index 6a12689..ab9600a 100644
--- a/shell_integration/MacOSX/LiferayNativityFinder/RequestManager.m
+++ b/shell_integration/MacOSX/LiferayNativityFinder/RequestManager.m
@@ -135,20 +135,22 @@ static RequestManager* sharedInstance = nil;
 		if( [[chunks objectAtIndex:0] isEqualToString:@"STATUS"] ) {
 			[contentman setResultForPath:[chunks objectAtIndex:2] result:[chunks objectAtIndex:1]];
 		} else if( [[chunks objectAtIndex:0] isEqualToString:@"UPDATE_VIEW"] ) {
-			BOOL redraw = NO;
-			if( [_registeredPathes count] == 0 ) {
-				redraw = YES;
-			}
-
 			NSString *path = [chunks objectAtIndex:1];
+			[contentman clearFileNameCacheForPath:path];
+
+			[contentman repaintAllWindows];
+		} else if( [[chunks objectAtIndex:0 ] isEqualToString:@"REGISTER_PATH"] ) {
 			NSNumber *one = [NSNumber numberWithInt:1];
+			NSString *path = [chunks objectAtIndex:1];
 			[_registeredPathes setObject:one forKey:path];
+			
+			[contentman repaintAllWindows];
+		} else if( [[chunks objectAtIndex:0 ] isEqualToString:@"UNREGISTER_PATH"] ) {
+			NSNumber *one = [NSNumber numberWithInt:1];
+			NSString *path = [chunks objectAtIndex:1];
+			[_registeredPathes removeObjectForKey:path];
 
-			[contentman clearFileNameCacheForPath:path];
-
-			if( redraw ) {
-				[contentman repaintAllWindows];
-			}
+			[contentman repaintAllWindows];
 		} else {
 			NSLog(@"Unknown command %@", [chunks objectAtIndex:0]);
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list