summaryrefslogtreecommitdiffstats
path: root/libvo/cocoa_common.m
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-12-06 20:23:54 +0100
committerwm4 <wm4@mplayer2.org>2011-12-06 20:32:33 +0100
commitd4de92e80897abb64dc8ccecb7823cbe291bb52d (patch)
tree0686f943152165b2cab91a79287ea788083bc474 /libvo/cocoa_common.m
parent421c840b3c061de89b426244fe75237a73f765de (diff)
downloadmpv-d4de92e80897abb64dc8ccecb7823cbe291bb52d.tar.bz2
mpv-d4de92e80897abb64dc8ccecb7823cbe291bb52d.tar.xz
libvo: remove title argument from struct vo_driver.config
This affects only the "new" VO API. The config() title argument was barely used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa GUI backends, which are the only ones properly supporting window titles, ignored this argument. Remove the title argument. Add the vo_get_window_title function. All GUI VOs are supposed to use it for the window title.
Diffstat (limited to 'libvo/cocoa_common.m')
-rw-r--r--libvo/cocoa_common.m18
1 files changed, 2 insertions, 16 deletions
diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m
index 5e9771bb8c..56749861c2 100644
--- a/libvo/cocoa_common.m
+++ b/libvo/cocoa_common.m
@@ -64,7 +64,6 @@ struct vo *l_vo;
// local function definitions
struct vo_cocoa_state *vo_cocoa_init_state(void);
void update_screen_info(void);
-const char *title_from_vo_and_title(struct vo *vo, const char *title);
void resize_window(struct vo *vo);
void create_menu(void);
@@ -136,19 +135,6 @@ int vo_cocoa_change_attributes(struct MPGLContext *ctx)
return SET_WINDOW_OK;
}
-// this function exists because vf_vo.c calls config with title = "MPlayer"
-// and from the vo it will come down to the backend (ignoring --use-filename-title)
-const char *title_from_vo_and_title(struct vo *vo, const char *title)
-{
- if (vo->opts->vo_wintitle) {
- return vo->opts->vo_wintitle;
- } else if (title) {
- return title;
- } else {
- return "mplayer2";
- }
-}
-
void resize_window(struct vo *vo)
{
vo->dwidth = [[s->window contentView] frame].size.width;
@@ -157,7 +143,7 @@ void resize_window(struct vo *vo)
}
int vo_cocoa_create_window(struct MPGLContext *ctx, uint32_t d_width,
- uint32_t d_height, uint32_t flags, const char *title)
+ uint32_t d_height, uint32_t flags)
{
if (s->current_video_size.width > 0 || s->current_video_size.height > 0)
s->previous_video_size = s->current_video_size;
@@ -222,7 +208,7 @@ int vo_cocoa_create_window(struct MPGLContext *ctx, uint32_t d_width,
if (s->window_title)
[s->window_title release];
- s->window_title = [[NSString alloc] initWithUTF8String:title_from_vo_and_title(ctx->vo,title)];
+ s->window_title = [[NSString alloc] initWithUTF8String:vo_get_window_title(ctx->vo)];
[s->window setTitle: s->window_title];
return SET_WINDOW_OK;