Commit 2e90c6e8 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Fix file name representation of the video output window on Mac OS X. (Reviewed by hartman)

parent 13ec5754
...@@ -284,16 +284,24 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -284,16 +284,24 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if( o_mrl != nil ) if( o_mrl != nil )
{ {
/* FIXME once psz_access is exported, since that syntax is no longer valid */ /* FIXME once psz_access is exported, we could check if we are
#if 0 * reading from a file in a smarter way. */
if( p_input->input.p_access && !strcmp( p_input->input.p_access->p_module->psz_shortname, "File" ) )
{ NSRange prefix_range = [o_mrl rangeOfString: @"file:"];
NSRange prefix_range = [o_mrl rangeOfString: @"file:"]; if( prefix_range.location != NSNotFound )
if( prefix_range.location != NSNotFound ) [o_mrl deleteCharactersInRange: prefix_range];
[o_mrl deleteCharactersInRange: prefix_range];
if( [o_mrl characterAtIndex:0] == '/' )
{
/* it's a local file */
[o_window setRepresentedFilename: o_mrl]; [o_window setRepresentedFilename: o_mrl];
} }
#endif else
{
/* it's from the network or somewhere else,
* we clear the previous path */
[o_window setRepresentedFilename: @""];
}
[o_window setTitle: o_title]; [o_window setTitle: o_title];
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment