# HG changeset patch # User reimar # Date 1322951207 0 # Node ID dc1ac10ececd13b331c7c4053cba5577c3780432 # Parent d9dfe3689e14c7e603380932da43c60fb7d167c7 Support -title with -vo quartz. diff -r d9dfe3689e14 -r dc1ac10ececd libvo/vo_quartz.c --- a/libvo/vo_quartz.c Sat Dec 03 22:06:50 2011 +0000 +++ b/libvo/vo_quartz.c Sat Dec 03 22:26:47 2011 +0000 @@ -469,9 +469,6 @@ 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 @@ 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 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 @@ 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: