diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-21 19:01:35 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-21 19:01:35 +0300 |
commit | ee23690fa6c847a5284f8145e73328cdaab2b617 (patch) | |
tree | fc9fa53601eb0babccec11021dc9638c07522f9c /plugins/QuickMessages/src | |
parent | a455124c53674338f581a1970768182223c3a49a (diff) |
SRMM toolbar buttons that require input window to be visible are marked as BBBF_NOREADONLY
Diffstat (limited to 'plugins/QuickMessages/src')
-rw-r--r-- | plugins/QuickMessages/src/Utils.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index 0de8c5dcb7..04d56f14a9 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -239,22 +239,22 @@ static HANDLE AddIcon(char* szIcoName) uint32_t BalanceButtons(int buttonsWas, int buttonsNow) { - BBButton bb = {}; - bb.pszModuleName = MODULENAME; + BBButton bbd = {}; + bbd.pszModuleName = MODULENAME; while (buttonsWas > buttonsNow) { - bb.dwButtonID = --buttonsWas; - Srmm_RemoveButton(&bb); + bbd.dwButtonID = --buttonsWas; + Srmm_RemoveButton(&bbd); } while (buttonsWas < buttonsNow) { char iconname[40]; mir_snprintf(iconname, LPGEN("Quick Messages Button %u"), buttonsWas); - bb.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON; - bb.dwButtonID = buttonsWas++; - bb.dwDefPos = 300 + buttonsWas; - bb.hIcon = AddIcon(iconname); - Srmm_AddButton(&bb, &g_plugin); + bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_NOREADONLY; + bbd.dwButtonID = buttonsWas++; + bbd.dwDefPos = 300 + buttonsWas; + bbd.hIcon = AddIcon(iconname); + g_plugin.addButton(&bbd); } return buttonsNow; @@ -370,13 +370,13 @@ int RegisterCustomButton(WPARAM, LPARAM) mir_snprintf(iconname, LPGEN("Quick Messages Button %u"), i); BBButton bbd = {}; - bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON; + bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_NOREADONLY; bbd.dwButtonID = i; bbd.dwDefPos = 320 + i; bbd.hIcon = AddIcon(iconname); bbd.pszModuleName = MODULENAME; bbd.pwszTooltip = ld->ptszButtonName; - Srmm_AddButton(&bbd, &g_plugin); + g_plugin.addButton(&bbd); } return 0; } |