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
b03db9b5
Commit
b03db9b5
authored
Aug 23, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/wizard: replace deprecated API calls with modern blocks-based counterparts
parent
ffbdd5c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
34 deletions
+14
-34
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+14
-34
No files found.
modules/gui/macosx/wizard.m
View file @
b03db9b5
...
...
@@ -1626,18 +1626,10 @@ static VLCWizard *_o_sharedInstance = nil;
{
NSOpenPanel
*
openPanel
=
[
NSOpenPanel
openPanel
];
SEL
sel
=
@selector
(
t2_getNewStreamFromDialog
:
returnCode
:
contextInfo
:
);
[
openPanel
beginSheetForDirectory
:
nil
file
:
nil
types
:
nil
modalForWindow
:
o_wizard_window
modalDelegate
:
self
didEndSelector
:
sel
contextInfo
:
nil
];
}
-
(
void
)
t2_getNewStreamFromDialog
:
(
NSOpenPanel
*
)
sheet
returnCode
:
(
int
)
returnCode
contextInfo
:
(
void
*
)
contextInfo
{
if
(
returnCode
==
NSOKButton
)
{
[
o_t2_fld_pathToNewStrm
setStringValue
:
[[
sheet
URL
]
absoluteString
]];
}
[
openPanel
beginSheetModalForWindow
:
o_wizard_window
completionHandler
:
^
(
NSInteger
returnCode
)
{
if
(
returnCode
==
NSOKButton
)
[
o_t2_fld_pathToNewStrm
setStringValue
:
[[
openPanel
URL
]
absoluteString
]];
}];
}
-
(
IBAction
)
t2_chooseStreamOrPlst
:(
id
)
sender
...
...
@@ -1830,8 +1822,6 @@ static VLCWizard *_o_sharedInstance = nil;
* his/her new file. We take a modified NSOpenPanel to select a folder
* and a plain NSSavePanel to save a single file. */
SEL
sel
=
@selector
(
t7_getTrnscdDestFile
:
returnCode
:
contextInfo
:
);
if
(
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
count
]
>
1
)
{
NSOpenPanel
*
saveFolderPanel
=
[[
NSOpenPanel
alloc
]
init
];
...
...
@@ -1840,8 +1830,11 @@ static VLCWizard *_o_sharedInstance = nil;
[
saveFolderPanel
setCanChooseFiles
:
NO
];
[
saveFolderPanel
setCanSelectHiddenExtension
:
NO
];
[
saveFolderPanel
setCanCreateDirectories
:
YES
];
[
saveFolderPanel
beginSheetForDirectory
:
nil
file
:
nil
modalForWindow
:
o_wizard_window
modalDelegate
:
self
didEndSelector
:
sel
contextInfo
:
nil
];
[
saveFolderPanel
beginSheetModalForWindow
:
o_wizard_window
completionHandler
:
^
(
NSInteger
returnCode
)
{
if
(
returnCode
==
NSOKButton
)
[
o_t7_fld_filePath
setStringValue
:
[
NSString
stringWithFormat
:
@"%@/"
,
[[
saveFolderPanel
URL
]
path
]]];
}];
[
saveFolderPanel
release
];
}
else
{
...
...
@@ -1860,25 +1853,12 @@ static VLCWizard *_o_sharedInstance = nil;
[
saveFilePanel
setCanSelectHiddenExtension
:
YES
];
[
saveFilePanel
setCanCreateDirectories
:
YES
];
[
saveFilePanel
beginSheetForDirectory
:
nil
file
:
nil
modalForWindow
:
o_wizard_window
modalDelegate
:
self
didEndSelector
:
sel
contextInfo
:
nil
];
}
}
-
(
void
)
t7_getTrnscdDestFile
:
(
NSOpenPanel
*
)
sheet
returnCode
:
(
int
)
returnCode
contextInfo
:
(
void
*
)
contextInfo
{
if
(
returnCode
==
NSOKButton
)
{
/* output returned path to text-field, add a / to the end if the user
* selected a folder */
if
(
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
count
]
>
1
)
[
o_t7_fld_filePath
setStringValue
:
[
NSString
stringWithFormat
:
@"%@/"
,
[[
sheet
URL
]
path
]]];
else
[
o_t7_fld_filePath
setStringValue
:[[
sheet
URL
]
path
]];
[
saveFilePanel
beginSheetModalForWindow
:
o_wizard_window
completionHandler
:
^
(
NSInteger
returnCode
)
{
if
(
returnCode
==
NSOKButton
)
[
o_t7_fld_filePath
setStringValue
:[[
saveFilePanel
URL
]
path
]];
}];
[
saveFilePanel
release
];
}
[
sheet
release
];
}
@end
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