Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
3fb41a93
Commit
3fb41a93
authored
May 31, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: CAS: implemented destination file selector
parent
069f969f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
modules/gui/macosx/ConvertAndSave.h
modules/gui/macosx/ConvertAndSave.h
+2
-0
modules/gui/macosx/ConvertAndSave.m
modules/gui/macosx/ConvertAndSave.m
+19
-1
No files found.
modules/gui/macosx/ConvertAndSave.h
View file @
3fb41a93
...
...
@@ -49,8 +49,10 @@
IBOutlet
id
_dropin_media_lbl
;
NSString
*
_MRL
;
NSString
*
_outputDestination
;
}
@property
(
readwrite
,
nonatomic
,
retain
)
NSString
*
MRL
;
@property
(
readwrite
,
nonatomic
,
retain
)
NSString
*
outputDestination
;
+
(
VLCConvertAndSave
*
)
sharedInstance
;
...
...
modules/gui/macosx/ConvertAndSave.m
View file @
3fb41a93
...
...
@@ -28,7 +28,7 @@
@implementation
VLCConvertAndSave
@synthesize
MRL
=
_MRL
;
@synthesize
MRL
=
_MRL
,
outputDestination
=
_outputDestination
;
static
VLCConvertAndSave
*
_o_sharedInstance
=
nil
;
...
...
@@ -85,6 +85,24 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
-
(
IBAction
)
chooseDestination
:(
id
)
sender
{
NSSavePanel
*
saveFilePanel
=
[[
NSSavePanel
alloc
]
init
];
[
saveFilePanel
setCanSelectHiddenExtension
:
YES
];
[
saveFilePanel
setCanCreateDirectories
:
YES
];
[
saveFilePanel
beginSheetForDirectory
:
nil
file
:
nil
modalForWindow
:
_window
modalDelegate
:
self
didEndSelector
:
@selector
(
savePanelDidEnd
:
returnCode
:
contextInfo
:
)
contextInfo
:
nil
];
}
-
(
void
)
savePanelDidEnd
:(
NSSavePanel
*
)
sheet
returnCode
:(
int
)
returnCode
contextInfo
:(
void
*
)
contextInfo
{
if
(
returnCode
==
NSOKButton
)
{
_outputDestination
=
[[
sheet
URL
]
path
];
[
_destination_filename_lbl
setStringValue
:
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
_outputDestination
]];
[[
_destination_filename_stub_lbl
animator
]
setHidden
:
YES
];
[[
_destination_filename_lbl
animator
]
setHidden
:
NO
];
}
else
{
_outputDestination
=
@""
;
[[
_destination_filename_lbl
animator
]
setHidden
:
YES
];
[[
_destination_filename_stub_lbl
animator
]
setHidden
:
NO
];
}
}
-
(
void
)
updateDropView
...
...
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