Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
da927a1c
Commit
da927a1c
authored
Mar 07, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog_Login: handle a format string
parent
57aea111
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
include/vlc_dialog.h
include/vlc_dialog.h
+3
-3
src/interface/dialog.c
src/interface/dialog.c
+13
-4
No files found.
include/vlc_dialog.h
View file @
da927a1c
...
...
@@ -75,9 +75,9 @@ typedef struct dialog_login_t
char
**
password
;
}
dialog_login_t
;
VLC_EXPORT
(
void
,
dialog_Login
,
(
vlc_object_t
*
,
char
**
,
char
**
,
const
char
*
,
const
char
*
)
);
#define dialog_Login(o, u, p, t,
m
) \
dialog_Login(VLC_OBJECT(o), u, p, t,
m
)
VLC_EXPORT
(
void
,
dialog_Login
,
(
vlc_object_t
*
,
char
**
,
char
**
,
const
char
*
,
const
char
*
,
...)
)
LIBVLC_FORMAT
(
5
,
6
);
#define dialog_Login(o, u, p, t,
...
) \
dialog_Login(VLC_OBJECT(o), u, p, t,
__VA_ARGS__
)
VLC_EXPORT
(
int
,
dialog_Register
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
int
,
dialog_Unregister
,
(
vlc_object_t
*
)
);
...
...
src/interface/dialog.c
View file @
da927a1c
...
...
@@ -133,14 +133,14 @@ void dialog_VFatal (vlc_object_t *obj, bool modal, const char *title,
* @param username a pointer to the specified username [OUT]
* @param password a pointer to the specified password [OUT]
* @param title title for the dialog
* @param text
text for
the dialog
* @param text
format string for the message in
the dialog
* @return Nothing. If a user name resp. a password was specified,
* it will be returned as a heap-allocated character array
* into the username resp password pointer. Those must be freed with free().
* Otherwise *username resp *password will be NULL.
*/
void
dialog_Login
(
vlc_object_t
*
obj
,
char
**
username
,
char
**
password
,
const
char
*
title
,
const
char
*
text
)
const
char
*
title
,
const
char
*
fmt
,
...
)
{
assert
((
username
!=
NULL
)
&&
(
password
!=
NULL
));
...
...
@@ -152,7 +152,16 @@ void dialog_Login (vlc_object_t *obj, char **username, char **password,
if
(
provider
==
NULL
)
return
;
dialog_login_t
dialog
=
{
title
,
text
,
username
,
password
,
};
var_SetAddress
(
provider
,
"dialog-login"
,
&
dialog
);
char
*
text
;
va_list
ap
;
va_start
(
ap
,
fmt
);
if
(
vasprintf
(
&
text
,
fmt
,
ap
)
!=
-
1
)
{
dialog_login_t
dialog
=
{
title
,
text
,
username
,
password
,
};
var_SetAddress
(
provider
,
"dialog-login"
,
&
dialog
);
free
(
text
);
}
va_end
(
ap
);
vlc_object_release
(
provider
);
}
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