Author: rmottola
Date: Thu Dec 3 11:52:59 2015
New Revision: 39212
URL: http://svn.gna.org/viewcvs/gnustep?rev=39212&view=rev
Log:
Use NSBrowserCell image for branch image, so that it uses the current theme
Modified:
apps/gworkspace/trunk/FSNode/FSNIcon.m
apps/gworkspace/trunk/FSNode/FSNPathComponentsViewer.m
apps/gworkspace/trunk/FSNode/GNUmakefile.in
Modified: apps/gworkspace/trunk/FSNode/FSNIcon.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/FSNIcon.m?rev=39212&r1=39211&r2=39212&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/FSNIcon.m (original)
+++ apps/gworkspace/trunk/FSNode/FSNIcon.m Thu Dec 3 11:52:59 2015
@@ -67,26 +67,25 @@
{
static BOOL initialized = NO;
- if (initialized == NO) {
- NSBundle *bundle = [NSBundle bundleForClass: [FSNodeRep class]];
- NSString *imagepath = [bundle pathForResource: @"ArrowRight" ofType:
@"tiff"];
-
- if (desktopApp == nil) {
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSString *appName = [defaults stringForKey: @"DesktopApplicationName"];
- NSString *selName = [defaults stringForKey:
@"DesktopApplicationSelName"];
-
- if (appName && selName) {
- Class desktopAppClass = [[NSBundle mainBundle] classNamed:
appName];
- SEL sel = NSSelectorFromString(selName);
- desktopApp = [desktopAppClass performSelector: sel];
- }
- }
-
- branchImage = [[NSImage alloc] initWithContentsOfFile: imagepath];
-
- initialized = YES;
- }
+ if (initialized == NO)
+ {
+ if (desktopApp == nil)
+ {
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSString *appName = [defaults stringForKey:
@"DesktopApplicationName"];
+ NSString *selName = [defaults stringForKey:
@"DesktopApplicationSelName"];
+
+ if (appName && selName)
+ {
+ Class desktopAppClass = [[NSBundle mainBundle] classNamed:
appName];
+ SEL sel = NSSelectorFromString(selName);
+ desktopApp = [desktopAppClass performSelector: sel];
+ }
+ }
+
+ branchImage = [NSBrowserCell branchImage];
+ initialized = YES;
+ }
}
+ (NSImage *)branchImage
Modified: apps/gworkspace/trunk/FSNode/FSNPathComponentsViewer.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/FSNPathComponentsViewer.m?rev=39212&r1=39211&r2=39212&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/FSNPathComponentsViewer.m (original)
+++ apps/gworkspace/trunk/FSNode/FSNPathComponentsViewer.m Thu Dec 3
11:52:59 2015
@@ -263,13 +263,12 @@
{
static BOOL initialized = NO;
- if (initialized == NO) {
- NSBundle *bundle = [NSBundle bundleForClass: [FSNodeRep class]];
- NSString *imagepath = [bundle pathForResource: @"ArrowRight" ofType:
@"tiff"];
-
- branchImage = [[NSImage alloc] initWithContentsOfFile: imagepath];
- initialized = YES;
- }
+ if (initialized == NO)
+ {
+
+ branchImage = [NSBrowserCell branchImage];
+ initialized = YES;
+ }
}
- (id)initForNode:(FSNode *)anode
Modified: apps/gworkspace/trunk/FSNode/GNUmakefile.in
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/FSNode/GNUmakefile.in?rev=39212&r1=39211&r2=39212&view=diff
==============================================================================
--- apps/gworkspace/trunk/FSNode/GNUmakefile.in (original)
+++ apps/gworkspace/trunk/FSNode/GNUmakefile.in Thu Dec 3 11:52:59 2015
@@ -19,8 +19,9 @@
FSNIcon.m \
FSNIconsView.m \
FSNListView.m \
- FSNPathComponentsViewer.m
-
+ FSNPathComponentsViewer.m \
+
+
FSNode_HEADER_FILES = \
FSNode.h \
FSNodeRep.h \
@@ -34,10 +35,11 @@
FSNIcon.h \
FSNIconsView.h \
FSNListView.h \
- FSNPathComponentsViewer.h
-
+ FSNPathComponentsViewer.h \
+
+
FSNode_HAS_RESOURCE_BUNDLE = yes
-
+
FSNode_RESOURCE_FILES = \
Resources/Images/* \
Resources/English.lproj
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs