When changing name of playlist, show the original name in the line-edit.

This commit is contained in:
craig
2012-01-16 21:01:50 +00:00
parent f12fe78a99
commit 3a3ffdb013
2 changed files with 3 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
1. Basic copy to/from device support.
2. When refreshing library/albums, only affect parts of the model that have
changed. (Previously the whole model was replaced).
3. When changing name of playlist, show the original name in the line-edit.
0.2.1
-----

View File

@@ -208,9 +208,9 @@ void PlaylistsPage::renamePlaylist()
QModelIndex sourceIndex = proxy.mapToSource(items.first());
QString name = PlaylistsModel::self()->data(sourceIndex, Qt::DisplayRole).toString();
#ifdef ENABLE_KDE_SUPPORT
QString newName = KInputDialog::getText(i18n("Rename Playlist"), i18n("Enter new name for playlist: %1").arg(name), QString(), 0, this);
QString newName = KInputDialog::getText(i18n("Rename Playlist"), i18n("Enter new name for playlist:"), name, 0, this);
#else
QString newName = QInputDialog::getText(this, tr("Rename Playlist"), tr("Enter new name for playlist: %1").arg(name));
QString newName = QInputDialog::getText(this, tr("Rename Playlist"), tr("Enter new name for playlist:"), QLineEdit::Normal, name);
#endif
if (!newName.isEmpty()) {