diff --git a/urlhandler/dialog.ui b/urlhandler/dialog.ui
index e7708566d..832c312b5 100644
--- a/urlhandler/dialog.ui
+++ b/urlhandler/dialog.ui
@@ -20,13 +20,6 @@
- -
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
diff --git a/urlhandler/kdeconnect-handler.cpp b/urlhandler/kdeconnect-handler.cpp
index 3d6f718a4..59b2524e0 100644
--- a/urlhandler/kdeconnect-handler.cpp
+++ b/urlhandler/kdeconnect-handler.cpp
@@ -85,21 +85,26 @@ int main(int argc, char** argv)
proxyModel.setSourceModel(&model);
QDialog dialog;
- dialog.setWindowTitle(urlToShare.toDisplayString(QUrl::PreferLocalFile));
+
Ui::Dialog uidialog;
uidialog.setupUi(&dialog);
uidialog.devicePicker->setModel(&proxyModel);
+ QString displayUrl;
+
if (urlToShare.scheme() == QLatin1String("tel")) {
- uidialog.label->setText(i18n("Device to call this phone number with:"));
- uidialog.urlLabel->setText(urlToShare.toDisplayString(QUrl::RemoveScheme));
+ displayUrl = urlToShare.toDisplayString(QUrl::RemoveScheme);
+ uidialog.label->setText(i18n("Device to call %1 with:", displayUrl));
} else if (urlToShare.isLocalFile()) {
- uidialog.label->setText(i18n("Device to send this file to:"));
- uidialog.urlLabel->setText(urlToShare.toDisplayString(QUrl::PreferLocalFile));
+ displayUrl = urlToShare.toDisplayString(QUrl::PreferLocalFile);
+ uidialog.label->setText(i18n("Device to send %1 to:", displayUrl));
} else {
- uidialog.urlLabel->setText(urlToShare.toDisplayString());
+ displayUrl = urlToShare.toDisplayString(QUrl::PreferLocalFile);
+ uidialog.label->setText(i18n("Device to open %1 on:", displayUrl));
}
+ dialog.setWindowTitle(displayUrl);
+
if (dialog.exec() == QDialog::Accepted) {
QUrl url = urlToShare;
const int currentDeviceIndex = uidialog.devicePicker->currentIndex();