Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
68c015a6
Commit
68c015a6
authored
Mar 20, 2010
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: new function "set_title()" for dialogs
Partial fix for #3304
parent
bf77979b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
modules/misc/lua/libs/dialog.c
modules/misc/lua/libs/dialog.c
+26
-2
No files found.
modules/misc/lua/libs/dialog.c
View file @
68c015a6
...
...
@@ -52,6 +52,7 @@ static int vlclua_dialog_create( lua_State *L );
static
int
vlclua_dialog_delete
(
lua_State
*
L
);
static
int
vlclua_dialog_show
(
lua_State
*
L
);
static
int
vlclua_dialog_hide
(
lua_State
*
L
);
static
int
vlclua_dialog_set_title
(
lua_State
*
L
);
static
int
vlclua_dialog_update
(
lua_State
*
L
);
static
void
lua_SetDialogUpdate
(
lua_State
*
L
,
int
flag
);
static
int
lua_GetDialogUpdate
(
lua_State
*
L
);
...
...
@@ -101,7 +102,8 @@ static int DeleteWidget( extension_dialog_t *p_dialog,
static
const
luaL_Reg
vlclua_dialog_reg
[]
=
{
{
"show"
,
vlclua_dialog_show
},
{
"hide"
,
vlclua_dialog_hide
},
{
"delete"
vlclua_dialog_delete
},
{
"delete"
,
vlclua_dialog_delete
},
{
"set_title"
,
vlclua_dialog_set_title
},
{
"update"
,
vlclua_dialog_update
},
{
"add_button"
,
vlclua_dialog_add_button
},
...
...
@@ -319,7 +321,29 @@ static int vlclua_dialog_hide( lua_State *L )
}
/** Flush the dialog */
/** Set the dialog's title */
static
int
vlclua_dialog_set_title
(
lua_State
*
L
)
{
extension_dialog_t
**
pp_dlg
=
(
extension_dialog_t
**
)
luaL_checkudata
(
L
,
1
,
"dialog"
);
if
(
!
pp_dlg
||
!*
pp_dlg
)
return
luaL_error
(
L
,
"Can't get pointer to dialog"
);
extension_dialog_t
*
p_dlg
=
*
pp_dlg
;
vlc_mutex_lock
(
&
p_dlg
->
lock
);
const
char
*
psz_title
=
luaL_checkstring
(
L
,
2
);
free
(
p_dlg
->
psz_title
);
p_dlg
->
psz_title
=
strdup
(
psz_title
);
vlc_mutex_unlock
(
&
p_dlg
->
lock
);
lua_SetDialogUpdate
(
L
,
1
);
return
1
;
}
/** Update the dialog immediately */
static
int
vlclua_dialog_update
(
lua_State
*
L
)
{
vlc_object_t
*
p_mgr
=
vlclua_get_this
(
L
);
...
...
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