Skip to content

Commit

Permalink
media-keys: Simplify touchpad OSD
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
  • Loading branch information
zhangxianwei8 authored and raveit65 committed Oct 5, 2018
1 parent 193f3fb commit 45de88e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions plugins/media-keys/msd-media-keys-manager.c
Expand Up @@ -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);
Expand Down

0 comments on commit 45de88e

Please sign in to comment.