o removed unused methods

o added -isDisabled
o added -shouldDisplay


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@19944 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mguesdon 2004-09-01 13:44:01 +00:00
parent c0de7793f9
commit 96f17ed7a1

View file

@ -1,6 +1,6 @@
/** GSWCollapsibleComponentContent.m - <title>GSWeb: Class GSWCollapsibleComponentContent</title> /** GSWCollapsibleComponentContent.m - <title>GSWeb: Class GSWCollapsibleComponentContent</title>
Copyright (C) 1999-2003 Free Software Foundation, Inc. Copyright (C) 1999-2004 Free Software Foundation, Inc.
Written by: Manuel Guesdon <mguesdon@orange-concept.com> Written by: Manuel Guesdon <mguesdon@orange-concept.com>
Date: Apr 1999 Date: Apr 1999
@ -39,16 +39,7 @@ RCS_ID("$Id$")
//=================================================================================== //===================================================================================
@implementation GSWCollapsibleComponentContent @implementation GSWCollapsibleComponentContent
-(void)awake //-----------------------------------------------------------------------------------
{
[super awake];
};
-(void)sleep
{
[super sleep];
};
-(void)dealloc -(void)dealloc
{ {
GSWLogC("Dealloc GSWCollopsibleComponent"); GSWLogC("Dealloc GSWCollopsibleComponent");
@ -61,11 +52,13 @@ RCS_ID("$Id$")
GSWLogC("End Dealloc GSWCollopsibleComponent"); GSWLogC("End Dealloc GSWCollopsibleComponent");
}; };
//-----------------------------------------------------------------------------------
-(BOOL)synchronizesVariablesWithBindings -(BOOL)synchronizesVariablesWithBindings
{ {
return NO; return NO;
}; };
//-----------------------------------------------------------------------------------
-(void)appendToResponse:(GSWResponse*)aResponse -(void)appendToResponse:(GSWResponse*)aResponse
inContext:(GSWContext*)aContext inContext:(GSWContext*)aContext
{ {
@ -75,6 +68,7 @@ RCS_ID("$Id$")
_tmpAnchorName=nil; _tmpAnchorName=nil;
}; };
//-----------------------------------------------------------------------------------
-(BOOL)isVisible -(BOOL)isVisible
{ {
LOGObjectFnStart(); LOGObjectFnStart();
@ -89,6 +83,7 @@ RCS_ID("$Id$")
return _isVisible; return _isVisible;
}; };
//-----------------------------------------------------------------------------------
-(GSWComponent*)toggleVisibilityAction -(GSWComponent*)toggleVisibilityAction
{ {
LOGObjectFnStart(); LOGObjectFnStart();
@ -104,6 +99,7 @@ RCS_ID("$Id$")
return nil; return nil;
}; };
//-----------------------------------------------------------------------------------
-(NSString*)imageFileName -(NSString*)imageFileName
{ {
NSString* _image=nil; NSString* _image=nil;
@ -140,6 +136,7 @@ RCS_ID("$Id$")
return _image; return _image;
}; };
//-----------------------------------------------------------------------------------
-(NSString*)label -(NSString*)label
{ {
NSString* _label=nil; NSString* _label=nil;
@ -163,6 +160,7 @@ RCS_ID("$Id$")
return _label; return _label;
}; };
//-----------------------------------------------------------------------------------
-(NSString*)helpString -(NSString*)helpString
{ {
NSString* _helpString=nil; NSString* _helpString=nil;
@ -198,9 +196,47 @@ RCS_ID("$Id$")
return _helpString; return _helpString;
}; };
//-----------------------------------------------------------------------------------
-(NSString*)anchorName -(NSString*)anchorName
{ {
return _tmpAnchorName; return _tmpAnchorName;
}; };
//-----------------------------------------------------------------------------------
-(id)isDisabled
{
id isDisabled=NO;
LOGObjectFnStart();
if ([self hasBinding:@"disabled"])
isDisabled=[self valueForBinding:@"disabled"];
else if ([self hasBinding:@"enabled"])
{
BOOL isEnabled=boolValueFor([self valueForBinding:@"enabled"]);
isDisabled=[NSNumber numberWithBool:(isEnabled ? NO : YES)];
};
LOGObjectFnStop();
return isDisabled;
};
//-----------------------------------------------------------------------------------
-(BOOL)shouldDisplay
{
BOOL shouldDisplay=YES;
LOGObjectFnStart();
if (boolValueFor([self isDisabled])
&& [self hasBinding:@"displayDisabled"]
&& !boolValueFor([self valueForBinding:@"displayDisabled"]))
shouldDisplay=NO;
LOGObjectFnStop();
return shouldDisplay;
};
@end @end