linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #06835
[Branch ~dcplusplus-team/dcpp-plugin-sdk-cpp/ChatPlugin] Rev 21: text-box scrolling
------------------------------------------------------------
revno: 21
committer: poy <poy@xxxxxxxxxx>
branch nick: ChatPlugin
timestamp: Sun 2013-05-05 15:48:21 +0200
message:
text-box scrolling
modified:
dwt/src/Dispatcher.cpp
src/RuleDlg.cpp
--
lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/ChatPlugin
https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/ChatPlugin
Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/ChatPlugin.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/ChatPlugin/+edit-subscription
=== modified file 'dwt/src/Dispatcher.cpp'
--- dwt/src/Dispatcher.cpp 2013-04-27 14:28:51 +0000
+++ dwt/src/Dispatcher.cpp 2013-05-05 13:48:21 +0000
@@ -37,6 +37,12 @@
#include <algorithm>
#include <sstream>
+#ifdef DWT_SHARED
+#include <boost/uuid/uuid.hpp>
+#include <boost/uuid/random_generator.hpp>
+#include <boost/uuid/uuid_io.hpp>
+#endif
+
namespace dwt {
LRESULT CALLBACK WindowProc::initProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
@@ -222,8 +228,12 @@
#ifdef DWT_SHARED
/* in a shared library, classes registered by the lib can't clash with those regged by the host
- or by other dynamically loaded libs. append a (hopefully unique) string to that end... */
- stream << &Application::instance();
+ or by other dynamically loaded libs. append a unique string to that end. */
+ static boost::uuids::uuid uuid;
+ if(uuid.is_nil()) {
+ uuid = boost::uuids::random_generator()();
+ }
+ stream << uuid;
#endif
classNames.push_back(stream.str());
=== modified file 'src/RuleDlg.cpp'
--- src/RuleDlg.cpp 2013-04-28 21:14:38 +0000
+++ src/RuleDlg.cpp 2013-05-05 13:48:21 +0000
@@ -72,7 +72,9 @@
cur->column(0).mode = GridInfo::FILL;
cur->setSpacing(grid->getSpacing());
- auto box = cur->addChild(TextBox::Seed(Util::toT(rule.pattern)));
+ TextBox::Seed ts(Util::toT(rule.pattern));
+ ts.style |= ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN;
+ auto box = cur->addChild(ts);
box->onUpdated([this, box] { rule.pattern = Util::fromT(box->getText()); });
ComboBox::Seed cs { };
@@ -176,7 +178,9 @@
}
{
- auto box = grid->addChild(GroupBox::Seed(_T("Replacement text")))->addChild(TextBox::Seed(Util::toT(rule.replacement)));
+ TextBox::Seed ts(Util::toT(rule.replacement));
+ ts.style |= ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN;
+ auto box = grid->addChild(GroupBox::Seed(_T("Replacement text")))->addChild(ts);
box->onUpdated([this, box] { rule.replacement = Util::fromT(box->getText()); });
}
@@ -185,7 +189,9 @@
cur->column(0).mode = GridInfo::FILL;
cur->setSpacing(grid->getSpacing());
- auto box = cur->addChild(TextBox::Seed(Util::toT(rule.sound)));
+ TextBox::Seed ts(Util::toT(rule.sound));
+ ts.style |= ES_AUTOHSCROLL;
+ auto box = cur->addChild(ts);
box->onUpdated([this, box] { rule.sound = Util::fromT(box->getText()); });
cur->addChild(Button::Seed(_T("Browse")))->onClicked([this, box] {
@@ -197,7 +203,9 @@
}
{
- auto box = grid->addChild(GroupBox::Seed(_T("Notification message")))->addChild(TextBox::Seed(Util::toT(rule.notification)));
+ TextBox::Seed ts(Util::toT(rule.notification));
+ ts.style |= ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN;
+ auto box = grid->addChild(GroupBox::Seed(_T("Notification message")))->addChild(ts);
box->onUpdated([this, box] { rule.notification = Util::fromT(box->getText()); });
}