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
545616ae
Commit
545616ae
authored
Feb 04, 2016
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/extensions: implement new dialog callback
parent
e3f2ec3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
modules/gui/macosx/ExtensionsDialogProvider.m
modules/gui/macosx/ExtensionsDialogProvider.m
+13
-20
No files found.
modules/gui/macosx/ExtensionsDialogProvider.m
View file @
545616ae
...
...
@@ -38,9 +38,8 @@
* VLCExtensionsDialogProvider implementation
*****************************************************************************/
static
int
extensionDialogCallback
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
);
static
void
extensionDialogCallback
(
extension_dialog_t
*
p_ext_dialog
,
void
*
p_data
);
static
NSView
*
createControlFromWidget
(
extension_widget_t
*
widget
,
id
self
)
{
...
...
@@ -245,22 +244,18 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
/**
* Ask the dialogs provider to create a new dialog
**/
static
int
extensionDialogCallback
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
)
static
void
extensionDialogCallback
(
extension_dialog_t
*
p_ext_dialog
,
void
*
p_data
)
{
@autoreleasepool
{
(
void
)
p_this
;
(
void
)
psz_variable
;
(
void
)
old_val
;
ExtensionsDialogProvider
*
provider
=
(
__bridge
ExtensionsDialogProvider
*
)
param
;
if
(
!
new_val
.
p_address
)
return
VLC_EGENERIC
;
ExtensionsDialogProvider
*
provider
=
(
__bridge
ExtensionsDialogProvider
*
)
p_data
;
if
(
!
provider
)
return
;
extension_dialog_t
*
p_dialog
=
(
extension_dialog_t
*
)
new_val
.
p_address
;
[
provider
manageDialog
:
p_dialog
];
return
VLC_SUCCESS
;
[
provider
manageDialog
:
p_ext_dialog
];
return
;
}
}
...
...
@@ -271,16 +266,14 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
self
=
[
super
init
];
if
(
self
)
{
intf_thread_t
*
p_intf
=
getIntf
();
var_Create
(
p_intf
,
"dialog-extension"
,
VLC_VAR_ADDRESS
);
var_AddCallback
(
p_intf
,
"dialog-extension"
,
extensionDialogCallback
,
(
__bridge
void
*
)
self
);
// dialog_Register(p_intf) is called by coredialog provider
vlc_dialog_provider_set_ext_callback
(
p_intf
,
extensionDialogCallback
,
(
__bridge
void
*
)
self
);
}
return
self
;
}
-
(
void
)
dealloc
{
v
ar_DelCallback
(
getIntf
(),
"dialog-extension"
,
extensionDialogCallback
,
(
__bridge
void
*
)
self
);
v
lc_dialog_provider_set_ext_callback
(
getIntf
(),
NULL
,
NULL
);
}
-
(
void
)
performEventWithObject
:(
NSValue
*
)
objectValue
ofType
:(
const
char
*
)
type
...
...
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