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
a549e879
Commit
a549e879
authored
Aug 23, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/open: replace deprecated API call with modern blocks-based counterpart
parent
adde68fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
23 deletions
+10
-23
modules/gui/macosx/open.h
modules/gui/macosx/open.h
+0
-1
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+10
-22
No files found.
modules/gui/macosx/open.h
View file @
a549e879
...
...
@@ -266,7 +266,6 @@
-
(
void
)
openFileGeneric
;
-
(
void
)
openFilePathChanged
:(
NSNotification
*
)
o_notification
;
-
(
IBAction
)
openFileBrowse
:(
id
)
sender
;
-
(
void
)
pathChosenInPanel
:
(
NSOpenPanel
*
)
sheet
withReturn
:(
int
)
returnCode
contextInfo
:(
void
*
)
contextInfo
;
-
(
IBAction
)
openFileStreamChanged
:(
id
)
sender
;
-
(
void
)
openDisc
;
...
...
modules/gui/macosx/open.m
View file @
a549e879
...
...
@@ -752,28 +752,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
[
o_open_panel
setCanChooseDirectories
:
YES
];
[
o_open_panel
setTitle
:
_NS
(
"Open File"
)];
[
o_open_panel
setPrompt
:
_NS
(
"Open"
)];
[
o_open_panel
beginSheetForDirectory
:
nil
file:
nil
types:
nil
modalForWindow:
[
sender
window
]
modalDelegate:
self
didEndSelector:
@selector
(
pathChosenInPanel
:
withReturn:
contextInfo:
)
contextInfo:
nil
];
}
-
(
void
)
pathChosenInPanel
:
(
NSOpenPanel
*
)
sheet
withReturn
:
(
int
)
returnCode
contextInfo
:(
void
*
)
contextInfo
{
if
(
returnCode
==
NSFileHandlingPanelOKButton
)
{
if
(
o_file_path
)
[
o_file_path
release
];
o_file_path
=
[[[
sheet
URLs
]
objectAtIndex
:
0
]
path
];
[
o_file_path
retain
];
[
self
openFilePathChanged
:
nil
];
}
[
o_open_panel
beginSheetModalForWindow
:[
sender
window
]
completionHandler
:
^
(
NSInteger
returnCode
)
{
if
(
returnCode
==
NSFileHandlingPanelOKButton
)
{
if
(
o_file_path
)
[
o_file_path
release
];
o_file_path
=
[[[
o_open_panel
URLs
]
objectAtIndex
:
0
]
path
];
[
o_file_path
retain
];
[
self
openFilePathChanged
:
nil
];
}
}];
}
-
(
IBAction
)
openFileStreamChanged
:(
id
)
sender
...
...
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