From 0e89cd612a2bf0d04f08fffd9ee748e6cc3df842 Mon Sep 17 00:00:00 2001 From: Erwan Tulou Date: Wed, 11 Jun 2014 13:16:36 +0200 Subject: [PATCH] Qt: early instantiation for THEMIM Rather than wait for the first call to THEMIM to instantiate this singleton, do it explicitly at an early stage of the plugin initialization. This is useful for Qt as a dialog provider, since otherwise THEMIM doesn't get a chance to be set up until, e.g. the first call to a popupmenu, which then makes this menu slightly longer and noticeable to display. Also, remove the unneeded instantiation in the main_interface. (THEMIM has already been used a few lines earlier, which makes the call useless). --- modules/gui/qt4/main_interface.cpp | 5 ----- modules/gui/qt4/qt4.cpp | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 7009e0fe0d..43e5dccd9e 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -169,11 +169,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) createStatusBar(); setStatusBarVisibility( getSettings()->value( "MainWindow/status-bar-visible", false ).toBool() ); - /******************** - * Input Manager * - ********************/ - MainInputManager::getInstance( p_intf ); - #ifdef _WIN32 himl = NULL; p_taskbl = NULL; diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 0cadaceab8..a156366931 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -486,8 +486,9 @@ static void *Thread( void *obj ) app.setWindowIcon( QIcon::fromTheme( "vlc", QIcon( ":/logo/vlc256.png" ) ) ); #endif - /* Initialize timers and the Dialog Provider */ + /* Initialize the Dialog Provider and the Main Input Manager */ DialogsProvider::getInstance( p_intf ); + MainInputManager::getInstance( p_intf ); #ifdef UPDATE_CHECK /* Checking for VLC updates */ -- 2.39.2