------------------------------------------------------------ revno: 3173 committer: poy <p...@123gen.com> branch nick: trunk timestamp: Sat 2013-01-19 15:52:37 +0100 message: show some messages with a balloon popup modified: dwt/include/dwt/widgets/TextBox.h dwt/src/widgets/TextBox.cpp win32/HubFrame.cpp win32/PrivateFrame.cpp
-- lp:dcplusplus https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk Your team Dcplusplus-team is subscribed to branch lp:dcplusplus. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/include/dwt/widgets/TextBox.h' --- dwt/include/dwt/widgets/TextBox.h 2013-01-18 21:28:38 +0000 +++ dwt/include/dwt/widgets/TextBox.h 2013-01-19 14:52:37 +0000 @@ -286,6 +286,10 @@ tstring textUnderCursor(const ScreenCoordinate& p, bool includeSpaces = false); + /** Show a balloon popup; see the EM_SHOWBALLOONTIP doc for more info. + @param icon see the EDITBALLOONTIP doc for possible values. */ + void showPopup(const tstring& title, const tstring& text, int icon); + /// Actually creates the TextBox /** You should call WidgetFactory::createTextBox if you instantiate class * directly. <br> === modified file 'dwt/src/widgets/TextBox.cpp' --- dwt/src/widgets/TextBox.cpp 2013-01-19 14:27:28 +0000 +++ dwt/src/widgets/TextBox.cpp 2013-01-19 14:52:37 +0000 @@ -243,6 +243,11 @@ return tmp.substr(start, end-start); } +void TextBox::showPopup(const tstring& title, const tstring& text, int icon) { + EDITBALLOONTIP tip { sizeof(EDITBALLOONTIP), title.c_str(), text.c_str(), icon }; + Edit_ShowBalloonTip(handle(), &tip); +} + tstring TextBox::getSelection() const { DWORD start, end; === modified file 'win32/HubFrame.cpp' --- win32/HubFrame.cpp 2013-01-18 21:28:38 +0000 +++ win32/HubFrame.cpp 2013-01-19 14:52:37 +0000 @@ -557,7 +557,7 @@ if(client->isConnected()) { client->hubMessage(Text::fromT(s)); } else { - addStatus(T_("The message cannot be delivered because the hub is offline")); + message->showPopup(T_("Hub offline"), T_("The message cannot be delivered because the hub is offline."), TTI_ERROR); resetText = false; } } === modified file 'win32/PrivateFrame.cpp' --- win32/PrivateFrame.cpp 2013-01-18 21:28:38 +0000 +++ win32/PrivateFrame.cpp 2013-01-19 14:52:37 +0000 @@ -370,7 +370,7 @@ if(online) { sendMessage(s); } else { - addStatus(T_("The message cannot be delivered because the user is offline")); + message->showPopup(T_("User offline"), T_("The message cannot be delivered because the user is offline."), TTI_ERROR); resetText = false; } }
_______________________________________________ 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