[vlc-devel] commit: Qt: New configuration var "qt-autoload-extensions" ( Jean-Philippe André )
git version control
git at videolan.org
Thu Jan 28 16:22:14 CET 2010
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Thu Jan 28 15:55:49 2010 +0100| [bc04b2d1a0964fefa258fb79b4a0756ce30c95ca] | committer: Jean-Philippe André
Qt: New configuration var "qt-autoload-extensions"
If true, load the extensions on startup. Otherwise, don't load
them automatically.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc04b2d1a0964fefa258fb79b4a0756ce30c95ca
---
modules/gui/qt4/menus.cpp | 10 ++++++++--
modules/gui/qt4/qt4.cpp | 8 ++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index aec591b..28be14d 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -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 );
}
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 010758c..e238dbd 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -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 ()
More information about the vlc-devel
mailing list