Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
panelcontrol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
minus
panelcontrol
Commits
5c910388
Commit
5c910388
authored
Nov 17, 2019
by
minus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add qfav button
parent
46609155
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
panelcontrol.c
panelcontrol.c
+11
-0
No files found.
panelcontrol.c
View file @
5c910388
...
...
@@ -92,6 +92,16 @@ void button_fav(enum button button, enum button_direction direction, void *userd
write
(
fc
->
stdin
,
buf
,
n
);
}
void
button_qfav
(
enum
button
button
,
enum
button_direction
direction
,
void
*
userdata
)
{
fprintf
(
stdout
,
"button pressed: %i dir=%i
\n
"
,
button
,
direction
);
if
(
direction
!=
BUTTON_PRESS
)
return
;
struct
fav_config
*
fc
=
userdata
;
char
buf
[
1024
];
int
n
=
snprintf
(
buf
,
sizeof
(
buf
),
"GET request/random?q=@%s
\n
"
,
fc
->
username
);
fwrite
(
buf
,
n
,
1
,
stderr
);
write
(
fc
->
stdin
,
buf
,
n
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
2
)
{
fprintf
(
stderr
,
"usage: %s CLIENT_ID
\n
"
,
argv
[
0
]);
...
...
@@ -166,6 +176,7 @@ int main(int argc, char *argv[]) {
guint
evsrcid
=
g_io_add_watch
(
ch
,
G_IO_IN
,
&
on_fav_info
,
&
fc
);
button_callback_add
(
BOTTOM7
,
button_fav
,
&
fc
);
button_callback_add
(
TOP7
,
button_qfav
,
&
fc
);
pa
();
...
...
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