From a92d37c1c01bbe7da46ce093ae61ee1bf3ef426b Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 10 Oct 2023 01:08:26 +0200 Subject: CMakeLists.txt: Drop test options fixes https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/issues/46 --- CMakeLists.txt | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c14e2e3..861309ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,16 +8,9 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) # Options -option(ENABLE_TESTS "Enable all tests and checks" OFF) -option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF) option(ENABLE_WERROR "Treat all build warnings as errors" OFF) -if(ENABLE_COVERAGE) - set(ENABLE_TESTS ON) - set(CMAKE_BUILD_TYPE "Coverage") -else() - set(CMAKE_BUILD_TYPE "Release") -endif() +set(CMAKE_BUILD_TYPE "Release") if(ENABLE_WERROR) add_definitions("-Werror") @@ -56,21 +49,6 @@ add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) -# Test and coverage -if (ENABLE_TESTS) - - include(CTest) - enable_testing() - - if (ENABLE_COVERAGE) - - find_package(CoverageReport) - - endif() - -endif() - # Display config info message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") -message(STATUS "Unit tests: ${ENABLE_TESTS}") message(STATUS "Build with -Werror: ${ENABLE_WERROR}") -- cgit v1.2.3 From 44483ffe3d3624df179b98ec94a833dcde2830c6 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sat, 7 Oct 2023 02:45:56 +0200 Subject: src/keyboard-x11.c: Define new D-Bus name and path for greeter --- src/keyboard-x11.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/keyboard-x11.c b/src/keyboard-x11.c index 2e8435ff..141a23ee 100644 --- a/src/keyboard-x11.c +++ b/src/keyboard-x11.c @@ -21,6 +21,9 @@ #include "languages.h" #include "keyboard.h" +#define GREETER_BUS_NAME "org.ayatana.greeter" +#define GREETER_BUS_PATH "/org/ayatana/greeter" + enum { LAYOUT_CHANGED, @@ -123,7 +126,7 @@ static void getAccountsService(Keyboard *pKeyboard, ActUser *pUser) if (!pKeyboard->pPrivate->sUser) { GError *pError = NULL; - GVariant *pUser = g_dbus_connection_call_sync (pKeyboard->pPrivate->pConnection, "org.ArcticaProject.ArcticaGreeter", "/org/ArcticaProject/ArcticaGreeter", "org.ArcticaProject.ArcticaGreeter", "GetUser", NULL, G_VARIANT_TYPE ("(s)"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &pError); + GVariant *pUser = g_dbus_connection_call_sync (pKeyboard->pPrivate->pConnection, GREETER_BUS_NAME, GREETER_BUS_PATH, GREETER_BUS_NAME, "GetUser", NULL, G_VARIANT_TYPE ("(s)"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &pError); if (pError) { @@ -440,7 +443,7 @@ void keyboard_SetLayout(Keyboard *pKeyboard, gint nLayout) GError *pError = NULL; GVariant *pLayout = g_variant_new ("(ss)", lParams[0], sVariant); - g_dbus_connection_call_sync (pKeyboard->pPrivate->pConnection, "org.ArcticaProject.ArcticaGreeter", "/org/ArcticaProject/ArcticaGreeter", "org.ArcticaProject.ArcticaGreeter", "SetLayout", pLayout, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &pError); + g_dbus_connection_call_sync (pKeyboard->pPrivate->pConnection, GREETER_BUS_NAME, GREETER_BUS_PATH, GREETER_BUS_NAME, "SetLayout", pLayout, NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &pError); if (pError) { @@ -640,7 +643,7 @@ static void keyboard_init(Keyboard *self) else { self->pPrivate->lUsers = NULL; - self->pPrivate->nSubscription = g_dbus_connection_signal_subscribe (self->pPrivate->pConnection, NULL, "org.ArcticaProject.ArcticaGreeter", "UserChanged", "/org/ArcticaProject/ArcticaGreeter", NULL, G_DBUS_SIGNAL_FLAGS_NONE, onUserChanged, self, NULL); + self->pPrivate->nSubscription = g_dbus_connection_signal_subscribe (self->pPrivate->pConnection, NULL, GREETER_BUS_NAME, "UserChanged", GREETER_BUS_PATH, NULL, G_DBUS_SIGNAL_FLAGS_NONE, onUserChanged, self, NULL); // Get layouts from /etc/default/keyboard gchar *sFile; -- cgit v1.2.3