+- (void)updateTitle
+{
+ NSMutableString *o_title;
+ intf_thread_t * p_intf = [NSApp getIntf];
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+
+ if( p_playlist == NULL )
+ {
+ return;
+ }
+
+ vlc_mutex_lock( &p_playlist->object_lock );
+ o_title = [NSMutableString stringWithUTF8String:
+ p_playlist->pp_items[p_playlist->i_index]->psz_name];
+ vlc_mutex_unlock( &p_playlist->object_lock );
+
+ vlc_object_release( p_playlist );
+
+ if (o_title)
+ {
+ NSRange prefixrange = [o_title rangeOfString: @"file:"];
+ if ( prefixrange.location != NSNotFound )
+ [o_title deleteCharactersInRange: prefixrange];
+
+ [self setTitleWithRepresentedFilename: o_title];
+ }
+ else
+ {
+ [self setTitle:
+ [NSString stringWithCString: VOUT_TITLE " (QuickTime)"]];
+ }
+}
+