[MPlayer-cvslog] r34385 - trunk/libvo/vo_quartz.c

reimar subversion at mplayerhq.hu
Sat Dec 3 23:26:47 CET 2011


Author: reimar
Date: Sat Dec  3 23:26:47 2011
New Revision: 34385

Log:
Support -title with -vo quartz.

Modified:
   trunk/libvo/vo_quartz.c

Modified: trunk/libvo/vo_quartz.c
==============================================================================
--- trunk/libvo/vo_quartz.c	Sat Dec  3 23:06:50 2011	(r34384)
+++ trunk/libvo/vo_quartz.c	Sat Dec  3 23:26:47 2011	(r34385)
@@ -469,9 +469,6 @@ static OSStatus WindowEventHandler(Event
 
 static void quartz_CreateWindow(uint32_t d_width, uint32_t d_height, WindowAttributes windowAttrs)
 {
-    CFStringRef titleKey;
-    CFStringRef windowTitle;
-
     MenuItemIndex index;
     CFStringRef movMenuTitle;
     CFStringRef aspMenuTitle;
@@ -552,13 +549,6 @@ static void quartz_CreateWindow(uint32_t
     CreateWindowGroup(0, &winGroup);
     SetWindowGroup(theWindow, winGroup);
 
-    // Set window title
-    titleKey = CFSTR("MPlayer - The Movie Player");
-    windowTitle = CFCopyLocalizedString(titleKey, NULL);
-    SetWindowTitleWithCFString(theWindow, windowTitle);
-    CFRelease(titleKey);
-    CFRelease(windowTitle);
-
     // Install event handler
     InstallApplicationEventHandler(NewEventHandlerUPP(KeyEventHandler), GetEventTypeCount(key_events), key_events, NULL, NULL);
     InstallApplicationEventHandler(NewEventHandlerUPP(MouseEventHandler), GetEventTypeCount(mouse_events), mouse_events, NULL, NULL);
@@ -608,6 +598,7 @@ static void free_video_specific(void)
 
 static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
 {
+    CFStringRef windowTitle;
     WindowAttributes windowAttrs;
     OSErr qterr;
     CGRect tmpBounds;
@@ -669,6 +660,11 @@ static int config(uint32_t width, uint32
         SizeWindow(theWindow, d_width, d_height, 1);
     }
 
+    // Set window title
+    windowTitle = CFStringCreateWithCString(NULL, vo_wintitle ? vo_wintitle : title, kCFStringEncodingUTF8);
+    SetWindowTitleWithCFString(theWindow, windowTitle);
+    CFRelease(windowTitle);
+
     switch (image_format)
     {
     case IMGFMT_RGB32:


More information about the MPlayer-cvslog mailing list