Automatically grab clipboard contents for "Load cover from URL" dialog.

Fixes issue #1816
This commit is contained in:
John Maguire 2011-10-26 14:59:22 +02:00
parent a1ece63f3a
commit 4ba3cc9563
4 changed files with 12 additions and 7 deletions

View File

@ -1112,6 +1112,9 @@ msgstr ""
msgid "Encoding mode"
msgstr ""
msgid "Enter a URL to download a cover from the Internet:"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -1119,9 +1122,6 @@ msgid ""
"Enter an <b>artist</b> or <b>tag</b> to start listening to Last.fm radio."
msgstr ""
msgid "Enter an URL to download a cover from the Internet:"
msgstr ""
msgid "Enter search terms here"
msgstr ""

View File

@ -1102,6 +1102,9 @@ msgstr ""
msgid "Encoding mode"
msgstr ""
msgid "Enter a URL to download a cover from the Internet:"
msgstr ""
msgid "Enter a new name for this playlist"
msgstr ""
@ -1109,9 +1112,6 @@ msgid ""
"Enter an <b>artist</b> or <b>tag</b> to start listening to Last.fm radio."
msgstr ""
msgid "Enter an URL to download a cover from the Internet:"
msgstr ""
msgid "Enter search terms here"
msgstr ""

View File

@ -20,6 +20,8 @@
#include "core/network.h"
#include "covers/albumcoverloader.h"
#include <QApplication>
#include <QClipboard>
#include <QImage>
#include <QMessageBox>
#include <QNetworkReply>
@ -43,6 +45,9 @@ QImage CoverFromURLDialog::Exec() {
ui_->url->setText("");;
last_image_ = QImage();
QClipboard* clipboard = QApplication::clipboard();
ui_->url->setText(clipboard->text());
exec();
return last_image_;
}

View File

@ -29,7 +29,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Enter an URL to download a cover from the Internet:</string>
<string>Enter a URL to download a cover from the Internet:</string>
</property>
</widget>
</item>