/[gnustep]/gnustep/usr-apps/gworkspace/Viewers/SmallIconsViewer/SmallIconsViewer.m
ViewVC logotype

Diff of /gnustep/usr-apps/gworkspace/Viewers/SmallIconsViewer/SmallIconsViewer.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by esersale, Fri Sep 26 10:25:39 2003 UTC revision 1.4 by esersale, Tue Sep 30 15:38:06 2003 UTC
# Line 71  if (rct.size.height < 0) rct.size.height Line 71  if (rct.size.height < 0) rct.size.height
71          self = [super initWithFrame: NSZeroRect];          self = [super initWithFrame: NSZeroRect];
72                    
73          if (self) {          if (self) {
     #ifdef GNUSTEP  
                   Class gwclass = [[NSBundle mainBundle] principalClass];  
     #else  
                   Class gwclass = [[NSBundle mainBundle] classNamed: @"GWorkspace"];  
     #endif  
   
                 gworkspace = (id<GWProtocol>)[gwclass gworkspace];        
74          rootPath = nil;          rootPath = nil;
75      lastPath = nil;      lastPath = nil;
76          currentPath = nil;          currentPath = nil;
# Line 253  if (rct.size.height < 0) rct.size.height Line 246  if (rct.size.height < 0) rct.size.height
246    if ((isDir == NO) || ([paths count] > 1)) {    if ((isDir == NO) || ([paths count] > 1)) {
247      newPath = [newPath stringByDeletingLastPathComponent];      newPath = [newPath stringByDeletingLastPathComponent];
248    } else {    } else {
249                  if (([gworkspace isPakageAtPath: newPath]) && (viewsapps == NO)) {                  if (([GWLib isPakageAtPath: newPath]) && (viewsapps == NO)) {
250                          newPath = [newPath stringByDeletingLastPathComponent];                          newPath = [newPath stringByDeletingLastPathComponent];
251                  }                  }
252          }          }
# Line 341  if (rct.size.height < 0) rct.size.height Line 334  if (rct.size.height < 0) rct.size.height
334        path = [path stringByDeletingLastPathComponent];        path = [path stringByDeletingLastPathComponent];
335        selection = [NSArray arrayWithArray: selectedPaths];        selection = [NSArray arrayWithArray: selectedPaths];
336      } else {      } else {
337                          if ([gworkspace isPakageAtPath: path] && (viewsapps == NO)) {                          if ([GWLib isPakageAtPath: path] && (viewsapps == NO)) {
338                                  path = [path stringByDeletingLastPathComponent];                                  path = [path stringByDeletingLastPathComponent];
339          selection = [NSArray arrayWithArray: selectedPaths];          selection = [NSArray arrayWithArray: selectedPaths];
340                          } else {                          } else {
# Line 722  if (rct.size.height < 0) rct.size.height Line 715  if (rct.size.height < 0) rct.size.height
715    
716  - (void)setWatcherForPath:(NSString *)path  - (void)setWatcherForPath:(NSString *)path
717  {  {
718          [gworkspace addWatcherForPath: path];          [GWLib addWatcherForPath: path];
719  }  }
720    
721  - (void)unsetWatcherForPath:(NSString *)path  - (void)unsetWatcherForPath:(NSString *)path
722  {  {
723          [gworkspace removeWatcherForPath: path];          [GWLib removeWatcherForPath: path];
724  }  }
725    
726  - (void)unsetWatchersFromPath:(NSString *)path  - (void)unsetWatchersFromPath:(NSString *)path
# Line 770  if (rct.size.height < 0) rct.size.height Line 763  if (rct.size.height < 0) rct.size.height
763  - (void)openCurrentSelection:(NSArray *)paths newViewer:(BOOL)newv  - (void)openCurrentSelection:(NSArray *)paths newViewer:(BOOL)newv
764  {  {
765    if (newv == YES) {                        if (newv == YES) {                    
766      [gworkspace openSelectedPaths: paths newViewer: YES];      [[GWLib workspaceApp] openSelectedPaths: paths newViewer: YES];
767      return;      return;
768            
769    } else {    } else {
# Line 794  if (rct.size.height < 0) rct.size.height Line 787  if (rct.size.height < 0) rct.size.height
787    
788        if (([type isEqualToString: NSDirectoryFileType])        if (([type isEqualToString: NSDirectoryFileType])
789                          || ([type isEqualToString: NSFilesystemFileType])) {                          || ([type isEqualToString: NSFilesystemFileType])) {
790          if ([gworkspace isPakageAtPath: fpath] == NO) {          if ([GWLib isPakageAtPath: fpath] == NO) {
791            [dirs addObject: fpath];            [dirs addObject: fpath];
792            [allfiles removeObject: fpath];            [allfiles removeObject: fpath];
793            count--;            count--;
# Line 804  if (rct.size.height < 0) rct.size.height Line 797  if (rct.size.height < 0) rct.size.height
797      }      }
798            
799      if ([allfiles count]) {            if ([allfiles count]) {      
800        [gworkspace openSelectedPaths: allfiles newViewer: newv];        [[GWLib workspaceApp] openSelectedPaths: allfiles newViewer: newv];
801      }            }      
802    
803      if ([dirs count] == 1) {        if ([dirs count] == 1) {  

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26