------------------------------------------------------------ revno: 23 committer: poy <p...@123gen.com> branch nick: SpellPlugin timestamp: Sun 2013-05-05 16:13:11 +0200 message: remove the spellcheck balloon when the box is cleared modified: src/Plugin.cpp src/Plugin.h
-- lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/SpellPlugin/+edit-subscription
=== modified file 'src/Plugin.cpp' --- src/Plugin.cpp 2013-04-29 19:39:43 +0000 +++ src/Plugin.cpp 2013-05-05 14:13:11 +0000 @@ -161,6 +161,17 @@ auto message16 = Util::toT(message); EDITBALLOONTIP tip { sizeof(EDITBALLOONTIP), _T("Spellcheck"), message16.c_str(), TTI_WARNING }; Edit_ShowBalloonTip(hwnd, &tip); + + instance->boxes.push_back(hwnd); + + } else { + instance->boxes.erase(std::remove_if(instance->boxes.begin(), instance->boxes.end(), [hwnd](HWND other) { + if(other == hwnd) { + Edit_HideBalloonTip(hwnd); + return true; + } + return false; + }), instance->boxes.end()); } } } === modified file 'src/Plugin.h' --- src/Plugin.h 2013-04-29 19:39:43 +0000 +++ src/Plugin.h 2013-05-05 14:13:11 +0000 @@ -51,7 +51,9 @@ unique_ptr<Hunspell> spell; vector<pair<string, vector<string>>> cache; + HHOOK hook; + vector<HWND> boxes; GUI gui; };
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp