Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
012fa5d2
Commit
012fa5d2
authored
Aug 23, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/prefs_widgets: replace deprecated API call with modern blocks-based counterpart
parent
9708e543
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
20 deletions
+7
-20
modules/gui/macosx/prefs_widgets.h
modules/gui/macosx/prefs_widgets.h
+0
-1
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+7
-19
No files found.
modules/gui/macosx/prefs_widgets.h
View file @
012fa5d2
...
...
@@ -89,7 +89,6 @@ static NSMenu *o_keys_menu = nil;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
IBAction
)
openFileDialog
:
(
id
)
sender
;
-
(
void
)
pathChosenInPanel
:(
NSOpenPanel
*
)
o_sheet
withReturn
:(
int
)
i_return_code
contextInfo
:(
void
*
)
o_context_info
;
@end
...
...
modules/gui/macosx/prefs_widgets.m
View file @
012fa5d2
...
...
@@ -1235,25 +1235,13 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
[
o_open_panel
setAllowsMultipleSelection
:
NO
];
[
o_open_panel
setCanChooseFiles
:
!
b_directory
];
[
o_open_panel
setCanChooseDirectories
:
b_directory
];
[
o_open_panel
beginSheetForDirectory
:
nil
file:
nil
types:
nil
modalForWindow:
[
sender
window
]
modalDelegate:
self
didEndSelector:
@selector
(
pathChosenInPanel
:
withReturn:
contextInfo:
)
contextInfo:
nil
];
}
-
(
void
)
pathChosenInPanel
:(
NSOpenPanel
*
)
o_sheet
withReturn
:(
int
)
i_return_code
contextInfo
:(
void
*
)
o_context_info
{
if
(
i_return_code
==
NSOKButton
)
[
o_open_panel
beginSheetModalForWindow
:[
sender
window
]
completionHandler
:
^
(
NSInteger
returnCode
)
{
if
(
returnCode
==
NSOKButton
)
{
NSString
*
o_path
=
[[[
o_sheet
URLs
]
objectAtIndex
:
0
]
path
];
NSString
*
o_path
=
[[[
o_open_panel
URLs
]
objectAtIndex
:
0
]
path
];
[
o_textfield
setStringValue
:
o_path
];
}
}];
}
-
(
char
*
)
stringValue
...
...
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