summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-13 15:33:51 +0100
committerinfirit <[email protected]>2014-12-13 18:32:16 +0100
commitf228d752968a3f0b607a41eed9dfb7630e1da073 (patch)
tree694139ed40aa1cc60d154582a4ba2522d49bd0e5
parent420c17e9df0fe75f74b13f9d0caa91e764780c4b (diff)
downloadmate-settings-daemon-f228d752968a3f0b607a41eed9dfb7630e1da073.tar.bz2
mate-settings-daemon-f228d752968a3f0b607a41eed9dfb7630e1da073.tar.xz
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 <[email protected]> Gnome bug: https://bugzilla.redhat.com/show_bug.cgi?id=614213
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c8
1 files changed, 8 insertions, 0 deletions
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",