commit 481ac8b3d56ffb8323dff0a3426b1c9c5e26657a
parent 1e4a3a02d618cb871dcd853cf9919bf21746f4a2
Author: Andreas Gruhler <agruhl@gmx.ch>
Date: Sun, 12 Dec 2021 07:53:54 +0100
remove debug msg
Diffstat:
1 file changed, 0 insertions(+), 11 deletions(-)
diff --git a/src/diary.c b/src/diary.c
@@ -691,7 +691,6 @@ int main(int argc, char** argv) {
// jump to specific date using the mouse
case KEY_MOUSE:
if(getmouse(&event) == OK) {
- // fprintf(stderr, "Button event: %i\n", event.bstate);
if (wenclose(cal, event.y, event.x)) {
if(event.bstate & (BUTTON1_PRESSED|BUTTON1_CLICKED)) {
// regular left-mouse button click or tap on a touchpad:
@@ -702,15 +701,8 @@ int main(int argc, char** argv) {
int pad_cy = cy - pad_pos + 1;
int pad_cx = cx + ASIDE_WIDTH;
- fprintf(stderr, "event.x %i\n", event.x);
- fprintf(stderr, "pad_cx %i\n", pad_cx);
- fprintf(stderr, "event.y %i\n", event.y);
- fprintf(stderr, "pad_cy %i\n", pad_cy);
-
int diff_weeks = abs(pad_cy - event.y);
- fprintf(stderr, "Diff weeks: %i\n", diff_weeks);
int diff_wdays = abs((pad_cx - event.x) / 3);
- fprintf(stderr, "Diff wdays: %i\n", diff_wdays);
int diff_days = 0;
if (pad_cy > event.y) {
@@ -728,7 +720,6 @@ int main(int argc, char** argv) {
// jump forward, mouse click was after current position
diff_days += diff_wdays;
}
- fprintf(stderr, "Diff days: %i\n", diff_days);
curs_date.tm_mday += diff_days;
time_t new_date = mktime(&curs_date);
@@ -750,8 +741,6 @@ int main(int argc, char** argv) {
ungetmouse(&event);
}
}
- } else if (event.bstate & BUTTON5_PRESSED) {
- fprintf(stderr, "Mouse up/down\n");
}
break;