diff --git a/src/gui/downloadfromurldlg.h b/src/gui/downloadfromurldlg.h index eb2f87616..cd05aeb17 100644 --- a/src/gui/downloadfromurldlg.h +++ b/src/gui/downloadfromurldlg.h @@ -47,7 +47,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{ setupUi(this); setAttribute(Qt::WA_DeleteOnClose); setModal(true); - show(); + // Paste clipboard if there is an URL in it QString clip_txt = qApp->clipboard()->text(); QStringList clip_txt_list = clip_txt.split(QString::fromUtf8("\n")); @@ -71,6 +71,8 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{ } if (clip_txt_list_cleaned.size() > 0) textUrls->setText(clip_txt_list_cleaned.join("\n")); + + show(); } ~downloadFromURL() {} @@ -93,7 +95,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{ } } if (!url_list_cleaned.size()) { - QMessageBox::warning(0, tr("No URL entered"), tr("Please type at least one URL.")); + QMessageBox::warning(this, tr("No URL entered"), tr("Please type at least one URL.")); return; } emit urlsReadyToBeDownloaded(url_list_cleaned); diff --git a/src/gui/downloadfromurldlg.ui b/src/gui/downloadfromurldlg.ui index aa1f763a6..a701e7f99 100644 --- a/src/gui/downloadfromurldlg.ui +++ b/src/gui/downloadfromurldlg.ui @@ -11,51 +11,41 @@ - Download from urls + Download from URLs - - - - - - 75 - true - - - - Add torrent links - - - - + + + + 75 + true + + + + Add torrent links + + - - false - true + + false + - - - 16777215 - 17 - - true - One per line (HTTP links, Magnet links and info-hashes are supported) + One link per line (HTTP links, Magnet links and info-hashes are supported) diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 2c2ab35d8..c94f8be7d 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -52,7 +52,6 @@ class TransferListFiltersWidget; class PropertiesWidget; class StatusBar; class TorrentCreatorDlg; -class downloadFromURL; class LineEdit; class ExecutionLog; class PowerManagement; diff --git a/src/gui/statsdialog.cpp b/src/gui/statsdialog.cpp index a42d44945..7a5dcb531 100644 --- a/src/gui/statsdialog.cpp +++ b/src/gui/statsdialog.cpp @@ -44,12 +44,13 @@ StatsDialog::StatsDialog(QWidget *parent) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); - connect(ui->buttonOK, SIGNAL(clicked()), SLOT(close())); + connect(ui->buttonBox, SIGNAL(accepted()), SLOT(close())); updateUI(); t = new QTimer(this); t->setInterval(1500); connect(t, SIGNAL(timeout()), SLOT(updateUI())); t->start(); + show(); } diff --git a/src/gui/statsdialog.h b/src/gui/statsdialog.h index af41a5999..46c41d8a8 100644 --- a/src/gui/statsdialog.h +++ b/src/gui/statsdialog.h @@ -42,7 +42,7 @@ class StatsDialog : public QDialog { Q_OBJECT public: - explicit StatsDialog(QWidget *parent = 0); + explicit StatsDialog(QWidget *parent); ~StatsDialog(); private slots: diff --git a/src/gui/statsdialog.ui b/src/gui/statsdialog.ui index fa0d90d82..ef2ebbf08 100644 --- a/src/gui/statsdialog.ui +++ b/src/gui/statsdialog.ui @@ -6,8 +6,8 @@ 0 0 - 273 - 395 + 286 + 401 @@ -223,28 +223,11 @@ - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - OK - - - - + + + QDialogButtonBox::Ok + +