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

Diff of /gnustep/usr-apps/gworkspace/Viewers/IconsViewer/IconsViewer.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 69  Line 69 
69          self = [super initWithFrame: NSZeroRect];          self = [super initWithFrame: NSZeroRect];
70                    
71          if (self) {          if (self) {
     #ifdef GNUSTEP  
                   Class gwclass = [[NSBundle mainBundle] principalClass];  
     #else  
                   Class gwclass = [[NSBundle mainBundle] classNamed: @"GWorkspace"];  
     #endif  
   
                 gworkspace = (id<GWProtocol>)[gwclass gworkspace];  
72      usesShelf = YES;      usesShelf = YES;
73          rootPath = nil;          rootPath = nil;
74      lastPath = nil;      lastPath = nil;
# Line 271  Line 264 
264    if ((isDir == NO) || ([paths count] > 1)) {    if ((isDir == NO) || ([paths count] > 1)) {
265      newPath = [newPath stringByDeletingLastPathComponent];      newPath = [newPath stringByDeletingLastPathComponent];
266    } else {    } else {
267                  if (([gworkspace isPakageAtPath: newPath]) && (viewsapps == NO)) {                  if (([GWLib isPakageAtPath: newPath]) && (viewsapps == NO)) {
268                          newPath = [newPath stringByDeletingLastPathComponent];                          newPath = [newPath stringByDeletingLastPathComponent];
269                  }                  }
270          }          }
# Line 353  Line 346 
346        path = [path stringByDeletingLastPathComponent];        path = [path stringByDeletingLastPathComponent];
347        selection = [NSArray arrayWithArray: selectedPaths];        selection = [NSArray arrayWithArray: selectedPaths];
348      } else {      } else {
349                          if ([gworkspace isPakageAtPath: path] && (viewsapps == NO)) {                          if ([GWLib isPakageAtPath: path] && (viewsapps == NO)) {
350                                  path = [path stringByDeletingLastPathComponent];                                  path = [path stringByDeletingLastPathComponent];
351          selection = [NSArray arrayWithArray: selectedPaths];          selection = [NSArray arrayWithArray: selectedPaths];
352                          } else {                          } else {
# Line 743  Line 736 
736    
737  - (void)setWatcherForPath:(NSString *)path  - (void)setWatcherForPath:(NSString *)path
738  {  {
739          [gworkspace addWatcherForPath: path];          [GWLib addWatcherForPath: path];
740  }  }
741    
742  - (void)unsetWatcherForPath:(NSString *)path  - (void)unsetWatcherForPath:(NSString *)path
743  {  {
744          [gworkspace removeWatcherForPath: path];          [GWLib removeWatcherForPath: path];
745  }  }
746    
747  - (void)unsetWatchersFromPath:(NSString *)path  - (void)unsetWatchersFromPath:(NSString *)path
# Line 902  Line 895 
895    [self setSelectedPaths: paths];    [self setSelectedPaths: paths];
896    
897    if (newv == YES) {                        if (newv == YES) {                    
898      [gworkspace openSelectedPaths: paths newViewer: YES];      [[GWLib workspaceApp] openSelectedPaths: paths newViewer: YES];
899      return;      return;
900            
901    } else {    } else {
# Line 924  Line 917 
917    
918        if (([type isEqualToString: NSDirectoryFileType])        if (([type isEqualToString: NSDirectoryFileType])
919                          || ([type isEqualToString: NSFilesystemFileType])) {                          || ([type isEqualToString: NSFilesystemFileType])) {
920          if ([gworkspace isPakageAtPath: fpath] == NO) {          if ([GWLib isPakageAtPath: fpath] == NO) {
921            [dirs addObject: fpath];            [dirs addObject: fpath];
922            [allfiles removeObject: fpath];            [allfiles removeObject: fpath];
923            count--;            count--;
# Line 934  Line 927 
927      }      }
928            
929      if ([allfiles count]) {            if ([allfiles count]) {      
930        [gworkspace openSelectedPaths: allfiles newViewer: newv];        [[GWLib workspaceApp] openSelectedPaths: allfiles newViewer: newv];
931      }            }      
932    
933      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