Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常顺宇
OpenXG-RAN
Commits
d62de525
Commit
d62de525
authored
Jul 27, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scroll by one line in textlist
to scroll by only one line, hold CONTROL key and scroll with mouse wheel
parent
b07efe7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
common/utils/T/tracer/event_selector.c
common/utils/T/tracer/event_selector.c
+3
-0
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/gui.h
+2
-2
common/utils/T/tracer/gui/textlist.c
common/utils/T/tracer/gui/textlist.c
+2
-2
common/utils/T/tracer/view/textlist.c
common/utils/T/tracer/view/textlist.c
+3
-0
No files found.
common/utils/T/tracer/event_selector.c
View file @
d62de525
...
@@ -34,11 +34,14 @@ static void scroll(void *private, gui *g,
...
@@ -34,11 +34,14 @@ static void scroll(void *private, gui *g,
int
number_of_lines
;
int
number_of_lines
;
int
new_line
;
int
new_line
;
int
inc
;
int
inc
;
int
*
d
=
notification_data
;
int
key_modifiers
=
*
d
;
textlist_state
(
g
,
w
,
&
visible_lines
,
&
start_line
,
&
number_of_lines
);
textlist_state
(
g
,
w
,
&
visible_lines
,
&
start_line
,
&
number_of_lines
);
inc
=
10
;
inc
=
10
;
if
(
inc
>
visible_lines
-
2
)
inc
=
visible_lines
-
2
;
if
(
inc
>
visible_lines
-
2
)
inc
=
visible_lines
-
2
;
if
(
inc
<
1
)
inc
=
1
;
if
(
inc
<
1
)
inc
=
1
;
if
(
key_modifiers
&
KEY_CONTROL
)
inc
=
1
;
if
(
!
strcmp
(
notification
,
"scrollup"
))
inc
=
-
inc
;
if
(
!
strcmp
(
notification
,
"scrollup"
))
inc
=
-
inc
;
new_line
=
start_line
+
inc
;
new_line
=
start_line
+
inc
;
...
...
common/utils/T/tracer/gui/gui.h
View file @
d62de525
...
@@ -83,8 +83,8 @@ int new_color(gui *gui, char *color);
...
@@ -83,8 +83,8 @@ int new_color(gui *gui, char *color);
/* notifications */
/* notifications */
/* known notifications:
/* known notifications:
* - textlist:
* - textlist:
* - scrollup {
void *: NULL
}
* - scrollup {
int: key_modifiers
}
* - scrolldown {
void *: NULL
}
* - scrolldown {
int: key_modifiers
}
* - click { int [2]: line, button }
* - click { int [2]: line, button }
* - label:
* - label:
* - click { int: button } (if enabled)
* - click { int: button } (if enabled)
...
...
common/utils/T/tracer/gui/textlist.c
View file @
d62de525
...
@@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y,
...
@@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y,
x
-=
this
->
common
.
x
;
x
-=
this
->
common
.
x
;
/* scroll up */
/* scroll up */
if
(
button
==
4
&&
up
==
0
)
{
if
(
button
==
4
&&
up
==
0
)
{
gui_notify
(
g
,
"scrollup"
,
_this
,
NULL
);
gui_notify
(
g
,
"scrollup"
,
_this
,
&
key_modifiers
);
}
}
/* scroll down */
/* scroll down */
if
(
button
==
5
&&
up
==
0
)
{
if
(
button
==
5
&&
up
==
0
)
{
gui_notify
(
g
,
"scrolldown"
,
_this
,
NULL
);
gui_notify
(
g
,
"scrolldown"
,
_this
,
&
key_modifiers
);
}
}
/* button 1/2/3 click */
/* button 1/2/3 click */
if
(
button
>=
1
&&
button
<=
3
&&
up
==
0
)
{
if
(
button
>=
1
&&
button
<=
3
&&
up
==
0
)
{
...
...
common/utils/T/tracer/view/textlist.c
View file @
d62de525
...
@@ -89,6 +89,8 @@ static void scroll(void *private, gui *g,
...
@@ -89,6 +89,8 @@ static void scroll(void *private, gui *g,
int
number_of_lines
;
int
number_of_lines
;
int
new_line
;
int
new_line
;
int
inc
;
int
inc
;
int
*
d
=
notification_data
;
int
key_modifiers
=
*
d
;
if
(
pthread_mutex_lock
(
&
this
->
lock
))
abort
();
if
(
pthread_mutex_lock
(
&
this
->
lock
))
abort
();
...
@@ -96,6 +98,7 @@ static void scroll(void *private, gui *g,
...
@@ -96,6 +98,7 @@ static void scroll(void *private, gui *g,
inc
=
10
;
inc
=
10
;
if
(
inc
>
visible_lines
-
2
)
inc
=
visible_lines
-
2
;
if
(
inc
>
visible_lines
-
2
)
inc
=
visible_lines
-
2
;
if
(
inc
<
1
)
inc
=
1
;
if
(
inc
<
1
)
inc
=
1
;
if
(
key_modifiers
&
KEY_CONTROL
)
inc
=
1
;
if
(
!
strcmp
(
notification
,
"scrollup"
))
inc
=
-
inc
;
if
(
!
strcmp
(
notification
,
"scrollup"
))
inc
=
-
inc
;
new_line
=
start_line
+
inc
;
new_line
=
start_line
+
inc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment