mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-29 11:51:13 +00:00
Whitespace cleanups and comments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15745 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4be2ec2f0e
commit
196e5dbb68
2 changed files with 43 additions and 29 deletions
|
@ -671,7 +671,7 @@ NS_DURING
|
||||||
*nextGlyphIndex = curGlyph;
|
*nextGlyphIndex = curGlyph;
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
printf("got exception %@\n",localException);
|
// printf("got exception %@\n",localException);
|
||||||
[localException raise];
|
[localException raise];
|
||||||
NS_ENDHANDLER
|
NS_ENDHANDLER
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
|
|
|
@ -830,15 +830,25 @@ static glyph_run_t *run_insert(glyph_run_head_t **context)
|
||||||
int cpos, pos = charRange.location + charRange.length - 1;
|
int cpos, pos = charRange.location + charRange.length - 1;
|
||||||
int i, target;
|
int i, target;
|
||||||
|
|
||||||
/* TODO: should this really be valid? */
|
/* TODO: should this really be valid?
|
||||||
|
|
||||||
|
This is causing all kinds of problems when border glyph ranges are passed
|
||||||
|
to other functions. Better to keep the layout manager clean of all this and
|
||||||
|
let NSTextView deal with it.
|
||||||
|
*/
|
||||||
|
#if 1
|
||||||
if (charRange.length == 0 && charRange.location == [[_textStorage string] length])
|
if (charRange.length == 0 && charRange.location == [[_textStorage string] length])
|
||||||
{
|
{
|
||||||
if (actualCharRange)
|
if (actualCharRange)
|
||||||
*actualCharRange = NSMakeRange([[_textStorage string] length], 0);
|
*actualCharRange = NSMakeRange([[_textStorage string] length], 0);
|
||||||
return NSMakeRange([self numberOfGlyphs], 0);
|
return NSMakeRange([self numberOfGlyphs], 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
/* TODO: this case is also dubious, but it makes sense to return like this,
|
||||||
|
so it's mostly the caller's fault */
|
||||||
if (charRange.length == 0)
|
if (charRange.length == 0)
|
||||||
{
|
{
|
||||||
|
NSLog(@"Warning: %s called with zero-length range", __PRETTY_FUNCTION__);
|
||||||
if (actualCharRange)
|
if (actualCharRange)
|
||||||
*actualCharRange = NSMakeRange(0, 0);
|
*actualCharRange = NSMakeRange(0, 0);
|
||||||
return NSMakeRange(0, 0);
|
return NSMakeRange(0, 0);
|
||||||
|
@ -1316,7 +1326,8 @@ it should still be safe. might lose opportunities to merge runs, though.
|
||||||
// printf("_doLayout\n");
|
// printf("_doLayout\n");
|
||||||
for (i = 0, tc = textcontainers; i < num_textcontainers; i++, tc++)
|
for (i = 0, tc = textcontainers; i < num_textcontainers; i++, tc++)
|
||||||
{
|
{
|
||||||
// printf("_doLayout in %i\n", i);
|
/* printf("_doLayout in %i (size (%g %g))\n",
|
||||||
|
i, [tc->textContainer containerSize].width, [tc->textContainer containerSize].height);*/
|
||||||
if (tc->complete)
|
if (tc->complete)
|
||||||
{
|
{
|
||||||
// printf(" already done\n");
|
// printf(" already done\n");
|
||||||
|
@ -1335,7 +1346,7 @@ it should still be safe. might lose opportunities to merge runs, though.
|
||||||
previousLineFragmentRect: prev
|
previousLineFragmentRect: prev
|
||||||
nextGlyphIndex: &next
|
nextGlyphIndex: &next
|
||||||
numberOfLineFragments: 0];
|
numberOfLineFragments: 0];
|
||||||
// printf(" got j = %i\n", j);
|
// printf(" got j = %i\n", j);
|
||||||
if (j)
|
if (j)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1873,6 +1884,7 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
||||||
[self _invalidateLayoutFromContainer: index];
|
[self _invalidateLayoutFromContainer: index];
|
||||||
[tc->textContainer setLayoutManager: nil];
|
[tc->textContainer setLayoutManager: nil];
|
||||||
[tc->textContainer release];
|
[tc->textContainer release];
|
||||||
|
|
||||||
num_textcontainers--;
|
num_textcontainers--;
|
||||||
for (i = index; i < num_textcontainers; i++)
|
for (i = index; i < num_textcontainers; i++)
|
||||||
textcontainers[i] = textcontainers[i + 1];
|
textcontainers[i] = textcontainers[i + 1];
|
||||||
|
@ -1987,6 +1999,8 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
||||||
* The text storage is owning us - it retains us.
|
* The text storage is owning us - it retains us.
|
||||||
*/
|
*/
|
||||||
_textStorage = aTextStorage;
|
_textStorage = aTextStorage;
|
||||||
|
|
||||||
|
/* TODO: tell all the text containers about that change! */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue