diff options
| author | Martin Lambers <marlam@marlam.de> | 2012-02-18 17:14:26 +0100 |
|---|---|---|
| committer | Martin Lambers <marlam@marlam.de> | 2012-02-18 17:14:26 +0100 |
| commit | 06bed46f19b62efd41e0b0afcd756ec94ef4f49f (patch) | |
| tree | 58c78d244e4cfa87b9961ac71a09cdea0aebe75f | |
| parent | 3b6a676c017e5bc613f544c93c3deec880abbb64 (diff) | |
| download | bino-06bed46f19b62efd41e0b0afcd756ec94ef4f49f.tar.gz | |
GUI: Extend File->OpenURL to allow opening multple URLs at once.
This fixes #35563.
| -rw-r--r-- | src/player_qt.cpp | 19 | ||||
| -rw-r--r-- | src/player_qt.h | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/player_qt.cpp b/src/player_qt.cpp index affa6b1..d826d05 100644 --- a/src/player_qt.cpp +++ b/src/player_qt.cpp @@ -2450,10 +2450,10 @@ main_window::main_window(QSettings *settings, const player_init_data &init_data) file_open_act->setIcon(get_icon("document-open")); connect(file_open_act, SIGNAL(triggered()), this, SLOT(file_open())); file_menu->addAction(file_open_act); - QAction *file_open_url_act = new QAction(_("Open &URL..."), this); - file_open_url_act->setIcon(get_icon("document-open")); - connect(file_open_url_act, SIGNAL(triggered()), this, SLOT(file_open_url())); - file_menu->addAction(file_open_url_act); + QAction *file_open_urls_act = new QAction(_("Open &URL(s)..."), this); + file_open_urls_act->setIcon(get_icon("document-open")); + connect(file_open_urls_act, SIGNAL(triggered()), this, SLOT(file_open_urls())); + file_menu->addAction(file_open_urls_act); QAction *file_open_device_act = new QAction(_("Open &device..."), this); file_open_device_act->setIcon(get_icon("camera-web")); connect(file_open_device_act, SIGNAL(triggered()), this, SLOT(file_open_device())); @@ -3166,12 +3166,14 @@ void main_window::file_open() update_recent_file_actions(); } -void main_window::file_open_url() +void main_window::file_open_urls() { QDialog *url_dialog = new QDialog(this); - url_dialog->setWindowTitle(_("Open URL")); - QLabel *url_label = new QLabel(_("URL:")); + url_dialog->setWindowTitle(_("Open URL(s)")); + QLabel *url_label = new QLabel(_("URL(s):")); + url_label->setToolTip(_("<p>Enter one or more space separated URLs.</p>")); QLineEdit *url_edit = new QLineEdit(""); + url_edit->setToolTip(url_label->toolTip()); url_edit->setMinimumWidth(256); QPushButton *cancel_btn = new QPushButton(_("Cancel")); QPushButton *ok_btn = new QPushButton(_("OK")); @@ -3189,8 +3191,7 @@ void main_window::file_open_url() if (url_dialog->result() == QDialog::Accepted && !url_edit->text().isEmpty()) { - QString url = url_edit->text(); - open(QStringList(url)); + open(url_edit->text().split(" ", QString::SkipEmptyParts)); } } diff --git a/src/player_qt.h b/src/player_qt.h index 3e4a3aa..f532dcb 100644 --- a/src/player_qt.h +++ b/src/player_qt.h @@ -392,7 +392,7 @@ private slots: void move_event(); void playloop_step(); void file_open(); - void file_open_url(); + void file_open_urls(); void file_open_device(); void preferences_fullscreen(); void preferences_colors(); |
