diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/hotkeys.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/skin.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mir_app/src/hotkeys.cpp b/src/mir_app/src/hotkeys.cpp index b2b0247ab7..66993b6011 100644 --- a/src/mir_app/src/hotkeys.cpp +++ b/src/mir_app/src/hotkeys.cpp @@ -210,9 +210,7 @@ MIR_APP_DLL(int) Hotkey_Unregister(const char *pszName) cbNamePrefix = mir_strlen(pszNamePrefix);
for (int i = 0; i < hotkeys.getCount(); i++) {
- char *pszCurrentName = hotkeys[i]->rootHotkey ?
- hotkeys[i]->rootHotkey->pszName :
- hotkeys[i]->pszName;
+ char *pszCurrentName = hotkeys[i]->getName();
if (!pszCurrentName)
continue;
diff --git a/src/mir_app/src/skin.h b/src/mir_app/src/skin.h index 2ad06ff79b..602b3bb3d3 100644 --- a/src/mir_app/src/skin.h +++ b/src/mir_app/src/skin.h @@ -37,8 +37,8 @@ struct THotkeyBoxData struct THotkeyItem
{
THotkeyType type;
- char *pszService, *pszName; // pszName is valid _only_ for "root" hotkeys
- wchar_t *pwszSection, *pwszDescription;
+ char *pszService, *pszName; // pszName is valid _only_ for "root" hotkeys
+ wchar_t *pwszSection, *pwszDescription;
LPARAM lParam;
WORD DefHotkey, Hotkey;
bool Enabled;
@@ -56,6 +56,8 @@ struct THotkeyItem bool UnregisterHotkey; // valid only during WM_APP message in options UI, used to remove unregistered hotkeys from options
+ __inline char* getName() const { return (rootHotkey) ? rootHotkey->pszName : pszName; }
+
__inline wchar_t* getSection() const { return TranslateW_LP(pwszSection, hLangpack); }
__inline wchar_t* getDescr() const { return TranslateW_LP(pwszDescription, hLangpack); }
};
|