Commit bc04b2d1 authored by Jean-Philippe André's avatar Jean-Philippe André

Qt: New configuration var "qt-autoload-extensions"

If true, load the extensions on startup. Otherwise, don't load
them automatically.
parent 67c51e4b
......@@ -493,8 +493,6 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
":/menu/preferences", SLOT( toolbarDialog() ) );
/* Extensions */
/// @todo Check configuration variable "auto load extensions"
menu->addSeparator();
ExtensionsMenu( p_intf, menu );
return menu;
......@@ -520,12 +518,20 @@ void QVLCMenu::ExtensionsMenu( intf_thread_t *p_intf, QMenu *extMenu )
{
/* Get ExtensionsManager and load extensions if needed */
ExtensionsManager *extMgr = ExtensionsManager::getInstance( p_intf );
if( !var_InheritBool( p_intf, "qt-autoload-extensions")
&& !extMgr->isLoaded() )
{
return;
}
if( !extMgr->isLoaded() && !extMgr->cannotLoad() )
{
extMgr->loadExtensions();
}
/* Let the ExtensionsManager build itself the menu */
extMenu->addSeparator();
extMgr->menu( extMenu );
}
......
......@@ -161,6 +161,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define FULLSCREEN_NUMBER_LONGTEXT N_( "Screennumber of fullscreen, instead of" \
"same screen where interface is" )
#define QT_AUTOLOAD_EXTENSIONS_TEXT N_( "Load extensions on startup" )
#define QT_AUTOLOAD_EXTENSIONS_LONGTEXT N_( "Automatically load the "\
"extensions module on startup" )
/* Various modes definition */
static const int i_mode_list[] =
{ QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
......@@ -236,6 +240,10 @@ vlc_module_begin ()
add_integer( "qt-fullscreen-screennumber", -1, NULL, FULLSCREEN_NUMBER_TEXT,
FULLSCREEN_NUMBER_LONGTEXT, false );
add_bool( "qt-autoload-extensions", true, NULL,
QT_AUTOLOAD_EXTENSIONS_TEXT, QT_AUTOLOAD_EXTENSIONS_LONGTEXT,
false )
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_submodule ()
......
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