Introduction
Introduction Statistics Contact Development Disclaimer Help
improve a few code comments - sfeed_curses - sfeed curses UI (now part of sfeed…
git clone git://git.codemadness.org/sfeed_curses
Log
Files
Refs
README
LICENSE
---
commit 3bc8fcc8b261f1b73d8b24d7a3f5cd8e2654ab78
parent 0ca6c8a990047b290fec8fb201a18253fda4bde7
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 30 Mar 2021 18:04:58 +0200
improve a few code comments
Diffstat:
M sfeed_curses.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1735,11 +1735,11 @@ draw(void)
clearscreen();
}
- /* There is the same amount and indices of panes and scrollbars. */
for (i = 0; i < LEN(panes); i++) {
pane_setfocus(&panes[i], i == selpane);
pane_draw(&panes[i]);
+ /* each pane has a scrollbar */
scrollbar_setfocus(&scrollbars[i], i == selpane);
scrollbar_update(&scrollbars[i],
panes[i].pos - (panes[i].pos % panes[i].heigh…
@@ -1749,7 +1749,7 @@ draw(void)
linebar_draw(&linebar);
- /* If item selection text changed then update the status text. */
+ /* if item selection text changed then update the status text */
if ((row = pane_row_get(&panes[PaneItems], panes[PaneItems].pos))) {
item = row->data;
statusbar_update(&statusbar, item->fields[FieldLink]);
@@ -1792,7 +1792,7 @@ mousereport(int button, int release, int keymask, int x, …
return;
}
- /* check if mouse position is in pane or its scrollbar */
+ /* check if mouse position is in pane or in its scrollbar */
if (!(x >= p->x && x < p->x + p->width + (!scrollbars[i].hidde…
y >= p->y && y < p->y + p->height))
continue;
@@ -1801,7 +1801,7 @@ mousereport(int button, int release, int keymask, int x, …
selpane = i;
/* relative position on screen */
pos = y - p->y + p->pos - (p->pos % p->height);
- dblclick = (pos == p->pos); /* clicking the same row */
+ dblclick = (pos == p->pos); /* clicking the same row twice */
switch (button) {
case 0: /* left-click */
@@ -1843,7 +1843,7 @@ feed_row_format(struct pane *p, struct row *row)
feed = row->data;
- /* align counts to the right and pad remaining width with spaces */
+ /* align counts to the right and pad the rest with spaces */
len = snprintf(counts, sizeof(counts), "(%lu/%lu)",
feed->totalnew, feed->total);
if (len > p->width)
@@ -2180,7 +2180,7 @@ main(int argc, char *argv[])
/* button numbers (0 - 2) encoded in lowest 2 …
release does not indicate which button (so …
Handle extended buttons like scrollwheels
- and side-buttons by subtracting 64 in each …
+ and side-buttons by each range. */
release = 0;
if (button == 3) {
button = -1;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.