Line 0
Link Here
|
|
|
1 |
--- ttyclock.c.orig 2009-06-17 19:07:38.000000000 +0100 |
2 |
+++ ttyclock.c 2012-09-16 18:16:24.000000000 +0100 |
3 |
@@ -174,19 +174,19 @@ |
4 |
} |
5 |
|
6 |
void |
7 |
-draw_number(int n, int x, int y) |
8 |
+draw_number(int n, int y, int x) |
9 |
{ |
10 |
- int i, sy = y; |
11 |
+ int i, sx = x; |
12 |
|
13 |
- for(i = 0; i < 30; ++i, ++sy) |
14 |
+ for(i = 0; i < 30; ++i, ++sx) |
15 |
{ |
16 |
- if(sy == y + 6) |
17 |
+ if(sx == x + 6) |
18 |
{ |
19 |
- sy = y; |
20 |
- ++x; |
21 |
+ sx = x; |
22 |
+ ++y; |
23 |
} |
24 |
wbkgdset(ttyclock->framewin, COLOR_PAIR(number[n][i/2])); |
25 |
- mvwaddch(ttyclock->framewin, x, sy, ' '); |
26 |
+ mvwaddch(ttyclock->framewin, y, sx, ' '); |
27 |
} |
28 |
wrefresh(ttyclock->framewin); |
29 |
|
30 |
@@ -209,11 +209,6 @@ |
31 |
draw_number(ttyclock->date.minute[0], 1, 20); |
32 |
draw_number(ttyclock->date.minute[1], 1, 27); |
33 |
|
34 |
- /* Draw the date */ |
35 |
- wbkgdset(ttyclock->datewin, (COLOR_PAIR(2))); |
36 |
- mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr); |
37 |
- wrefresh(ttyclock->datewin); |
38 |
- |
39 |
/* Draw second if the option is enable */ |
40 |
if(ttyclock->option.second) |
41 |
{ |
42 |
@@ -227,6 +222,11 @@ |
43 |
draw_number(ttyclock->date.second[1], 1, 46); |
44 |
} |
45 |
|
46 |
+ /* Draw the date */ |
47 |
+ wbkgdset(ttyclock->datewin, (COLOR_PAIR(2))); |
48 |
+ mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr); |
49 |
+ wrefresh(ttyclock->datewin); |
50 |
+ |
51 |
return; |
52 |
} |
53 |
|