diff --git a/src/main.cpp b/src/main.cpp index de7080e70..c2298dc94 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -44,7 +44,15 @@ main( int argc, char *argv[] ) AEInstallEventHandler( 'GURL', 'GURL', h, 0, false ); #endif + + // Unity hack taken from Clementine's main.cpp +#ifdef Q_OS_LINUX + // In 11.04 Ubuntu decided that the system tray should be reserved for certain + // whitelisted applications. Tomahawk will override this setting and insert + // itself into the list of whitelisted apps. setenv("QT_X11_NO_NATIVE_MENUBAR", "1", true); + UbuntuUnityHack hack; +#endif TomahawkApp a( argc, argv ); new BreakPad( QDir::tempPath() ); @@ -61,14 +69,6 @@ main( int argc, char *argv[] ) translator.load( QString( ":/lang/tomahawk_" ) + locale ); a.installTranslator( &translator ); - // Unity hack taken from Clementine's main.cpp -#ifdef Q_OS_LINUX - // In 11.04 Ubuntu decided that the system tray should be reserved for certain - // whitelisted applications. Tomahawk will override this setting and insert - // itself into the list of whitelisted apps. - UbuntuUnityHack hack; -#endif - if ( argc > 1 ) { QString arg = a.arguments()[ 1 ];