[vlc-commits] macosx: add support for the Video Title option (close #3557)

Felix Paul Kühne git at videolan.org
Mon Apr 22 22:01:18 CEST 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Apr 22 22:01:05 2013 +0200| [d892a6b55104ed1a0fc9fc3047c052d0ba373759] | committer: Felix Paul Kühne

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d892a6b55104ed1a0fc9fc3047c052d0ba373759
---

 NEWS                            |    1 +
 modules/gui/macosx/MainWindow.m |   16 ++++++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 3e82230..fbe0755 100644
--- 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.
 
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index db651df..ec141ce 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -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];
         }
 



More information about the vlc-commits mailing list