mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Fixed some language refactoring issues
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1788 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
8e62a9397e
commit
88e99d78cb
6 changed files with 20 additions and 24 deletions
|
@ -459,15 +459,19 @@ namespace Greenshot {
|
|||
private static bool RegisterHotkey(StringBuilder failedKeys, string functionName, string hotkeyString, HotKeyHandler handler) {
|
||||
Keys modifierKeyCode = HotkeyControl.HotkeyModifiersFromString(hotkeyString);
|
||||
Keys virtualKeyCode = HotkeyControl.HotkeyFromString(hotkeyString);
|
||||
if (HotkeyControl.RegisterHotKey(modifierKeyCode, virtualKeyCode, handler) < 0) {
|
||||
LOG.DebugFormat("Failed to register {0} to hotkey: {1}", functionName, hotkeyString);
|
||||
if (failedKeys.Length > 0) {
|
||||
failedKeys.Append(", ");
|
||||
if (!Keys.None.Equals(virtualKeyCode)) {
|
||||
if (HotkeyControl.RegisterHotKey(modifierKeyCode, virtualKeyCode, handler) < 0) {
|
||||
LOG.DebugFormat("Failed to register {0} to hotkey: {1}", functionName, hotkeyString);
|
||||
if (failedKeys.Length > 0) {
|
||||
failedKeys.Append(", ");
|
||||
}
|
||||
failedKeys.Append(hotkeyString);
|
||||
return false;
|
||||
} else {
|
||||
LOG.DebugFormat("Registered {0} to hotkey: {1}", functionName, hotkeyString);
|
||||
}
|
||||
failedKeys.Append(hotkeyString);
|
||||
return false;
|
||||
} else {
|
||||
LOG.DebugFormat("Registered {0} to hotkey: {1}", functionName, hotkeyString);
|
||||
LOG.InfoFormat("Skipping hotkey registration for {0}, no hotkey set!", functionName);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue