[gnome-settings-daemon/wip/carlosg/no-wacom-leds: 79/79] wacom: Drop LED helper
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/carlosg/no-wacom-leds: 79/79] wacom: Drop LED helper
- Date: Mon, 10 Aug 2020 18:44:49 +0000 (UTC)
commit 2ff2edeb169646fe2d6bb3bc358fbf38b0b62f5d
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Mar 5 16:33:11 2020 +0100
wacom: Drop LED helper
LED switching on Wacom devices is implemented by the kernel driver since
v4.9. It is already about 4 years old, it's late enough that we may drop
this code.
plugins/wacom/gsd-wacom-led-helper.c | 237 -----------------------------------
plugins/wacom/gsd-wacom-manager.c | 54 +-------
plugins/wacom/meson.build | 23 ++--
3 files changed, 9 insertions(+), 305 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 92fd96c3..03640631 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -66,11 +66,6 @@
static const gchar introspection_xml[] =
"<node name='/org/gnome/SettingsDaemon/Wacom'>"
" <interface name='org.gnome.SettingsDaemon.Wacom'>"
-" <method name='SetGroupModeLED'>"
-" <arg name='device_path' direction='in' type='s'/>"
-" <arg name='group' direction='in' type='u'/>"
-" <arg name='mode' direction='in' type='u'/>"
-" </method>"
" <method name='SetOLEDLabels'>"
" <arg name='device_path' direction='in' type='s'/>"
" <arg name='labels' direction='in' type='as'/>"
@@ -106,10 +101,6 @@ static void gsd_wacom_manager_class_init (GsdWacomManagerClass *klass);
static void gsd_wacom_manager_init (GsdWacomManager *wacom_manager);
static void gsd_wacom_manager_finalize (GObject *object);
-static gboolean set_led (const gchar *device_path,
- guint group,
- guint index,
- GError **error);
static gboolean is_opaque_tablet (GsdWacomManager *manager,
GdkDevice *device);
@@ -279,22 +270,7 @@ handle_method_call (GDBusConnection *connection,
GError *error = NULL;
GdkDevice *device;
- if (g_strcmp0 (method_name, "SetGroupModeLED") == 0) {
- gchar *device_path;
- guint group, mode;
-
- g_variant_get (parameters, "(suu)", &device_path, &group, &mode);
- device = lookup_device_by_path (self, device_path);
- if (!device) {
- g_dbus_method_invocation_return_value (invocation, NULL);
- return;
- }
-
- if (set_led (device_path, group, mode, &error))
- g_dbus_method_invocation_return_value (invocation, NULL);
- else
- g_dbus_method_invocation_return_gerror (invocation, error);
- } else if (g_strcmp0 (method_name, "SetOLEDLabels") == 0) {
+ if (g_strcmp0 (method_name, "SetOLEDLabels") == 0) {
gchar *device_path, *label;
gboolean left_handed;
GSettings *settings;
@@ -336,34 +312,6 @@ static const GDBusInterfaceVTable interface_vtable =
NULL, /* Set Property */
};
-static gboolean
-set_led (const gchar *device_path,
- guint group,
- guint index,
- GError **error)
-{
- char *command;
- gboolean ret;
-
-#ifndef HAVE_GUDEV
- /* Not implemented on non-Linux systems */
- return TRUE;
-#endif
-
- g_debug ("Switching group ID %d to index %d for device %s", group, index, device_path);
-
- command = g_strdup_printf ("pkexec " LIBEXECDIR "/gsd-wacom-led-helper --path %s --group %d --led %d",
- device_path, group, index);
- ret = g_spawn_command_line_sync (command,
- NULL,
- NULL,
- NULL,
- error);
- g_free (command);
-
- return ret;
-}
-
static void
device_added_cb (GdkSeat *seat,
GdkDevice *device,
diff --git a/plugins/wacom/meson.build b/plugins/wacom/meson.build
index 3b1994c5..d8dd0ec7 100644
--- a/plugins/wacom/meson.build
+++ b/plugins/wacom/meson.build
@@ -51,20 +51,13 @@ if enable_gudev
m_dep
]
- programs = [
- 'gsd-wacom-led-helper',
+ executable(
'gsd-wacom-oled-helper',
- ]
-
- foreach program: programs
- executable(
- program,
- program + '.c',
- include_directories: top_inc,
- dependencies: deps,
- install: true,
- install_rpath: gsd_pkglibdir,
- install_dir: gsd_libexecdir
- )
- endforeach
+ 'gsd-wacom-oled-helper.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ install: true,
+ install_rpath: gsd_pkglibdir,
+ install_dir: gsd_libexecdir
+ )
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]