* Source/NSScrollView.m: Remove FIXME comment and provided an

explaination for why a cast wasn't used.   Added nonDynamic flag
	as well as other flags from the nib file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28077 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-03-15 19:19:55 +00:00
parent 8a9282efc1
commit 4c02515e9e
2 changed files with 20 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2009-03-15 15:09-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSScrollView.m: Remove FIXME comment and provided an
explaination for why a cast wasn't used. Added nonDynamic flag
as well as other flags from the nib file.
2009-03-15 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSInfoPanel.m: Use setTitle: instead of setStringValue:

View file

@ -63,17 +63,21 @@ typedef struct _scrollViewFlags
#ifdef WORDS_BIGENDIAN
unsigned int __unused4:22;
unsigned int autohidesScrollers:1;
unsigned int __unused1:3;
unsigned int __unused1:2;
unsigned int nonDynamic:1;
unsigned int hasHScroller:1;
unsigned int hasVScroller:1;
unsigned int __unused0:2;
unsigned int hScrollerRequired:1;
unsigned int vScrollerRequired:1;
NSBorderType border:2;
#else
NSBorderType border:2;
unsigned int __unused0:2;
unsigned int vScrollerRequired:1;
unsigned int hScrollerRequired:1;
unsigned int hasVScroller:1;
unsigned int hasHScroller:1;
unsigned int __unused1:3;
unsigned int nonDynamic:1;
unsigned int __unused1:2;
unsigned int autohidesScrollers:1;
unsigned int __unused4:22;
#endif
@ -1514,13 +1518,17 @@ static float scrollerWidth;
{
int flags = [aDecoder decodeInt32ForKey: @"NSsFlags"];
GSScrollViewFlags scrollViewFlags;
// FIXME: Why not just use a cast?
//
// Do a memory copy here since the compiler errors out on casts from
// scalar (int/float/long) types to structs.
//
memcpy((void *)&scrollViewFlags,(void *)&flags,sizeof(struct _scrollViewFlags));
_hasVertScroller = scrollViewFlags.hasVScroller;
_hasHorizScroller = scrollViewFlags.hasHScroller;
_autohidesScrollers = scrollViewFlags.autohidesScrollers;
// _scrollsDynamically = (!scrollViewFlags.notDynamic);
_scrollsDynamically = (!scrollViewFlags.nonDynamic);
// _rulersVisible = scrollViewFlags.rulersVisible;
// _hasHorizRuler = scrollViewFlags.hasHRuler;
// _hasVertRuler = scrollViewFlags.hasVRuler;