From f228d752968a3f0b607a41eed9dfb7630e1da073 Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 13 Dec 2014 15:33:51 +0100 Subject: media-keys: Show a touchpad-disabled if no touchpad hen pressing the touchpad button on the keyboard, and there's no touchpad present, don't show a wrong state for the touchpad status, but always show a "touch disabled" popup. Taken from GSD commit: ab4ac947c66c232afcb874ac36bece6e652ed3cc From: Bastien Nocera Gnome bug: https://bugzilla.redhat.com/show_bug.cgi?id=614213 --- plugins/media-keys/msd-media-keys-manager.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/media-keys/msd-media-keys-manager.c') diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index 6feac04..7d4245e 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -48,6 +48,7 @@ #include "eggaccelerators.h" #include "acme.h" #include "msd-media-keys-window.h" +#include "msd-input-helper.h" #define MSD_DBUS_PATH "/org/mate/SettingsDaemon" #define MSD_DBUS_NAME "org.mate.SettingsDaemon" @@ -589,6 +590,13 @@ do_touchpad_action (MsdMediaKeysManager *manager) GSettings *settings = g_settings_new (TOUCHPAD_SCHEMA); gboolean state = g_settings_get_boolean (settings, TOUCHPAD_ENABLED_KEY); + if (touchpad_is_present () == FALSE) { + dialog_init (manager); + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + "touchpad-disabled", FALSE); + return; + } + dialog_init (manager); msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), (!state) ? "touchpad-enabled" : "touchpad-disabled", -- cgit v1.2.1