keybinding: don't show deepin-translator if not installed

tower: https://tower.im/projects/4467e3e08ad941bd8a450dbbc65c20c5/todos/1c758fd1955c41fe8657fceac2d292cf/
Change-Id: Ie194399c5de2c94eab61603684730468cc74339e
This commit is contained in:
jouyouyun 2015-04-15 10:55:16 +08:00
parent ffe9c0e7c7
commit b7120bedfa

View File

@ -24,6 +24,7 @@ package keybinding
import (
"dbus/com/deepin/daemon/inputdevices"
"github.com/BurntSushi/xgbutil/keybind"
dutils "pkg.linuxdeepin.com/lib/utils"
"strconv"
"strings"
)
@ -566,6 +567,8 @@ func isKeySupported(key string) bool {
switch key {
case "disable-touchpad":
return isTouchpadExist()
case "deepin-translator":
return dutils.IsFileExist("/usr/bin/deepin-translator")
}
return true