From 11a1e4372551439769eafba3f3f5403adff763fb Mon Sep 17 00:00:00 2001 From: romibi Date: Fri, 15 Jul 2016 21:35:44 +0200 Subject: [PATCH] Add and Initialize Icon Themes --- CMakeLists.txt | 14 ++++++++++++++ INSTALL | 8 ++++++++ icons/CMakeLists.txt | 24 ++++++++++++++++++++++++ src/CMakeLists.txt | 3 --- src/common/main.cpp | 6 ++++++ 5 files changed, 52 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8293af05..791ecb4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,22 @@ else() endif() cmake_dependent_option(WITH_OXYGEN "Install Oxygen icon set (usually shipped with KDE)" ON "NOT WITH_KDE" OFF) +cmake_dependent_option(WITH_BREEZE "Install Breeze icon set (usually shipped with KDE)" OFF "NOT WITH_KDE" OFF) +cmake_dependent_option(WITH_BREEZE_DARK "Install Dark Breeze icon set (usually shipped with KDE)" OFF "NOT WITH_KDE" OFF) if (NOT WITH_KDE) add_feature_info(WITH_OXYGEN WITH_OXYGEN "Install Oxygen icon set") + add_feature_info(WITH_BREEZE WITH_BREEZE "Install Breeze icon set. Alternative to Oxygen.") + add_feature_info(WITH_BREEZE_DARK WITH_BREEZE_DARK "Install Dark Breeze icon set. Alternative to Oxygen.") +endif() + +if (WITH_OXYGEN) + add_definitions(-DWITH_OXYGEN) +endif() +if (WITH_BREEZE) + add_definitions(-DWITH_BREEZE) +endif() +if (WITH_BREEZE_DARK) + add_definitions(-DWITH_BREEZE_DARK) endif() # For this, the feature info is added after we know if QtWebkit is installed diff --git a/INSTALL b/INSTALL index 39f4054d..21d7d4dc 100644 --- a/INSTALL +++ b/INSTALL @@ -89,6 +89,14 @@ options here: sure that you have the icon set already installed on your system regardless, use this option to disable installing the bundled icons. +-DWITH_BREEZE=(ON|OFF) + Alternative icon set to Oxygen. + By default, WITH_BREEZE is OFF. + +-DWITH_BREEZE_DARK=(ON|OFF) + Alternative icon set to Oxygen. + By default, WITH_BREEZE_DARK is OFF. + -DWITH_WEBKIT=OFF Use Webkit for showing previews of webpages linked in the chat. Requires the QtWebkit module to be available, and increases the client's RAM usage diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 1a253537..4ae47d5c 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -17,18 +17,42 @@ if (WANT_MONO OR WANT_QTCLIENT) message(STATUS "Embedding bundled Oxygen icons") set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/oxygen.qrc) endif() + if (WITH_BREEZE) + message(STATUS "Embedding bundled Breeze icons") + set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/breeze.qrc) + endif() + if (WITH_BREEZE_DARK) + message(STATUS "Embedding bundled Breeze Dark icons") + set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/breezedark.qrc) + endif() else() install(DIRECTORY hicolor DESTINATION ${CMAKE_INSTALL_ICONDIR}) if (WITH_OXYGEN) message(STATUS "Installing bundled Oxygen icons") install(DIRECTORY oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) endif() + if (WITH_BREEZE) + message(STATUS "Installing bundled Breeze icons") + install(DIRECTORY breeze DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) + endif() + if (WITH_BREEZE_DARK) + message(STATUS "Installing bundled Breeze Dark icons") + install(DIRECTORY breezedark DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) + endif() endif() if (NOT WITH_OXYGEN) message(STATUS "Not installing bundled Oxygen icons") endif() + if (NOT WITH_BREEZE) + message(STATUS "Not installing bundled Breeze icons") + endif() + + if (NOT WITH_BREEZE_DARK) + message(STATUS "Not installing bundled Breeze Dark icons") + endif() + set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84da4767..dc163346 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,9 +26,6 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) # for version.gen if (EMBED_DATA) add_definitions(-DEMBED_DATA) endif() -if (WITH_OXYGEN) - add_definitions(-DWITH_OXYGEN) -endif() # For KAboutData if (WITH_KF5) diff --git a/src/common/main.cpp b/src/common/main.cpp index 01d9d82f..d9dcdc6f 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -100,6 +100,12 @@ int main(int argc, char **argv) # ifdef WITH_OXYGEN Q_INIT_RESOURCE(oxygen); # endif +# ifdef WITH_BREEZE + Q_INIT_RESOURCE(breeze); +# endif +# ifdef WITH_BREEZE_DARK + Q_INIT_RESOURCE(breezedark); +# endif # endif #endif -- 2.20.1