diff options
author | dscho <dscho> | 2002-05-02 14:33:09 +0000 |
---|---|---|
committer | dscho <dscho> | 2002-05-02 14:33:09 +0000 |
commit | d7117b698cfd33f182000b69b16ea4f00cb7659c (patch) | |
tree | 56605931f8bd85fd6fabef2369d9550cce5e3b15 | |
parent | ff9fbd971bdebf8eca22446139803a2647dbcf5a (diff) | |
download | libtdevnc-d7117b698cfd33f182000b69b16ea4f00cb7659c.tar.gz libtdevnc-d7117b698cfd33f182000b69b16ea4f00cb7659c.zip |
index was shadowed
-rw-r--r-- | selbox.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -66,17 +66,17 @@ static void selPaintLine(rfbSelectData* m,int line,Bool invert) invert?m->backColour:m->colour); } -static void selSelect(rfbSelectData* m,int index) +static void selSelect(rfbSelectData* m,int _index) { int delta; - if(index==m->selected || index<0 || index>=m->listSize) + if(_index==m->selected || _index<0 || _index>=m->listSize) return; if(m->selected>=0) selPaintLine(m,m->selected-m->displayStart,FALSE); - if(index<m->displayStart || index>=m->displayStart+m->pageH) { + if(_index<m->displayStart || _index>=m->displayStart+m->pageH) { /* targetLine is the screen line in which the selected line will be displayed. targetLine = m->pageH/2 doesn't look so nice */ @@ -84,11 +84,11 @@ static void selSelect(rfbSelectData* m,int index) int lineStart,lineEnd; /* scroll */ - if(index<targetLine) - targetLine = index; - else if(index+m->pageH-targetLine>=m->listSize) - targetLine = index+m->pageH-m->listSize; - delta = index-(m->displayStart+targetLine); + if(_index<targetLine) + targetLine = _index; + else if(_index+m->pageH-targetLine>=m->listSize) + targetLine = _index+m->pageH-m->listSize; + delta = _index-(m->displayStart+targetLine); if(delta>-m->pageH && delta<m->pageH) { if(delta>0) { @@ -109,15 +109,15 @@ static void selSelect(rfbSelectData* m,int index) } m->displayStart += delta; for(delta=lineStart;delta<lineEnd;delta++) - if(delta!=index) + if(delta!=_index) selPaintLine(m,delta,FALSE); } - m->selected = index; + m->selected = _index; selPaintLine(m,m->selected-m->displayStart,TRUE); if(m->selChangedHook) - m->selChangedHook(index); + m->selChangedHook(_index); /* todo: scrollbars */ } |