* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.109 2003/12/22 14:45:37 hartman Exp $
+ * $Id: intf.m,v 1.110 2003/12/22 17:08:22 bigben Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
{
unsigned int i_key = 0;
intf_thread_t * p_intf = [NSApp getIntf];
+ vlc_value_t val;
[self initStrings];
[o_window setExcludedFromWindowsMenu: TRUE];
[o_mi_fullscreen setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_fullscreen setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
+ var_Create (p_intf, "fullscreen", VLC_VAR_BOOL );
+ var_Change (p_intf, "fullscreen", VLC_VAR_INHERITVALUE, &val, NULL );
+ [o_btn_fullscreen setState: val.b_bool];
+
+ var_Create(p_intf,"intf-change",VLC_VAR_BOOL );
+
[self setSubmenusEnabled: FALSE];
[self manageVolumeSlider];
else if( p_intf->p_sys->b_playing && !p_intf->b_die )
{
p_intf->p_sys->b_playing = FALSE;
- p_intf->p_sys->b_intf_update = TRUE;
}
#undef p_input
vlc_object_release( p_playlist );
- var_Create(p_intf,"intf-change",VLC_VAR_BOOL );
if( var_Get( p_intf, "intf-change", &val )
>= 0 && val.b_bool )
{
}
if (p_intf->p_sys->b_fullscreen_update )
- {
- vout_thread_t * p_vout;
+ {
+ vout_thread_t * p_vout;
vlc_value_t val;
- p_vout=vlc_object_find(p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE);
- if (p_vout !=NULL)
+ if (var_Change (p_intf, "fullscreen", VLC_VAR_INHERITVALUE, &val, NULL)>=0 && val.b_bool )
+ {
+ [o_btn_fullscreen setState:VLC_TRUE];
+ }
+ else
+ {
+ [o_btn_fullscreen setState:VLC_FALSE];
+ }
+ p_vout = vlc_object_find(p_intf,VLC_OBJECT_VOUT,FIND_ANYWHERE);
+ if (p_vout != NULL)
{
- if( var_Get( p_intf, "fullscreen", &val )
- >= 0 && val.b_bool )
- {
- [o_btn_fullscreen setState:VLC_TRUE];
- }
- else
- {
- [o_btn_fullscreen setState:VLC_FALSE];
- }
[o_btn_fullscreen setEnabled: VLC_TRUE];
- vlc_object_release( p_vout );
+ vlc_object_release(p_vout);
}
else
{
- [o_btn_fullscreen setState: VLC_FALSE];
[o_btn_fullscreen setEnabled: VLC_FALSE];
}
p_intf->p_sys->b_fullscreen_update = VLC_FALSE;
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: vout.m,v 1.67 2003/12/15 19:25:56 bigben Exp $
+ * $Id: vout.m,v 1.68 2003/12/22 17:08:22 bigben Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
p_intf = [NSApp getIntf];
- val.b_bool = p_vout->b_fullscreen;
- var_Create(p_intf,"fullscreen",VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
- var_Set(p_intf,"fullscreen",val);
-
val.b_bool = VLC_TRUE;
var_Create(p_intf,"intf-change",VLC_VAR_BOOL);
var_Set(p_intf, "intf-change",val);
-
return( i_ret );
}
- (void)toggleFullscreen
{
+ config_PutInt(p_vout, "fullscreen", !p_vout->b_fullscreen);
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
}