diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-12-07 00:13:51 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-12-07 00:13:51 +0200 |
commit | fe69b49ccc2bb3e00977f4110a59ffe3b0516d6f (patch) | |
tree | c78705f95df4143bc28d19db6ad36df2ab2cf215 /libvo/cocoa_common.m | |
parent | 92e5414897707d998b4ba46664709347760f5b11 (diff) | |
parent | 82118dc35edfbf9b6714e1e4e6b1823fc3205ff7 (diff) | |
download | mpv-fe69b49ccc2bb3e00977f4110a59ffe3b0516d6f.tar.bz2 mpv-fe69b49ccc2bb3e00977f4110a59ffe3b0516d6f.tar.xz |
Merge remote-tracking branch 'wm4/window_title'
Diffstat (limited to 'libvo/cocoa_common.m')
-rw-r--r-- | libvo/cocoa_common.m | 18 |
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; |