Commit d892a6b5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: add support for the Video Title option (close #3557)

parent 269a40cb
...@@ -163,6 +163,7 @@ OS X Interface: ...@@ -163,6 +163,7 @@ OS X Interface:
* add a UI to the preferences dialog to configure the default application * add a UI to the preferences dialog to configure the default application
handler for ftp, mms, rtmp, rtp, rtsp, sftp, smb and udp streams handler for ftp, mms, rtmp, rtp, rtsp, sftp, smb and udp streams
(system-wide settings) (system-wide settings)
* add support for the Video Title option
* The Streaming/Transcoding wizard and the open dialog's output panel are * The Streaming/Transcoding wizard and the open dialog's output panel are
deprecated now and will be removed in a future release. deprecated now and will be removed in a future release.
......
...@@ -623,11 +623,15 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -623,11 +623,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
p_input = pl_CurrentInput(VLCIntf); p_input = pl_CurrentInput(VLCIntf);
if (p_input) { if (p_input) {
NSString *aString; NSString *aString;
char *format = var_InheritString(VLCIntf, "input-title-format");
char *formated = str_format_meta(pl_Get(VLCIntf), format); if (!config_GetPsz(VLCIntf, "video-title")) {
free(format); char *format = var_InheritString(VLCIntf, "input-title-format");
aString = [NSString stringWithUTF8String:formated]; char *formated = str_format_meta(pl_Get(VLCIntf), format);
free(formated); free(format);
aString = [NSString stringWithUTF8String:formated];
free(formated);
} else
aString = [NSString stringWithUTF8String:config_GetPsz(VLCIntf, "video-title")];
char *uri = input_item_GetURI(input_GetItem(p_input)); char *uri = input_item_GetURI(input_GetItem(p_input));
...@@ -660,7 +664,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -660,7 +664,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fspanel setStreamTitle: aString]; [o_fspanel setStreamTitle: aString];
} else { } else {
[self setTitle: _NS("VLC media player")]; [self setTitle: _NS("VLC media player")];
[self setRepresentedURL: nil]; [self setRepresentedURL: nil];
} }
......
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