Emit failed message when fail to register shortcut.

This commit is contained in:
Haojian Wu 2014-07-30 14:56:29 +08:00
parent a8034364ff
commit ad827eee90

View file

@ -63,8 +63,9 @@ void Shortcut::Register() {
OnFailed("Shortcut is invalid.");
return;
}
GlobalShortcutListener::GetInstance()->RegisterAccelerator(
accelerator_, this);
if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator(
accelerator_, this))
OnFailed("Fail to register the shortcut.");
}
void Shortcut::Unregister() {