summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Xianwei <[email protected]>2018-10-01 10:00:43 -0400
committerraveit65 <[email protected]>2018-10-05 13:38:48 +0200
commit45de88e15e72806554c9bdb40dea17ac599c097d (patch)
treea801cf525bf6525ec6ceba0019b243eac7e75ab8
parent193f3fbc64a1690f2d4392833b9591832bc29377 (diff)
downloadmate-settings-daemon-45de88e15e72806554c9bdb40dea17ac599c097d.tar.bz2
mate-settings-daemon-45de88e15e72806554c9bdb40dea17ac599c097d.tar.xz
media-keys: Simplify touchpad OSD
Signed-off-by: Zhang Xianwei <[email protected]>
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c
index fbca896..cbf8586 100644
--- a/plugins/media-keys/msd-media-keys-manager.c
+++ b/plugins/media-keys/msd-media-keys-manager.c
@@ -601,17 +601,11 @@ do_touchpad_action (MsdMediaKeysManager *manager)
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);
+ do_touchpad_osd_action (manager, FALSE);
return;
}
- dialog_init (manager);
- msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog),
- (!state) ? "touchpad-enabled" : "touchpad-disabled",
- FALSE);
- dialog_show (manager);
+ do_touchpad_osd_action (manager, !state);
g_settings_set_boolean (settings, TOUCHPAD_ENABLED_KEY, !state);
g_object_unref (settings);