Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
06b23fcb
Commit
06b23fcb
authored
Jan 14, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog: add a default username for dialog_Login
parent
5456b78d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
include/vlc_dialog.h
include/vlc_dialog.h
+4
-3
src/interface/dialog.c
src/interface/dialog.c
+4
-2
src/misc/keystore.c
src/misc/keystore.c
+2
-1
No files found.
include/vlc_dialog.h
View file @
06b23fcb
...
...
@@ -72,15 +72,16 @@ typedef struct dialog_login_t
{
const
char
*
title
;
const
char
*
message
;
const
char
*
default_username
;
char
**
username
;
char
**
password
;
/* if store is NULL, password can't be stored (there is no keystore) */
bool
*
store
;
}
dialog_login_t
;
VLC_API
void
dialog_Login
(
vlc_object_t
*
,
c
har
**
,
char
**
,
bool
*
,
const
char
*
,
const
char
*
,
...)
VLC_FORMAT
(
6
,
7
);
#define dialog_Login(o, u, p, s, t, ...) \
dialog_Login(VLC_OBJECT(o), u, p, s, t, __VA_ARGS__)
VLC_API
void
dialog_Login
(
vlc_object_t
*
,
c
onst
char
*
,
char
**
,
char
**
,
bool
*
,
const
char
*
,
const
char
*
,
...)
VLC_FORMAT
(
7
,
8
);
#define dialog_Login(o, u, p, s, t,
v,
...) \
dialog_Login(VLC_OBJECT(o), u, p, s, t,
v,
__VA_ARGS__)
/**
* A question dialog.
...
...
src/interface/dialog.c
View file @
06b23fcb
...
...
@@ -141,7 +141,8 @@ void dialog_VFatal (vlc_object_t *obj, bool modal, const char *title,
* 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
,
void
dialog_Login
(
vlc_object_t
*
obj
,
const
char
*
default_username
,
char
**
username
,
char
**
password
,
bool
*
store
,
const
char
*
title
,
const
char
*
fmt
,
...)
{
assert
((
username
!=
NULL
)
&&
(
password
!=
NULL
));
...
...
@@ -160,7 +161,8 @@ void dialog_Login (vlc_object_t *obj, char **username, char **password,
va_start
(
ap
,
fmt
);
if
(
vasprintf
(
&
text
,
fmt
,
ap
)
!=
-
1
)
{
dialog_login_t
dialog
=
{
title
,
text
,
username
,
password
,
store
};
dialog_login_t
dialog
=
{
title
,
text
,
default_username
,
username
,
password
,
store
};
var_SetAddress
(
provider
,
"dialog-login"
,
&
dialog
);
free
(
text
);
}
...
...
src/misc/keystore.c
View file @
06b23fcb
...
...
@@ -399,7 +399,8 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
return
false
;
}
va_end
(
ap
);
dialog_Login
(
p_parent
,
&
p_credential
->
psz_dialog_username
,
dialog_Login
(
p_parent
,
p_credential
->
psz_username
,
&
p_credential
->
psz_dialog_username
,
&
p_credential
->
psz_dialog_password
,
p_credential
->
p_keystore
?
&
p_credential
->
b_store
:
NULL
,
psz_dialog_title
,
psz_dialog_text
);
...
...
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