From 829308b887d3e85cc9c0628f2c3432b23c328410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giuseppe=20Cal=C3=A0?= Date: Thu, 26 Jul 2012 10:13:49 +0200 Subject: Let user customize shortcut name & description. PS: Grazie per il lavoro, Giuseppe ;) CCMAIL: gcala@gmail.com REVIEW: 105708 REVIEWED-BY: adjam --- src/application.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index cbb083cb..17682647 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -806,14 +806,14 @@ void Application::createWebAppShortcut() dialog->setButtons(KDialog::Ok | KDialog::Cancel); dialog->button(KDialog::Ok)->setText(i18n("Create")); dialog->setMinimumSize(400, 50); + dialog->setWindowIcon(QIcon(iconManager()->iconForUrl(u).pixmap(16))); Ui::webAppCreation wAppWidget; QWidget widget; wAppWidget.setupUi(&widget); const QString title = mainWindow()->currentTab()->view()->title().remove('&'); - wAppWidget.iconLabel->setPixmap(iconManager()->iconForUrl(u).pixmap(32)); - wAppWidget.titleLabel->setText(title); + wAppWidget.nameLineEdit->setText(title); wAppWidget.kcfg_createDesktopAppShortcut->setChecked(ReKonfig::createDesktopAppShortcut()); wAppWidget.kcfg_createMenuAppShortcut->setChecked(ReKonfig::createMenuAppShortcut()); @@ -830,7 +830,8 @@ void Application::createWebAppShortcut() QString shortcutString = QL1S("#!/usr/bin/env xdg-open\n") + QL1S("[Desktop Entry]\n") - + QL1S("name=kwebapp\n") + + QL1S("Name=") + (wAppWidget.nameLineEdit->text().isEmpty() ? QL1S("kwebapp") : wAppWidget.nameLineEdit->text()) + QL1S("\n") + + QL1S("GenericName=") + (wAppWidget.descriptionLineEdit->text().isEmpty() ? QL1S("") : wAppWidget.descriptionLineEdit->text()) + QL1S("\n") + QL1S("Icon=") + iconPath + QL1S("\n") + QL1S("Exec=kwebapp ") + u.url() + QL1S("\n") + QL1S("Type=Application\n") -- cgit v1.2.1