1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56: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> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <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> <item>
<widget class="QListWidget" name="list"> <widget class="QListWidget" name="list">
<property name="alternatingRowColors"> <property name="alternatingRowColors">
@ -57,6 +45,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="butRemove">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
@ -71,12 +69,12 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="butRemove"> <widget class="QLabel" name="label">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text"> <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> </property>
</widget> </widget>
</item> </item>

View File

@ -233,9 +233,14 @@ void PluginsManager::removeClicked()
Plugins::Plugin plugin = item->data(Qt::UserRole + 10).value<Plugins::Plugin>(); Plugins::Plugin plugin = item->data(Qt::UserRole + 10).value<Plugins::Plugin>();
if (plugin.isRemovable()) { const auto button = QMessageBox::warning(this, tr("Confirmation"),
mApp->plugins()->removePlugin(&plugin); 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() PluginsManager::~PluginsManager()

View File

@ -169,6 +169,16 @@
</property> </property>
</spacer> </spacer>
</item> </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> </layout>
</item> </item>
</layout> </layout>