1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Preferences: Add links to KDE store for installing themes/extensions

This commit is contained in:
David Rosca 2019-04-20 10:23:30 +02:00
parent f792104be5
commit 8e5c478c90
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 32 additions and 19 deletions

View File

@ -11,18 +11,6 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QListWidget" name="list">
<property name="alternatingRowColors">
@ -57,6 +45,16 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butRemove">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -71,12 +69,12 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="butRemove">
<property name="enabled">
<bool>false</bool>
</property>
<widget class="QLabel" name="label">
<property name="text">
<string>Remove</string>
<string>&lt;a href=&quot;https://store.kde.org/browse/cat/571/&quot;&gt;Get more extensions...&lt;/a&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>

View File

@ -233,9 +233,14 @@ void PluginsManager::removeClicked()
Plugins::Plugin plugin = item->data(Qt::UserRole + 10).value<Plugins::Plugin>();
if (plugin.isRemovable()) {
mApp->plugins()->removePlugin(&plugin);
const auto button = QMessageBox::warning(this, tr("Confirmation"),
tr("Are you sure you want to remove '%1'?").arg(plugin.pluginSpec.name),
QMessageBox::Yes | QMessageBox::No);
if (button != QMessageBox::Yes) {
return;
}
mApp->plugins()->removePlugin(&plugin);
}
PluginsManager::~PluginsManager()

View File

@ -169,6 +169,16 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>&lt;a href=&quot;https://store.kde.org/browse/cat/572/&quot;&gt;Get more themes...&lt;/a&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>