mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 23:57:34 +02:00
* Fixed TWK-842: Use sheet dialog when asking for new station's name.
This commit is contained in:
@@ -720,7 +720,7 @@ void
|
|||||||
TomahawkWindow::createStation()
|
TomahawkWindow::createStation()
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
QString name = QInputDialog::getText( this, tr( "Create New Station" ), tr( "Name:" ), QLineEdit::Normal, tr( "New Station" ), &ok );
|
QString name = QInputDialog( this, Qt::Sheet ).getText( this, tr( "Create New Station" ), tr( "Name:" ), QLineEdit::Normal, tr( "New Station" ), &ok );
|
||||||
if ( !ok || name.isEmpty() )
|
if ( !ok || name.isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -739,11 +739,12 @@ void
|
|||||||
TomahawkWindow::createPlaylist()
|
TomahawkWindow::createPlaylist()
|
||||||
{
|
{
|
||||||
PlaylistTypeSelectorDlg* playlistSelectorDlg = new PlaylistTypeSelectorDlg( TomahawkApp::instance()->mainWindow(), Qt::Sheet );
|
PlaylistTypeSelectorDlg* playlistSelectorDlg = new PlaylistTypeSelectorDlg( TomahawkApp::instance()->mainWindow(), Qt::Sheet );
|
||||||
|
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
playlistSelectorDlg->setModal( true );
|
playlistSelectorDlg->setModal( true );
|
||||||
#endif
|
#endif
|
||||||
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), this, SLOT( playlistCreateDialogFinished( int ) ) );
|
|
||||||
|
|
||||||
|
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), SLOT( playlistCreateDialogFinished( int ) ) );
|
||||||
playlistSelectorDlg->show();
|
playlistSelectorDlg->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -758,14 +759,17 @@ TomahawkWindow::playlistCreateDialogFinished( int ret )
|
|||||||
if ( playlistName.isEmpty() )
|
if ( playlistName.isEmpty() )
|
||||||
playlistName = tr( "New Playlist" );
|
playlistName = tr( "New Playlist" );
|
||||||
|
|
||||||
if ( !playlistSelectorDlg->playlistTypeIsAuto() && ret ) {
|
if ( !playlistSelectorDlg->playlistTypeIsAuto() && ret )
|
||||||
|
{
|
||||||
playlist_ptr playlist = Tomahawk::Playlist::create( SourceList::instance()->getLocal(), uuid(), playlistName, "", "", false, QList< query_ptr>() );
|
playlist_ptr playlist = Tomahawk::Playlist::create( SourceList::instance()->getLocal(), uuid(), playlistName, "", "", false, QList< query_ptr>() );
|
||||||
ViewManager::instance()->show( playlist );
|
ViewManager::instance()->show( playlist );
|
||||||
} else if ( playlistSelectorDlg->playlistTypeIsAuto() && ret ) {
|
}
|
||||||
|
else if ( playlistSelectorDlg->playlistTypeIsAuto() && ret )
|
||||||
|
{
|
||||||
// create Auto Playlist
|
// create Auto Playlist
|
||||||
createAutomaticPlaylist( playlistName );
|
createAutomaticPlaylist( playlistName );
|
||||||
}
|
}
|
||||||
|
|
||||||
playlistSelectorDlg->deleteLater();
|
playlistSelectorDlg->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user