aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-10-10 12:16:32 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-10-10 12:16:32 +0200
commitdce3e336524b36e87dd480f0bd5dbdbd69331228 (patch)
treeb66a52ea08dc3d4fddbd796c7329660b8618f5cb
parentf7afd4175d6dc6acc64ac33ffabe716a183195d5 (diff)
parenta8867cf9c9e7afa0f71a1ab07509ffe3ce407fc8 (diff)
downloadayatana-indicator-keyboard-dce3e336524b36e87dd480f0bd5dbdbd69331228.tar.gz
ayatana-indicator-keyboard-dce3e336524b36e87dd480f0bd5dbdbd69331228.tar.bz2
ayatana-indicator-keyboard-dce3e336524b36e87dd480f0bd5dbdbd69331228.zip
Merge branch 'tari01-pr/define-greeter'
Attributes GH PR #56: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/pull/56
-rw-r--r--src/keyboard-x11.c9
1 files 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;