Commit ba45505c authored by Jon Lech Johansen's avatar Jon Lech Johansen

* MacOS X: added deinterlace submenu

parent 974052ff
......@@ -5,6 +5,7 @@
0.5.0
Not released yet
* ./plugins/access/http.c: fixed a double free bug and a memory leak.
* MacOS X: added messages and playlist panel, dock menu, context menu
in video view and localization support.
* ./README: removed much outdated data.
......
......@@ -3,6 +3,7 @@
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {
deinterlace = id;
faster = id;
fullscreen = id;
loop = id;
......@@ -42,6 +43,7 @@
o_mi_clear = id;
o_mi_copy = id;
o_mi_cut = id;
o_mi_deinterlace = id;
o_mi_faster = id;
o_mi_fullscreen = id;
o_mi_hide = id;
......
......@@ -15,7 +15,6 @@
<string>263.2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
......
......@@ -2,7 +2,7 @@
* intf_controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf_controls.m,v 1.1 2002/07/15 01:54:03 jlj Exp $
* $Id: intf_controls.m,v 1.2 2002/07/16 20:41:48 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -60,6 +60,7 @@
- (IBAction)volumeDown:(id)sender;
- (IBAction)mute:(id)sender;
- (IBAction)fullscreen:(id)sender;
- (IBAction)deinterlace:(id)sender;
- (IBAction)toggleProgram:(id)sender;
- (IBAction)toggleTitle:(id)sender;
......@@ -267,6 +268,23 @@
}
}
- (IBAction)deinterlace:(id)sender
{
intf_thread_t * p_intf = [NSApp getIntf];
BOOL bEnable = [sender state] == NSOffState;
if( bEnable )
{
config_PutPsz( p_intf, "filter", "deinterlace" );
config_PutPsz( p_intf, "deinterlace-mode",
[[sender title] lossyCString] );
}
else
{
config_PutPsz( p_intf, "filter", NULL );
}
}
- (IBAction)toggleProgram:(id)sender
{
NSMenuItem * o_mi = (NSMenuItem *)sender;
......@@ -370,6 +388,7 @@
- (BOOL)validateMenuItem:(NSMenuItem *)o_mi
{
BOOL bEnabled = TRUE;
NSMenu * o_menu = [o_mi menu];
intf_thread_t * p_intf = [NSApp getIntf];
if( [[o_mi title] isEqualToString: _NS("Pause")] ||
......@@ -454,13 +473,44 @@
if( [[o_window className] isEqualToString: @"VLCWindow"] )
{
[o_mi setState: [o_window isFullscreen]];
[o_mi setState: [o_window isFullscreen] ?
NSOnState : NSOffState];
}
else
{
bEnabled = FALSE;
}
}
else if( o_menu != nil &&
[[o_menu title] isEqualToString: _NS("Deinterlace")] )
{
char * psz_filter = config_GetPsz( p_intf, "filter" );
if( psz_filter != NULL )
{
free( psz_filter );
psz_filter = config_GetPsz( p_intf, "deinterlace-mode" );
}
if( psz_filter != NULL )
{
if( strcmp( psz_filter, [[o_mi title] lossyCString] ) == 0 )
{
[o_mi setState: NSOnState];
}
else
{
[o_mi setState: NSOffState];
}
free( psz_filter );
}
else
{
[o_mi setState: NSOffState];
}
}
return( bEnabled );
}
......
......@@ -2,7 +2,7 @@
* intf_macosx.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf_macosx.h,v 1.1 2002/07/15 01:54:03 jlj Exp $
* $Id: intf_macosx.h,v 1.2 2002/07/16 20:41:48 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -125,6 +125,7 @@ struct intf_sys_s
IBOutlet id o_mi_vol_down;
IBOutlet id o_mi_mute;
IBOutlet id o_mi_fullscreen;
IBOutlet id o_mi_deinterlace;
IBOutlet id o_mi_program;
IBOutlet id o_mi_title;
IBOutlet id o_mi_chapter;
......
......@@ -2,7 +2,7 @@
* intf_macosx.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf_macosx.m,v 1.7 2002/07/15 20:09:31 sam Exp $
* $Id: intf_macosx.m,v 1.8 2002/07/16 20:41:48 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -223,6 +223,7 @@ static void intf_Run( intf_thread_t *p_intf )
[o_mi_vol_down setTitle: _NS("Volume Down")];
[o_mi_mute setTitle: _NS("Mute")];
[o_mi_fullscreen setTitle: _NS("Fullscreen")];
[o_mi_deinterlace setTitle: _NS("Deinterlace")];
[o_mi_program setTitle: _NS("Program")];
[o_mi_title setTitle: _NS("Title")];
[o_mi_chapter setTitle: _NS("Chapter")];
......
......@@ -2,7 +2,7 @@
* vout_macosx.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: vout_macosx.m,v 1.11 2002/07/15 20:09:31 sam Exp $
* $Id: vout_macosx.m,v 1.12 2002/07/16 20:41:48 jlj Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -32,6 +32,7 @@
#include <vlc/vlc.h>
#include <vlc/vout.h>
#include <vlc/aout.h>
#include <vlc/intf.h>
#include <Cocoa/Cocoa.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment