diff --git a/common/utils/T/tracer/event_selector.c b/common/utils/T/tracer/event_selector.c index a03846c0566a98faef440f7eb991793209d676e4..2b6cfd878de99faf5944f6a32511c883f545ae96 100644 --- a/common/utils/T/tracer/event_selector.c +++ b/common/utils/T/tracer/event_selector.c @@ -34,11 +34,14 @@ static void scroll(void *private, gui *g, int number_of_lines; int new_line; int inc; + int *d = notification_data; + int key_modifiers = *d; textlist_state(g, w, &visible_lines, &start_line, &number_of_lines); inc = 10; if (inc > visible_lines - 2) inc = visible_lines - 2; if (inc < 1) inc = 1; + if (key_modifiers & KEY_CONTROL) inc = 1; if (!strcmp(notification, "scrollup")) inc = -inc; new_line = start_line + inc; diff --git a/common/utils/T/tracer/gui/gui.h b/common/utils/T/tracer/gui/gui.h index 673514f138ec88c58fa4a88b6487cbb3db9f0578..27e6603042fa24d928933031d822609b5115f084 100644 --- a/common/utils/T/tracer/gui/gui.h +++ b/common/utils/T/tracer/gui/gui.h @@ -83,8 +83,8 @@ int new_color(gui *gui, char *color); /* notifications */ /* known notifications: * - textlist: - * - scrollup { void *: NULL } - * - scrolldown { void *: NULL } + * - scrollup { int: key_modifiers } + * - scrolldown { int: key_modifiers } * - click { int [2]: line, button } * - label: * - click { int: button } (if enabled) diff --git a/common/utils/T/tracer/gui/textlist.c b/common/utils/T/tracer/gui/textlist.c index 896cba5b9e8b6949321af0789214780552fede12..e919b7c0a51fcc6b14cd9449388e99bd7773bb2d 100644 --- a/common/utils/T/tracer/gui/textlist.c +++ b/common/utils/T/tracer/gui/textlist.c @@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y, x -= this->common.x; /* scroll up */ if (button == 4 && up == 0) { - gui_notify(g, "scrollup", _this, NULL); + gui_notify(g, "scrollup", _this, &key_modifiers); } /* scroll down */ if (button == 5 && up == 0) { - gui_notify(g, "scrolldown", _this, NULL); + gui_notify(g, "scrolldown", _this, &key_modifiers); } /* button 1/2/3 click */ if (button >= 1 && button <= 3 && up == 0) { diff --git a/common/utils/T/tracer/view/textlist.c b/common/utils/T/tracer/view/textlist.c index 5227900e4ef36d241b8fd62c2233d0d7ba9a2620..ffa8cbf71809fa8d3a05274988569e6926cc838e 100644 --- a/common/utils/T/tracer/view/textlist.c +++ b/common/utils/T/tracer/view/textlist.c @@ -89,6 +89,8 @@ static void scroll(void *private, gui *g, int number_of_lines; int new_line; int inc; + int *d = notification_data; + int key_modifiers = *d; if (pthread_mutex_lock(&this->lock)) abort(); @@ -96,6 +98,7 @@ static void scroll(void *private, gui *g, inc = 10; if (inc > visible_lines - 2) inc = visible_lines - 2; if (inc < 1) inc = 1; + if (key_modifiers & KEY_CONTROL) inc = 1; if (!strcmp(notification, "scrollup")) inc = -inc; new_line = start_line + inc;