add knewstuff support for color schemes

Summary:
schemes are supplied by `Konsole Color Scheme` category on store.kde.org

https://store.kde.org/p/1216368/

- new manager helpers to unload a theme and check a file's name validity
- new Get New.. button to start the KNS download dialog
- upon KNS completion we'll attempt to load all installed files as schemes
- for KNS entities which failed to load anything we'll show a warning as
  the theme is malformed
- for removal we'll first try to remove schemes through KNS to avoid its
  registry going out of sync with the on-disk "installedness" of an entity
- properly disable copying of the scheme manager (needs to be private)

FEATURE: 18.04.0
CHANGELOG: Support for downloading color schemes from the KDE store

Test Plan:
category is T8053 (can also use `KDE Color Scheme KDE4` for testing)

- get new -> install scheme -> close -> shows up in list
- remove from list -> get new -> not listed as installed
- install random stuff from kde color scheme category -> close ->
  warning should be displayed
- install scheme -> get new -> remove scheme via dialog -> close ->
  not listed as installed

Reviewers: hindenburg

Subscribers: #konsole

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D10766
This commit is contained in:
Harald Sitter
2018-02-28 10:49:10 +01:00
parent 18014c75f2
commit 97d9ed9436
9 changed files with 219 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
add_subdirectory( color-schemes )
add_subdirectory( keyboard-layouts )
install( FILES konsole.knsrc DESTINATION ${CONFIG_INSTALL_DIR})

5
data/konsole.knsrc Normal file
View File

@@ -0,0 +1,5 @@
[KNewStuff3]
ProvidersUrl=https://download.kde.org/ocs/providers.xml
Categories=Konsole Color Schemes
TargetDir=konsole
AcceptHtmlDownloads=false