mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +02:00
Hells. Yes. Make TH window come to front when launched with a URL. (X11, not sure if Win works yet.)
This commit is contained in:
@@ -530,8 +530,14 @@ setNam( QNetworkAccessManager* nam )
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QWidgetList widgetList = qApp->topLevelWidgets();
|
||||
int i = 0;
|
||||
while( !widgetList.at( i )->isWindow() )
|
||||
while( i < widgetList.count() && widgetList.at( i )->objectName() != "TH_Main_Window" )
|
||||
i++;
|
||||
if ( i == widgetList.count() )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << " could not find main TH window";
|
||||
return;
|
||||
}
|
||||
|
||||
QWidget *widget = widgetList.at( i );
|
||||
|
||||
widget->show();
|
||||
@@ -564,8 +570,14 @@ setNam( QNetworkAccessManager* nam )
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QWidgetList widgetList = qApp->topLevelWidgets();
|
||||
int i = 0;
|
||||
while( !widgetList.at( i )->isWindow() )
|
||||
while( i < widgetList.count() && widgetList.at( i )->objectName() != "TH_Main_Window" )
|
||||
i++;
|
||||
if ( i == widgetList.count() )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << " could not find main TH window";
|
||||
return;
|
||||
}
|
||||
|
||||
QWidget *widget = widgetList.at( i );
|
||||
|
||||
widget->show();
|
||||
|
@@ -222,6 +222,7 @@ TomahawkApp::init()
|
||||
tDebug() << "Init MainWindow.";
|
||||
m_mainwindow = new TomahawkWindow();
|
||||
m_mainwindow->setWindowTitle( "Tomahawk" );
|
||||
m_mainwindow->setObjectName( "TH_Main_Window" );
|
||||
m_mainwindow->show();
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user