Git commit 7d5de6fba1767938f572ca577e6c9fd4d11d5d13 by Johannes Obermayr.
Committed on 26/08/2016 at 19:09.
Pushed by jobermayr into branch 'master'.
Support fetching themes from KDELook.org via KNewStuff.
Note: Previously it was KDE-Look.org. But by some (unknown) reason I had to=
remove "-" to make it working again.
M +7 -1 CMakeLists.txt
M +1 -1 libk3b/projects/videocd/cdi/CMakeLists.txt
M +1 -1 libk3b/projects/videocd/extra/CMakeLists.txt
M +8 -2 src/CMakeLists.txt
M +1 -1 src/icons/actions/CMakeLists.txt
M +1 -1 src/icons/devices/CMakeLists.txt
M +7 -0 src/option/base_k3bthemeoptiontab.ui
A +22 -0 src/option/k3b-providers.xml
A +5 -0 src/option/k3btheme.knsrc.cmake
M +12 -1 src/option/k3bthemeoptiontab.cpp
M +1 -0 src/option/k3bthemeoptiontab.h
M +21 -1 src/pics/73lab/CMakeLists.txt
M +20 -3 src/pics/RobsTheme/CMakeLists.txt
M +21 -4 src/pics/crystal/CMakeLists.txt
M +20 -1 src/pics/quant/CMakeLists.txt
http://commits.kde.org/k3b/7d5de6fba1767938f572ca577e6c9fd4d11d5d13
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 209f461..da87239 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,7 @@ include(ECMInstallIcons)
=
find_package(Qt5 REQUIRED COMPONENTS Core DBus Gui WebKitWidgets)
find_package(KF5 REQUIRED COMPONENTS Archive Config CoreAddons DocTools Fi=
leMetaData I18n IconThemes JobWidgets
- KCMUtils KIO Notifications NotifyConf=
ig Service Solid WidgetsAddons XmlGui)
+ KCMUtils KIO Notifications NewStuff N=
otifyConfig Service Solid WidgetsAddons XmlGui)
find_package(Iconv)
set(HAVE_ICONV "${ICONV_FOUND}")
=
@@ -248,6 +248,12 @@ set(ENABLE_HAL_SUPPORT "${K3B_ENABLE_HAL_SUPPORT}")
set(ENABLE_AUDIO_PLAYER "${QT_QTMULTIMEDIA_FOUND}")
set(ENABLE_PERMISSION_HELPER "${K3B_ENABLE_PERMISSION_HELPER}")
=
+if(IS_ABSOLUTE DATA_INSTALL_DIR)
+ set(K3B_DATA_INSTALL_DIR ${DATA_INSTALL_DIR}/k3b)
+else()
+ set(K3B_DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/k3b)
+endif()
+
configure_file(config-k3b.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-k3b.h)
include_directories(${CMAKE_BINARY_DIR})
=
diff --git a/libk3b/projects/videocd/cdi/CMakeLists.txt b/libk3b/projects/v=
ideocd/cdi/CMakeLists.txt
index 7af0ea5..81d60e5 100644
--- a/libk3b/projects/videocd/cdi/CMakeLists.txt
+++ b/libk3b/projects/videocd/cdi/CMakeLists.txt
@@ -1 +1 @@
-install( FILES cdi_imag.rtf cdi_text.fnt cdi_vcd.app cdi_vcd.cfg vcd_on_c=
di_41.pdf icdia.htm DESTINATION ${DATA_INSTALL_DIR}/k3b/cdi )
+install( FILES cdi_imag.rtf cdi_text.fnt cdi_vcd.app cdi_vcd.cfg vcd_on_c=
di_41.pdf icdia.htm DESTINATION ${K3B_DATA_INSTALL_DIR}/cdi )
diff --git a/libk3b/projects/videocd/extra/CMakeLists.txt b/libk3b/projects=
/videocd/extra/CMakeLists.txt
index e1bd942..d319364 100644
--- a/libk3b/projects/videocd/extra/CMakeLists.txt
+++ b/libk3b/projects/videocd/extra/CMakeLists.txt
@@ -1 +1 @@
-install( FILES k3bphotovcd.mpg k3bphotosvcd.mpg DESTINATION ${DATA_INSTAL=
L_DIR}/k3b/extra )
+install( FILES k3bphotovcd.mpg k3bphotosvcd.mpg DESTINATION ${K3B_DATA_IN=
STALL_DIR}/extra )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d0d8ec6..514f423 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -231,6 +231,7 @@ target_link_libraries(k3b
KF5::JobWidgets
KF5::KIOFileWidgets
KF5::KCMUtils
+ KF5::NewStuff
KF5::Notifications
KF5::NotifyConfig
KF5::Solid
@@ -253,14 +254,19 @@ endif()
=
install(TARGETS k3b ${INSTALL_TARGETS_DEFAULT_ARGS})
=
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/option/k3btheme.knsrc.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/option/k3btheme.knsrc
+ @ONLY)
=
-########### install files ###############
=
+########### install files ###############
install( PROGRAMS org.kde.k3b.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}=
)
#install( FILES k3b-iso.desktop k3b-cue.desktop DESTINATION ${APPLNK_INST=
ALL_DIR}/.hidden/ )
-install( FILES k3b.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
+install( FILES k3b.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
install( FILES k3bui.rc k3bdeviceui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}=
/k3b )
install( FILES org.kde.k3b.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX=
}/appdata/ )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/option/k3btheme.knsrc DESTINAT=
ION ${KDE_INSTALL_CONFDIR} )
+install( FILES option/k3b-providers.xml DESTINATION ${K3B_DATA_INSTALL_DI=
R}/pics )
=
set( SHARED_MIME_INFO_MINIMUM_VERSION "0.23" )
find_package( SharedMimeInfo REQUIRED )
diff --git a/src/icons/actions/CMakeLists.txt b/src/icons/actions/CMakeList=
s.txt
index 0d9f95d..3f74385 100644
--- a/src/icons/actions/CMakeLists.txt
+++ b/src/icons/actions/CMakeLists.txt
@@ -24,5 +24,5 @@ ecm_install_icons(
sc-actions-tools-rip-video-cd.svgz
sc-actions-tools-rip-video-dvd.svgz
DESTINATION
- ${DATA_INSTALL_DIR}/k3b/icons
+ ${K3B_DATA_INSTALL_DIR}/icons
)
diff --git a/src/icons/devices/CMakeLists.txt b/src/icons/devices/CMakeList=
s.txt
index c987522..bf6d8fb 100644
--- a/src/icons/devices/CMakeLists.txt
+++ b/src/icons/devices/CMakeLists.txt
@@ -39,5 +39,5 @@ ecm_install_icons(
sc-devices-media-optical-mixed-cd.svgz
sc-devices-media-optical-video.svgz
DESTINATION
- ${DATA_INSTALL_DIR}/k3b/icons
+ ${K3B_DATA_INSTALL_DIR}/icons
)
diff --git a/src/option/base_k3bthemeoptiontab.ui b/src/option/base_k3bthem=
eoptiontab.ui
index 95da02e..10a14cd 100644
--- a/src/option/base_k3bthemeoptiontab.ui
+++ b/src/option/base_k3bthemeoptiontab.ui
@@ -114,6 +114,13 @@
-
+
+
+ Get New Themes...
+
+
+
+ -
Install New Theme...
diff --git a/src/option/k3b-providers.xml b/src/option/k3b-providers.xml
new file mode 100644
index 0000000..17c6a12
--- /dev/null
+++ b/src/option/k3b-providers.xml
@@ -0,0 +1,22 @@
+
+
+
+ kdelook
+ http://api.KDELook.org/v1/
+ KDELook.org
+
+ https://kdelook.org/terms/
+ https://kdelook.org/usermanager/new.php
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/option/k3btheme.knsrc.cmake b/src/option/k3btheme.knsrc.cm=
ake
new file mode 100644
index 0000000..ee82567
--- /dev/null
+++ b/src/option/k3btheme.knsrc.cmake
@@ -0,0 +1,5 @@
+[KNewStuff3]
+ProvidersUrl=3Dfile://@K3B_DATA_INSTALL_DIR@/pics/k3b-providers.xml
+Categories=3DK3b Theme
+TargetDir=3Dk3b/pics
+Uncompress=3Dalways
diff --git a/src/option/k3bthemeoptiontab.cpp b/src/option/k3bthemeoptionta=
b.cpp
index 138bb25..7869b25 100644
--- a/src/option/k3bthemeoptiontab.cpp
+++ b/src/option/k3bthemeoptiontab.cpp
@@ -27,9 +27,11 @@
#include
#include
#include
+#include
=
#include
#include
+#include
#include
#include
#include
@@ -54,6 +56,8 @@ K3b::ThemeOptionTab::ThemeOptionTab( QWidget* parent )
this, SLOT(slotInstallTheme()) );
connect( m_buttonRemoveTheme, SIGNAL(clicked()),
this, SLOT(slotRemoveTheme()) );
+ connect( m_buttonGetNewThemes, SIGNAL(clicked()),
+ this, SLOT(slotGetNewThemes()) );
}
=
=
@@ -215,4 +219,11 @@ void K3b::ThemeOptionTab::slotRemoveTheme()
}
}
=
-
+void K3b::ThemeOptionTab::slotGetNewThemes()
+{
+ QPointer dialog =3D new KNS3::DownloadDialog( QS=
tringLiteral("k3btheme.knsrc"), this );
+ dialog->exec();
+ if ( dialog && !dialog->changedEntries().isEmpty() )
+ m_themeModel->reload();
+ delete dialog;
+}
diff --git a/src/option/k3bthemeoptiontab.h b/src/option/k3bthemeoptiontab.h
index 5de9d6e..6274ea9 100644
--- a/src/option/k3bthemeoptiontab.h
+++ b/src/option/k3bthemeoptiontab.h
@@ -43,6 +43,7 @@ namespace K3b {
void selectionChanged();
void slotInstallTheme();
void slotRemoveTheme();
+ void slotGetNewThemes();
=
private:
ThemeModel* m_themeModel;
diff --git a/src/pics/73lab/CMakeLists.txt b/src/pics/73lab/CMakeLists.txt
index d07bab0..3453568 100644
--- a/src/pics/73lab/CMakeLists.txt
+++ b/src/pics/73lab/CMakeLists.txt
@@ -1 +1,21 @@
-install( FILES splash.png project_left.png project_right.png pro=
bing.png media_audio.png media_data.png media_video.png media_e=
mpty.png media_left.png media_mixed.png media_none.png progress=
_working.png progress_fail.png progress_success.png progress_right=
.png dialog_left.png dialog_right.png welcome_bg.png k3b.theme =
DESTINATION ${DATA_INSTALL_DIR}/k3b/pics/73lab )
+install( FILES
+ splash.png
+ project_left.png
+ project_right.png
+ probing.png
+ media_audio.png
+ media_data.png
+ media_video.png
+ media_empty.png
+ media_left.png
+ media_mixed.png
+ media_none.png
+ progress_working.png
+ progress_fail.png
+ progress_success.png
+ progress_right.png
+ dialog_left.png
+ dialog_right.png
+ welcome_bg.png
+ k3b.theme
+ DESTINATION ${K3B_DATA_INSTALL_DIR}/pics/73lab )
diff --git a/src/pics/RobsTheme/CMakeLists.txt b/src/pics/RobsTheme/CMakeLi=
sts.txt
index 905d265..37c3435 100644
--- a/src/pics/RobsTheme/CMakeLists.txt
+++ b/src/pics/RobsTheme/CMakeLists.txt
@@ -1,3 +1,20 @@
-
-install( FILES splash.png project_left.png project_right.png med=
ia_audio.png media_data.png media_video.png media_empty.png med=
ia_left.png media_mixed.png media_none.png progress_working.png =
progress_fail.png progress_success.png progress_right.png dialog_=
left.png dialog_right.png welcome_bg.png k3b.theme DESTINATION ${D=
ATA_INSTALL_DIR}/k3b/pics/RobsTheme )
-
+install( FILES
+ splash.png
+ project_left.png
+ project_right.png
+ media_audio.png
+ media_data.png
+ media_video.png
+ media_empty.png
+ media_left.png
+ media_mixed.png
+ media_none.png
+ progress_working.png
+ progress_fail.png
+ progress_success.png
+ progress_right.png
+ dialog_left.png
+ dialog_right.png
+ welcome_bg.png
+ k3b.theme
+ DESTINATION ${K3B_DATA_INSTALL_DIR}/pics/RobsTheme )
diff --git a/src/pics/crystal/CMakeLists.txt b/src/pics/crystal/CMakeLists.=
txt
index cf779b4..37a2773 100644
--- a/src/pics/crystal/CMakeLists.txt
+++ b/src/pics/crystal/CMakeLists.txt
@@ -1,4 +1,21 @@
-
-install( FILES splash.png project_left.png project_right.png pro=
bing.png media_audio.png media_data.png media_video.png media_e=
mpty.png media_left.png media_mixed.png media_none.png progress=
_working.png progress_fail.png progress_success.png progress_right=
.png dialog_left.png dialog_right.png welcome_bg.png k3b.theme =
DESTINATION ${DATA_INSTALL_DIR}/k3b/pics/crystal )
-
-
+install( FILES
+ splash.png
+ project_left.png
+ project_right.png
+ probing.png
+ media_audio.png
+ media_data.png
+ media_video.png
+ media_empty.png
+ media_left.png
+ media_mixed.png
+ media_none.png
+ progress_working.png
+ progress_fail.png
+ progress_success.png
+ progress_right.png
+ dialog_left.png
+ dialog_right.png
+ welcome_bg.png
+ k3b.theme
+ DESTINATION ${K3B_DATA_INSTALL_DIR}/pics/crystal )
diff --git a/src/pics/quant/CMakeLists.txt b/src/pics/quant/CMakeLists.txt
index d462db5..7083239 100644
--- a/src/pics/quant/CMakeLists.txt
+++ b/src/pics/quant/CMakeLists.txt
@@ -1 +1,20 @@
-install( FILES splash.png project_left.png project_right.png med=
ia_audio.png media_data.png media_video.png media_empty.png med=
ia_left.png media_mixed.png media_none.png progress_working.png =
progress_fail.png progress_success.png progress_right.png dialog_=
left.png dialog_right.png welcome_bg.png k3b.theme DESTINATION ${D=
ATA_INSTALL_DIR}/k3b/pics/quant )
+install( FILES
+ splash.png
+ project_left.png
+ project_right.png
+ media_audio.png
+ media_data.png
+ media_video.png
+ media_empty.png
+ media_left.png
+ media_mixed.png
+ media_none.png
+ progress_working.png
+ progress_fail.png
+ progress_success.png
+ progress_right.png
+ dialog_left.png
+ dialog_right.png
+ welcome_bg.png
+ k3b.theme
+ DESTINATION ${K3B_DATA_INSTALL_DIR}/pics/quant )