Skip to content
Permalink
Browse files

media-keys: Simplify touchpad OSD

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
  • Loading branch information...
zhangxianwei8 authored and raveit65 committed Oct 1, 2018
1 parent 193f3fb commit 45de88e15e72806554c9bdb40dea17ac599c097d
Showing with 2 additions and 8 deletions.
  1. +2 −8 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);

0 comments on commit 45de88e

Please sign in to comment.
You can’t perform that action at this time.