]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/openurl.cpp
Qt: toolbar editor: make it easier for small narrow screens
[vlc] / modules / gui / qt4 / dialogs / openurl.cpp
index 30600264773fffa523c66ff06a61de0375927f32..f31abab571a52a80c38a6a702d14ca6822eae72b 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "dialogs/openurl.hpp"
 #include "util/searchlineedit.hpp"
+#include "util/validators.hpp"
 
 #include <QPushButton>
 #include <QDialogButtonBox>
@@ -62,9 +63,10 @@ OpenUrlDialog::OpenUrlDialog( intf_thread_t *_p_intf,
 
     /* Info label and line edit */
     edit = new ClickLineEdit( qtr( "Enter URL here..." ), this );
+    edit->setValidator( new UrlValidator( edit ) );
 
     QLabel *info = new QLabel( qtr( "Please enter the URL or path "
-                                    "to the media you want to play"),
+                                    "to the media you want to play."),
                                this );
 
     setToolTip( qtr( "If your clipboard contains a valid URL\n"
@@ -103,7 +105,7 @@ bool OpenUrlDialog::shouldEnqueue() const
 }
 
 /** Show Event:
- * When the dialog is shown, try to extract an URL from the clipboard
+ * When the dialog is shown, try to extract a URL from the clipboard
  * and paste it in the Edit box.
  * showEvent can happen not only on exec() but I think it's cool to
  * actualize the URL on showEvent (eg. change virtual desktop...)