]> git.sesse.net Git - vlc/commitdiff
macosx: add support for the Video Title option (close #3557)
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 22 Apr 2013 20:01:05 +0000 (22:01 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 22 Apr 2013 20:01:05 +0000 (22:01 +0200)
NEWS
modules/gui/macosx/MainWindow.m

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