Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit fdb0df56 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix look-up of gtk preview modules

BUG: 383198
parent 836486fb
......@@ -24,6 +24,8 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# Set KI18n translation domain
add_definitions(-DTRANSLATION_DOMAIN=\"kde-gtk-config\")
......
#define CMAKE_INSTALL_FULL_LIBEXECDIR "@CMAKE_INSTALL_FULL_LIBEXECDIR@"
......@@ -9,6 +9,6 @@ add_executable(gtk3_preview preview3.c)
if(X11_FOUND)
target_include_directories(gtk3_preview PRIVATE ${X11_X11_INCLUDE_PATH})
endif()
target_compile_definitions(gtk3_preview PRIVATE "-DDATA_DIR=\"${DATA_INSTALL_DIR}/kcm-gtk-module/\"")
target_compile_definitions(gtk3_preview PRIVATE "-DDATA_DIR=\"${KDE_INSTALL_FULL_DATADIR}/kcm-gtk-module/\"")
target_link_libraries(gtk3_preview ${GTK3_LIBRARY} ${GOBJECT2_LIBRARY} ${GLIB2_LIBRARY})
install(TARGETS gtk3_preview RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}")
......@@ -8,7 +8,7 @@ install(TARGETS reload_gtk_apps RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}")
add_executable(gtk_preview preview.c)
target_compile_definitions(gtk_preview PRIVATE "-DDATA_DIR=\"${DATA_INSTALL_DIR}/kcm-gtk-module/\"")
target_compile_definitions(gtk_preview PRIVATE "-DDATA_DIR=\"${KDE_INSTALL_FULL_DATADIR}/kcm-gtk-module/\"")
target_link_libraries(gtk_preview ${GTK2_LIBRARIES} ${GTK2_GIOMM_LIBRARY})
install(TARGETS gtk_preview RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}")
......
......@@ -86,7 +86,7 @@ int main(int argc, char **argv)
GtkBuilder *builder = gtk_builder_new();
if( ! gtk_builder_add_from_file( builder, ui_file, &error ) ) {
g_warning( "%s", error->message );
g_free( error );
g_object_unref( error );
return 1;
}
......
......@@ -28,6 +28,7 @@
#include <QDebug>
#include <QProcess>
#include <QStandardPaths>
#include <config.h>
bool AppearanceGTK2::loadSettingsPrivate(const QString& path)
{
......@@ -138,7 +139,7 @@ bool AppearanceGTK2::saveSettingsPrivate(const QString& gtkrcFile) const
// qDebug() << "Symbolic link created for .gtkrc-2.0-kde4 :D";
if(gtkrcFile==defaultConfigFile())
QProcess::startDetached(QStandardPaths::findExecutable("reload_gtk_apps"));
QProcess::startDetached(QStandardPaths::findExecutable("reload_gtk_apps", {CMAKE_INSTALL_FULL_LIBEXECDIR}));
return true;
}
......
......@@ -32,6 +32,7 @@
#include <QMenu>
#include <QDebug>
#include <QDir>
#include <config.h>
#include "ui_gui.h"
#include "abstractappearance.h"
#include "iconthemesmodel.h"
......@@ -84,8 +85,8 @@ GTKConfigKCModule::GTKConfigKCModule(QWidget* parent, const QVariantList& args )
ui->gtk2Preview->setIcon(previewIcon);
ui->gtk3Preview->setIcon(previewIcon);
QString gtk2Preview = QStandardPaths::findExecutable("gtk_preview");
QString gtk3Preview = QStandardPaths::findExecutable("gtk3_preview");
QString gtk2Preview = QStandardPaths::findExecutable("gtk_preview", {CMAKE_INSTALL_FULL_LIBEXECDIR});
QString gtk3Preview = QStandardPaths::findExecutable("gtk3_preview", {CMAKE_INSTALL_FULL_LIBEXECDIR});
m_p2 = new KProcess(this);
m_p2->setEnv("GTK2_RC_FILES", m_tempGtk2Preview, true);
......
......@@ -3,6 +3,7 @@ macro(add_kgc_test name)
add_test(${name} ${name})
ecm_mark_as_test(${name})
target_link_libraries(${name} Qt5::Core Qt5::Gui Qt5::Test KF5::ConfigCore)
target_include_directories(${name} PRIVATE ${CMAKE_BINARY_DIR})
endmacro(add_kgc_test)
add_kgc_test(fontstest ../src/fontshelpers.cpp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment