Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osdd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jiří Kalvoda
osdd
Commits
29283b52
Commit
29283b52
authored
4 years ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
Working with long messages
parent
afdbd906
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
not2osd
+2
-2
2 additions, 2 deletions
not2osd
osdd-run
+1
-1
1 addition, 1 deletion
osdd-run
osdd.c
+3
-2
3 additions, 2 deletions
osdd.c
with
6 additions
and
5 deletions
not2osd
+
2
−
2
View file @
29283b52
...
@@ -73,8 +73,8 @@ class NotificationFetcher(dbus.service.Object):
...
@@ -73,8 +73,8 @@ class NotificationFetcher(dbus.service.Object):
#print("body", body)
#print("body", body)
#print("actions", actions)
#print("actions", actions)
#print("expire_timeout", expire_timeout)
#print("expire_timeout", expire_timeout)
su
=
strip_tags
(
(
summary
)
).
split
(
"
\n
"
)
su
=
strip_tags
(
summary
[
0
:
300
]
).
split
(
"
\n
"
)
bo
=
strip_tags
(
(
body
)
).
split
(
"
\n
"
)
bo
=
strip_tags
(
body
[
0
:
500
]
).
split
(
"
\n
"
)
for
i
in
range
(
len
(
su
)):
for
i
in
range
(
len
(
su
)):
if
su
[
i
]
!=
""
and
su
[
i
][
0
]
==
'
-
'
:
if
su
[
i
]
!=
""
and
su
[
i
][
0
]
==
'
-
'
:
su
[
i
]
=
'
'
+
su
[
i
];
su
[
i
]
=
'
'
+
su
[
i
];
...
...
This diff is collapsed.
Click to expand it.
osdd-run
+
1
−
1
View file @
29283b52
...
@@ -3,7 +3,7 @@ cd "$(dirname "$0")"
...
@@ -3,7 +3,7 @@ cd "$(dirname "$0")"
killall osdd
killall osdd
pkill -f not2osd
pkill -f not2osd
not2osd &
./
not2osd &
tmp=$(mktemp)
tmp=$(mktemp)
echo "Xft.render: False" > $tmp
echo "Xft.render: False" > $tmp
XENVIRONMENT=$tmp \
XENVIRONMENT=$tmp \
...
...
This diff is collapsed.
Click to expand it.
osdd.c
+
3
−
2
View file @
29283b52
...
@@ -250,11 +250,12 @@ parse_msg(unsigned char *buf, int len)
...
@@ -250,11 +250,12 @@ parse_msg(unsigned char *buf, int len)
msg
->
alocated_data
=
line
;
msg
->
alocated_data
=
line
;
bool
is_output_set
=
0
;
bool
is_output_set
=
0
;
while
(
*
line
)
while
(
line
&&
*
line
)
{
{
// The parser is destructive, but it does not do any harm, since we display each message only once.
// The parser is destructive, but it does not do any harm, since we display each message only once.
char
*
nl
=
strchr
(
line
,
'\n'
);
char
*
nl
=
strchr
(
line
,
'\n'
);
*
nl
++
=
0
;
if
(
nl
)
*
nl
++
=
0
;
else
fprintf
(
stderr
,
"MISSING END NL!
\n
"
);
char
*
key
;
char
*
key
;
char
*
val
=
strchr
(
line
,
':'
);
char
*
val
=
strchr
(
line
,
':'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment