From 9a87166e6305973e8155f73ca255855dcff77c2d Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 28 Sep 2004 11:54:35 +0000 Subject: [PATCH] fixed WEExtensions resource manager lookup git-svn-id: http://svn.opengroupware.org/SOPE/trunk@184 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/WEExtensions/ChangeLog | 3 +++ sope-appserver/WEExtensions/GNUmakefile.preamble | 4 ++-- sope-appserver/WEExtensions/Version | 2 +- sope-appserver/WEExtensions/WETreeData.m | 2 ++ sope-appserver/WEExtensions/WETreeView.m | 4 ++-- sope-appserver/WEExtensions/common.h | 7 ++++--- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sope-appserver/WEExtensions/ChangeLog b/sope-appserver/WEExtensions/ChangeLog index 42eff02f..f222e70e 100644 --- a/sope-appserver/WEExtensions/ChangeLog +++ b/sope-appserver/WEExtensions/ChangeLog @@ -1,5 +1,8 @@ 2004-09-28 Helge Hess + * common.h(WEUriOfResource): use component resource manager if + available (v4.3.60) + * WETreeData.m: added new 'treeLink' association which can be used to override the componentActionURL used for expand/collapse and therfore allow for session less tree generation (v4.3.59) diff --git a/sope-appserver/WEExtensions/GNUmakefile.preamble b/sope-appserver/WEExtensions/GNUmakefile.preamble index 6bddccba..1559069c 100644 --- a/sope-appserver/WEExtensions/GNUmakefile.preamble +++ b/sope-appserver/WEExtensions/GNUmakefile.preamble @@ -62,9 +62,9 @@ WEExtensions_BUNDLE_LIBS += -lWEExtensions WEExtensions_WOBUNDLE_LIBS += $(WEExtensions_BUNDLE_LIBS) ifneq ($(GNUSTEP_BUILD_DIR),) -WEExtensions_LIB_DIRS += -L$(GNUSTEP_OBJ_DIR) +WEExtensions_LIB_DIRS += -L$(GNUSTEP_OBJ_DIR) else -WEExtensions_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR) +WEExtensions_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR) endif # Apple diff --git a/sope-appserver/WEExtensions/Version b/sope-appserver/WEExtensions/Version index de3d3ecd..7fbe8ee1 100644 --- a/sope-appserver/WEExtensions/Version +++ b/sope-appserver/WEExtensions/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=59 +SUBMINOR_VERSION:=60 diff --git a/sope-appserver/WEExtensions/WETreeData.m b/sope-appserver/WEExtensions/WETreeData.m index 72f8c3f3..dcbbcad7 100644 --- a/sope-appserver/WEExtensions/WETreeData.m +++ b/sope-appserver/WEExtensions/WETreeData.m @@ -192,7 +192,9 @@ static Class StrClass = Nil; } img = [_ctx objectForKey:_key]; + [self logWithFormat:@"lookup icon: %@", img]; img = WEUriOfResource(img, _ctx); + [self logWithFormat:@" got: %@", img]; if (_key == WETreeView_Leaf) { NSString *tmp = [self->icon stringValueInComponent:[_ctx component]]; diff --git a/sope-appserver/WEExtensions/WETreeView.m b/sope-appserver/WEExtensions/WETreeView.m index d1110425..965fd3b8 100644 --- a/sope-appserver/WEExtensions/WETreeView.m +++ b/sope-appserver/WEExtensions/WETreeView.m @@ -419,8 +419,8 @@ NSString *WETreeView_Space = @"WETreeView_Space"; sComponent = [_ctx component]; array = [self->list valueInComponent:sComponent]; if ([array count] < 1) return nil; - - stack = [NSMutableArray array]; + + stack = [NSMutableArray arrayWithCapacity:8]; idxId = [_ctx currentElementID]; // top level index idCount = 0; diff --git a/sope-appserver/WEExtensions/common.h b/sope-appserver/WEExtensions/common.h index 1e05e891..4c67de56 100644 --- a/sope-appserver/WEExtensions/common.h +++ b/sope-appserver/WEExtensions/common.h @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: common.h 1 2004-08-20 10:08:27Z znek $ #ifndef __WEExtensions_common_H__ #define __WEExtensions_common_H__ @@ -52,12 +52,13 @@ static inline NSString *WEUriOfResource(NSString *_name, WOContext *_ctx) { if (_name == nil) return nil; - + languages = [_ctx hasSession] ? [[_ctx session] languages] : [[_ctx request] browserLanguages]; - resourceManager = [[_ctx application] resourceManager]; + if ((resourceManager = [[_ctx component] resourceManager]) == nil) + resourceManager = [[_ctx application] resourceManager]; uri = [resourceManager urlForResourceNamed:_name inFramework:nil -- 2.39.5