summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp7
-rw-r--r--src/webappcreation.ui39
2 files changed, 24 insertions, 22 deletions
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")
diff --git a/src/webappcreation.ui b/src/webappcreation.ui
index 2fc242b0..1e688290 100644
--- a/src/webappcreation.ui
+++ b/src/webappcreation.ui
@@ -7,35 +7,36 @@
<x>0</x>
<y>0</y>
<width>461</width>
- <height>196</height>
+ <height>143</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="iconLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
<property name="text">
- <string>ICON</string>
+ <string>Name:</string>
</property>
</widget>
</item>
- <item>
- <widget class="QLabel" name="titleLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="nameLineEdit"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Description:</string>
</property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="descriptionLineEdit">
<property name="text">
- <string>TITLE</string>
+ <string/>
+ </property>
+ <property name="placeholderText">
+ <string>(optional)</string>
</property>
</widget>
</item>