]> git.sesse.net Git - vlc/commitdiff
* src/libvlc.h, src/interface/interaction.c: new config option to disable interaction...
authorGildas Bazin <gbazin@videolan.org>
Sat, 10 Jun 2006 22:21:37 +0000 (22:21 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 10 Jun 2006 22:21:37 +0000 (22:21 +0000)
src/interface/interaction.c
src/libvlc.h

index 214ce959e4481e343c9e41c1ea1d4fa1f4f52406..111360a876042c602b376ae989117d4fd90e1bfe 100644 (file)
@@ -63,8 +63,7 @@ static void                  intf_InteractionDialogDestroy(
  * \param p_interact the interaction element
  * \return VLC_SUCCESS or an error code
  */
-int  __intf_Interact( vlc_object_t *p_this, interaction_dialog_t *
-                                    p_dialog )
+int  __intf_Interact( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
 {
     interaction_t *p_interaction = intf_InteractionGet( p_this );
 
@@ -74,10 +73,9 @@ int  __intf_Interact( vlc_object_t *p_this, interaction_dialog_t *
         p_dialog->i_id = ++p_interaction->i_last_id;
     }
 
-    if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT )
-    {
-       return VLC_EGENERIC;
-    }
+    if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT ) return VLC_EGENERIC;
+
+    if( !config_GetInt(p_this, "interact") ) return VLC_EGENERIC;
 
     p_dialog->p_interaction = p_interaction;
     p_dialog->p_parent = p_this;
index 6f6041a439cd1f90aec9f0d183843289c85179f6..f1561408dfafdfa0aaafa5e671b618091ac0847a 100644 (file)
@@ -113,6 +113,11 @@ static char *ppsz_snap_formats[] =
     "When this is enabled, the interface is shown when you move the mouse to "\
     "the edge of the screen in fullscreen mode." )
 
+#define INTERACTION_TEXT N_("Interface interaction")
+#define INTERACTION_LONGTEXT N_( \
+    "When this is enabled, the interface will show a dialog box each time " \
+    "some user input is required." )
+
 
 /*****************************************************************************
  * Audio
@@ -1584,6 +1589,8 @@ vlc_module_begin();
     add_bool( "color", 0, NULL, COLOR_TEXT, COLOR_LONGTEXT, VLC_TRUE );
     add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
                     VLC_FALSE );
+    add_bool( "interact", VLC_FALSE, NULL, INTERACTION_TEXT,
+              INTERACTION_LONGTEXT, VLC_FALSE );
 
     add_bool( "show-intf", VLC_FALSE, NULL, SHOWINTF_TEXT, SHOWINTF_LONGTEXT,
               VLC_FALSE );