]> git.sesse.net Git - vlc/commitdiff
Qt: early instantiation for THEMIM
authorErwan Tulou <erwan10@videolan.org>
Wed, 11 Jun 2014 11:16:36 +0000 (13:16 +0200)
committerErwan Tulou <erwan10@videolan.org>
Wed, 11 Jun 2014 12:52:07 +0000 (14:52 +0200)
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
modules/gui/qt4/qt4.cpp

index 7009e0fe0de1b2d4a63544ac579ed09dd0d320a8..43e5dccd9e4e4e50cca26168c25f6ab1687f9511 100644 (file)
@@ -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;
index 0cadaceab86c079410b4c1bdcacc5cb252b91735..a1563669318946c0b922c30c04b28c85aa7d11ef 100644 (file)
@@ -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 */