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
a4ca93cf
Commit
a4ca93cf
authored
Jul 14, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: CAS: implemented the media selector button in a preliminary way and performed some cleanup
parent
82876db8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
modules/gui/macosx/ConvertAndSave.m
modules/gui/macosx/ConvertAndSave.m
+26
-6
No files found.
modules/gui/macosx/ConvertAndSave.m
View file @
a4ca93cf
...
...
@@ -135,8 +135,8 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[
_window
setTitle
:
_NS
(
"Convert & Save"
)];
[
_cancel_btn
setTitle
:
_NS
(
"Cancel"
)];
[
_ok_btn
setTitle
:
_NS
(
"Save"
)];
[
_drop_lbl
setStringValue
:
_NS
(
"Drop
M
edia here"
)];
[
_drop_btn
setTitle
:
_NS
(
"Open
M
edia..."
)];
[
_drop_lbl
setStringValue
:
_NS
(
"Drop
m
edia here"
)];
[
_drop_btn
setTitle
:
_NS
(
"Open
m
edia..."
)];
[
_profile_lbl
setStringValue
:
_NS
(
"Choose Profile"
)];
[
_profile_btn
setTitle
:
_NS
(
"Customize"
)];
[
_destination_lbl
setStringValue
:
_NS
(
"Choose Destination"
)];
...
...
@@ -181,7 +181,8 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
_profileNames
=
[[
defaults
arrayForKey
:
@"CASProfileNames"
]
retain
];
[
_profile_pop
removeAllItems
];
[
_profile_pop
addItemsWithTitles
:
_profileNames
];
[
_profile_pop
addItemsWithTitles
:
_profileNames
];
[
_profile_pop
addItemWithTitle
:
_NS
(
"Custom"
)];
_videoCodecs
=
[[
NSArray
alloc
]
initWithObjects
:
[
NSArray
arrayWithObjects
:
@"MPEG-1"
,
@"MPEG-2"
,
@"MPEG-4"
,
@"DIVX 1"
,
@"DIVX 2"
,
@"DIVX 3"
,
@"H.263"
,
@"H.264"
,
@"VP8"
,
@"WMV1"
,
@"WMV2"
,
@"M-JPEG"
,
@"Theora"
,
@"Dirac"
,
nil
],
...
...
@@ -241,11 +242,30 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
-
(
IBAction
)
openMedia
:(
id
)
sender
{
/* preliminary implementation until the open panel is cleaned up */
NSOpenPanel
*
openPanel
=
[
NSOpenPanel
openPanel
];
[
openPanel
setCanChooseDirectories
:
NO
];
[
openPanel
setResolvesAliases
:
YES
];
[
openPanel
setAllowsMultipleSelection
:
NO
];
[
openPanel
beginSheetForDirectory
:
nil
file
:
nil
types
:
nil
modalForWindow
:
_window
modalDelegate
:
self
didEndSelector
:
@selector
(
openPanelDidEnd
:
returnCode
:
contextInfo
:
)
contextInfo
:
nil
];
}
-
(
void
)
openPanelDidEnd
:(
NSOpenPanel
*
)
panel
returnCode
:(
int
)
returnCode
contextInfo
:(
void
*
)
contextInfo
{
if
(
returnCode
==
NSOKButton
)
{
[
self
setMRL
:
[
NSString
stringWithUTF8String
:
make_URI
([[[
panel
URL
]
path
]
UTF8String
],
NULL
)]];
[
self
updateOKButton
];
[
self
updateDropView
];
}
}
-
(
IBAction
)
customizeProfile
:(
id
)
sender
{
[
self
resetCustomizationSheetBasedOnProfile
:[
_profileValueList
objectAtIndex
:[
_profile_pop
indexOfSelectedItem
]]];
NSUInteger
index
=
[
_profile_pop
indexOfSelectedItem
];
if
(
index
<
([
_profileValueList
count
]
-
1
))
[
self
resetCustomizationSheetBasedOnProfile
:[
_profileValueList
objectAtIndex
:
index
]];
[
NSApp
beginSheet
:
_customize_panel
modalForWindow
:
_window
modalDelegate
:
self
didEndSelector
:
NULL
contextInfo
:
nil
];
}
...
...
@@ -258,7 +278,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
-
(
IBAction
)
chooseDestination
:(
id
)
sender
{
NSSavePanel
*
saveFilePanel
=
[
[
NSSavePanel
alloc
]
init
];
NSSavePanel
*
saveFilePanel
=
[
NSSavePanel
savePanel
];
[
saveFilePanel
setCanSelectHiddenExtension
:
YES
];
[
saveFilePanel
setCanCreateDirectories
:
YES
];
[
saveFilePanel
beginSheetForDirectory
:
nil
file
:
nil
modalForWindow
:
_window
modalDelegate
:
self
didEndSelector
:
@selector
(
savePanelDidEnd
:
returnCode
:
contextInfo
:
)
contextInfo
:
nil
];
...
...
@@ -319,7 +339,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
subViewFrame
.
origin
.
y
=
(
boxFrame
.
size
.
height
-
subViewFrame
.
size
.
height
)
/
2
;
[
_dropin_view
setFrame
:
subViewFrame
];
[[
_drop_image_view
animator
]
setHidden
:
YES
];
[
_drop_box
performSelector
:
@selector
(
addSubview
:)
withObject
:
_dropin_view
afterDelay
:
0
.
4
];
[
_drop_box
performSelector
:
@selector
(
addSubview
:)
withObject
:
_dropin_view
afterDelay
:
0
.
6
];
}
}
else
{
[
_dropin_view
removeFromSuperview
];
...
...
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