Qt4 - Fix previous commit and implement also snapshot button.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Sep 2007 14:10:31 +0000 (14:10 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 8 Sep 2007 14:10:31 +0000 (14:10 +0000)
modules/gui/qt4/components/interface_widgets.cpp

index 06699e3..b8b71d6 100644 (file)
@@ -285,6 +285,8 @@ void AdvControlsWidget::normal()
 
 void AdvControlsWidget::snapshot()
 {
+    vout_thread_t *p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
+    if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT );
 }
 
 void AdvControlsWidget::frame(){}
@@ -603,13 +605,10 @@ void ControlsWidget::setStatus( int status )
  */
 void ControlsWidget::fullscreen()
 {
-    vlc_object_t *p_vout = (vlc_object_t *)vlc_object_find( p_intf,
-                VLC_OBJECT_VOUT, FIND_CHILD );
+    vout_thread_t *p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_CHILD );
     if( p_vout)
     {
-        var_Get( p_vout, "fullscreen", &val );
-        val.b_bool = !val.b_bool;
-        var_Set( p_vout, "fullscreen", val );
+        var_SetBool( p_vout, "fullscreen", !var_GetBool( p_vout, "fullscreen" ) );
     }
 }