[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/dialogs
From: Laurent Montel <montel () kde ! org>
Date: 2009-06-20 10:56:14
Message-ID: 1245495374.769592.26081.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 984183 by mlaurent:
Use KInputDialog
M +15 -9 PlaylistLayoutEditDialog.cpp
--- trunk/extragear/multimedia/amarok/src/dialogs/PlaylistLayoutEditDialog.cpp \
#984182:984183 @@ -27,8 +27,8 @@
#include <KMessageBox>
-#include <QInputDialog>
-
+#include <KInputDialog>
+#include <QLineEdit>
using namespace Playlist;
PlaylistLayoutEditDialog::PlaylistLayoutEditDialog( QWidget *parent )
@@ -141,8 +141,11 @@
void PlaylistLayoutEditDialog::newLayout() //SLOT
{
- QString layoutName = QInputDialog::getText( this, i18n( "Choose a name for the \
new playlist layout" ),
- i18n( "Please enter a name for the playlist layout you are about \
to define:" ) ); + bool ok;
+ QString layoutName = KInputDialog::getText( i18n( "Choose a name for the new \
playlist layout" ), + i18n( "Please enter a name for the playlist \
layout you are about to define:" ),QString(), &ok, this ); + if( !ok )
+ return;
if( layoutName.isEmpty() )
{
KMessageBox::sorry( this, i18n( "Cannot create a layout with no name." ), \
i18n( "Layout name error" ) ); @@ -184,10 +187,13 @@
LayoutItemConfig headConfig = m_headEdit->config();
LayoutItemConfig bodyConfig = m_bodyEdit->config();
LayoutItemConfig singleConfig = m_singleEdit->config();
-
- QString layoutName = QInputDialog::getText( this, i18n( "Choose a name for the \
new playlist layout" ), +
+ bool ok;
+ QString layoutName = KInputDialog::getText( i18n( "Choose a name for the new \
playlist layout" ),
i18n( "Please enter a name for the playlist layout you are about \
to define as copy of the layout '%1':",
- layoutListWidget->currentItem()->text() ) );
+ layoutListWidget->currentItem()->text() ),QString(), &ok, this \
); + if( !ok)
+ return;
if( layoutName.isEmpty() )
{
KMessageBox::sorry( this, i18n( "Cannot create a layout with no name." ), \
i18n( "Layout name error" ) ); @@ -236,9 +242,9 @@
while( layoutName.isEmpty() || m_layoutsMap->keys().contains( layoutName ) )
{
bool ok;
- layoutName = QInputDialog::getText( this, i18n( "Choose a new name for the \
playlist layout" ), + layoutName = KInputDialog::getText( i18n( "Choose a new \
name for the playlist layout" ),
i18n( "Please enter a new name for the playlist layout you are \
about to rename:" ),
- QLineEdit::Normal, layoutListWidget->currentItem()->text(), \
&ok); + layoutListWidget->currentItem()->text(), &ok, this);
if ( !ok )
{
//Cancelled so just return
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic