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

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

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

revision 1.4 by esersale, Mon Sep 29 13:20:29 2003 UTC revision 1.5 by esersale, Tue Sep 30 15:38:06 2003 UTC
# Line 26  Line 26 
26  #include <Foundation/Foundation.h>  #include <Foundation/Foundation.h>
27  #include <AppKit/AppKit.h>  #include <AppKit/AppKit.h>
28    #ifdef GNUSTEP    #ifdef GNUSTEP
29    #include "GWLib.h"
30  #include "GWFunctions.h"  #include "GWFunctions.h"
31  #include "GWNotifications.h"  #include "GWNotifications.h"
32  #include "GWProtocol.h"  #include "GWProtocol.h"
33  #include "Browser2.h"  #include "Browser2.h"
34    #else    #else
35    #include <GWorkspace/GWLib.h>
36  #include <GWorkspace/GWFunctions.h>  #include <GWorkspace/GWFunctions.h>
37  #include <GWorkspace/GWNotifications.h>  #include <GWorkspace/GWNotifications.h>
38  #include <GWorkspace/GWProtocol.h>  #include <GWorkspace/GWProtocol.h>
# Line 63  if (rct.size.height < 0) rct.size.height Line 65  if (rct.size.height < 0) rct.size.height
65          self = [super initWithFrame: NSZeroRect];          self = [super initWithFrame: NSZeroRect];
66                    
67          if (self) {          if (self) {
     #ifdef GNUSTEP  
                   Class gwclass = [[NSBundle mainBundle] principalClass];  
     #else  
                   Class gwclass = [[NSBundle mainBundle] classNamed: @"GWorkspace"];  
     #endif  
   
                 gworkspace = (id<GWProtocol>)[gwclass gworkspace];  
68      usesShelf = YES;      usesShelf = YES;
69      cellsIcons = NO;      cellsIcons = NO;
70      browser = nil;      browser = nil;
# Line 240  if (rct.size.height < 0) rct.size.height Line 235  if (rct.size.height < 0) rct.size.height
235    if ((isDir == NO) || ([paths count] > 1)) {    if ((isDir == NO) || ([paths count] > 1)) {
236      newPath = [newPath stringByDeletingLastPathComponent];      newPath = [newPath stringByDeletingLastPathComponent];
237    } else {    } else {
238                  if (([gworkspace isPakageAtPath: newPath]) && (viewsapps == NO)) {                  if (([GWLib isPakageAtPath: newPath]) && (viewsapps == NO)) {
239                          newPath = [newPath stringByDeletingLastPathComponent];                          newPath = [newPath stringByDeletingLastPathComponent];
240                  }                  }
241          }          }
# Line 686  if (rct.size.height < 0) rct.size.height Line 681  if (rct.size.height < 0) rct.size.height
681    
682  - (void)setWatcherForPath:(NSString *)path  - (void)setWatcherForPath:(NSString *)path
683  {  {
684          [gworkspace addWatcherForPath: path];          [GWLib addWatcherForPath: path];
685  }  }
686    
687  - (void)unsetWatcherForPath:(NSString *)path  - (void)unsetWatcherForPath:(NSString *)path
688  {  {
689          [gworkspace removeWatcherForPath: path];          [GWLib removeWatcherForPath: path];
690  }  }
691    
692  - (void)unsetWatchersFromPath:(NSString *)path  - (void)unsetWatchersFromPath:(NSString *)path
# Line 787  if (rct.size.height < 0) rct.size.height Line 782  if (rct.size.height < 0) rct.size.height
782  - (void)openSelectedPaths:(NSArray *)paths newViewer:(BOOL)isnew  - (void)openSelectedPaths:(NSArray *)paths newViewer:(BOOL)isnew
783  {  {
784          [self setSelectedPaths: paths];          [self setSelectedPaths: paths];
785          [gworkspace openSelectedPaths: paths newViewer: isnew];          [[GWLib workspaceApp] openSelectedPaths: paths newViewer: isnew];
786  }  }
787    
788  @end  @end

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

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