Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
videolan
vlc-2-2
Commits
0f2c7eb3
Commit
0f2c7eb3
authored
Aug 25, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notify: replaces '&' with '&' in popup body
that solves 'blank' popups problem
parent
4c8e0844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
modules/misc/notify/notify.c
modules/misc/notify/notify.c
+22
-1
No files found.
modules/misc/notify/notify.c
View file @
0f2c7eb3
...
...
@@ -131,6 +131,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
char
psz_tmp
[
MAX_LENGTH
];
char
psz_notify
[
MAX_LENGTH
];
char
*
psz_title
=
NULL
;
char
*
psz_artist
=
NULL
;
char
*
psz_album
=
NULL
;
...
...
@@ -211,9 +212,29 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
else
/* else we show state-of-the art logo */
pix
=
gdk_pixbuf_new_from_file
(
DATA_PATH
"/vlc48x48.png"
,
&
p_error
);
/* we need to replace '&' with '&' because '&' is a keyword of
* notification-daemon parser */
int
i_notify
,
i_len
,
i
;
i_len
=
strlen
(
psz_tmp
);
i_notify
=
0
;
for
(
i
=
0
;
(
(
i
<
i_len
)
&&
(
i_notify
<
(
MAX_LENGTH
-
5
)
)
);
i
++
)
{
/* we use MAX_LENGTH - 5 because if the last char of psz_tmp is '&'
* we will need 5 more characters: 'amp;\0' .
* however that's unlikely to happen because the last char is '\0' */
if
(
psz_tmp
[
i
]
!=
'&'
)
psz_notify
[
i_notify
]
=
psz_tmp
[
i
];
else
{
snprintf
(
psz_notify
+
i_notify
,
6
,
"&"
);
i_notify
+=
4
;
}
i_notify
++
;
}
psz_notify
[
i_notify
]
=
'\0'
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
Notify
(
p_this
,
psz_
tmp
,
pix
,
p_intf
);
Notify
(
p_this
,
psz_
notify
,
pix
,
p_intf
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
...
...
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