mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-22 20:35:48 +03:00
shell_i: Use a more specific name for ContentManager
Since we use that class to lookup the NSBundle using bundleForClass use a more specific name to avoid any clash with any othe liferay extension. I couldn't figure out from the documentation if that is only resolved using the class name, but found some warnings on stackoverflow and better be safe than sorry for what it costs.
This commit is contained in:
parent
85938ab1f1
commit
0320627263
5 changed files with 14 additions and 14 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ContentManager : NSObject
|
||||
@interface OwnCloudFinderContentManager : NSObject
|
||||
{
|
||||
NSMutableDictionary* _fileNamesCache;
|
||||
NSMutableDictionary* _oldFileNamesCache;
|
||||
|
@ -31,7 +31,7 @@
|
|||
NSNumber *_icnErrSwm;
|
||||
}
|
||||
|
||||
+ (ContentManager*)sharedInstance;
|
||||
+ (OwnCloudFinderContentManager*)sharedInstance;
|
||||
|
||||
- (void)enableFileIcons:(BOOL)enable;
|
||||
- (NSNumber*)iconByPath:(NSString*)path isDirectory:(BOOL)isDir;
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
#import "RequestManager.h"
|
||||
#import "IconCache.h"
|
||||
|
||||
static ContentManager* sharedInstance = nil;
|
||||
static OwnCloudFinderContentManager* sharedInstance = nil;
|
||||
|
||||
@implementation ContentManager
|
||||
@implementation OwnCloudFinderContentManager
|
||||
- init
|
||||
{
|
||||
self = [super init];
|
||||
|
@ -49,7 +49,7 @@ static ContentManager* sharedInstance = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
+ (ContentManager*)sharedInstance
|
||||
+ (OwnCloudFinderContentManager*)sharedInstance
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ static BOOL installed = NO;
|
|||
|
||||
// NSLog(@"SyncStateFinder: uninstalling");
|
||||
|
||||
[[ContentManager sharedInstance] dealloc];
|
||||
[[OwnCloudFinderContentManager sharedInstance] dealloc];
|
||||
|
||||
[[IconCache sharedInstance] dealloc];
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
isDir = NO;
|
||||
}
|
||||
|
||||
NSNumber* imageIndex = [[ContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
NSNumber* imageIndex = [[OwnCloudFinderContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
|
||||
//NSLog(@"1 The icon index is %d", [imageIndex intValue]);
|
||||
if ([imageIndex intValue] > 0)
|
||||
|
@ -76,7 +76,7 @@
|
|||
isDir = NO;
|
||||
}
|
||||
|
||||
NSNumber* imageIndex = [[ContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
NSNumber* imageIndex = [[OwnCloudFinderContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
//NSLog(@"2 The icon index is %d %@ %@", [imageIndex intValue], [url path], isDir ? @"isDir" : @"");
|
||||
|
||||
if ([imageIndex intValue] > 0)
|
||||
|
@ -157,7 +157,7 @@
|
|||
isDir = NO;
|
||||
}
|
||||
|
||||
NSNumber* imageIndex = [[ContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
NSNumber* imageIndex = [[OwnCloudFinderContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
//NSLog(@"3 The icon index is %d", [imageIndex intValue]);
|
||||
|
||||
if ([imageIndex intValue] > 0)
|
||||
|
|
|
@ -101,27 +101,27 @@ static RequestManager* sharedInstance = nil;
|
|||
{
|
||||
// The client will broadcast all changes, do not fill the cache for paths that Finder didn't ask for.
|
||||
if ([_requestedPaths containsObject:path]) {
|
||||
[[ContentManager sharedInstance] setResultForPath:path result:result];
|
||||
[[OwnCloudFinderContentManager sharedInstance] setResultForPath:path result:result];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reFetchFileNameCacheForPath:(NSString*)path
|
||||
{
|
||||
[_requestedPaths removeAllObjects];
|
||||
[[ContentManager sharedInstance] reFetchFileNameCacheForPath:path];
|
||||
[[OwnCloudFinderContentManager sharedInstance] reFetchFileNameCacheForPath:path];
|
||||
}
|
||||
|
||||
- (void)registerPath:(NSString*)path
|
||||
{
|
||||
NSNumber *one = [NSNumber numberWithInt:1];
|
||||
[_registeredPathes setObject:one forKey:path];
|
||||
[[ContentManager sharedInstance] repaintAllWindows];
|
||||
[[OwnCloudFinderContentManager sharedInstance] repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)unregisterPath:(NSString*)path
|
||||
{
|
||||
[_registeredPathes removeObjectForKey:path];
|
||||
[[ContentManager sharedInstance] repaintAllWindows];
|
||||
[[OwnCloudFinderContentManager sharedInstance] repaintAllWindows];
|
||||
}
|
||||
|
||||
- (void)setShareMenuTitle:(NSString*)title
|
||||
|
@ -139,7 +139,7 @@ static RequestManager* sharedInstance = nil;
|
|||
[_requestedPaths removeAllObjects];
|
||||
|
||||
// clear the caches in conent manager
|
||||
ContentManager *contentman = [ContentManager sharedInstance];
|
||||
OwnCloudFinderContentManager *contentman = [OwnCloudFinderContentManager sharedInstance];
|
||||
[contentman clearFileNameCache];
|
||||
[contentman repaintAllWindows];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue