From ef190780d1349f753a3a5ce883f11b093e2ca46a Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Mon, 10 Feb 2003 23:04:40 +0000 Subject: [PATCH 1/1] * the window of the video shows the official document icon, filename and when command-clicked the path if the stream is a local file. this is the expected window behaviour in osx. --- modules/gui/macosx/vout.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index 8687fddcb5..15a04030e4 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -2,7 +2,7 @@ * vout.m: MacOS X video output plugin ***************************************************************************** * Copyright (C) 2001-2003 VideoLAN - * $Id: vout.m,v 1.29 2003/02/10 22:18:41 hartman Exp $ + * $Id: vout.m,v 1.30 2003/02/10 23:04:40 hartman Exp $ * * Authors: Colin Delacroix * Florian G. Pflug @@ -933,7 +933,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) VLCView * o_view; NSScreen * o_screen; vout_thread_t * p_vout; - id o_title; + NSMutableString *o_title; vlc_bool_t b_main_screen; intf_thread_t * p_intf = [NSApp getIntf]; @@ -1031,7 +1031,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) } vlc_mutex_lock( &p_playlist->object_lock ); - o_title = [NSString stringWithUTF8String: + o_title = [NSMutableString stringWithUTF8String: p_playlist->pp_items[p_playlist->i_index]->psz_name]; vlc_mutex_unlock( &p_playlist->object_lock ); @@ -1039,7 +1039,11 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) if (o_title) { - [p_vout->p_sys->o_window setTitle: o_title]; + NSRange prefixrange = [o_title rangeOfString: @"file:"]; + if ( prefixrange.location != NSNotFound ) + [o_title deleteCharactersInRange: prefixrange]; + + [p_vout->p_sys->o_window setTitleWithRepresentedFilename: o_title]; [p_vout->p_sys->o_window makeKeyAndOrderFront: nil]; } else -- 2.20.1