|
From: <arn...@us...> - 2007-11-26 22:24:37
|
Revision: 913
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=913&view=rev
Author: arnetheduck
Date: 2007-11-26 14:24:35 -0800 (Mon, 26 Nov 2007)
Log Message:
-----------
patch
Modified Paths:
--------------
dcplusplus/trunk/ADC.txt
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/MDIChildFrame.h
dcplusplus/trunk/win32/PrivateFrame.cpp
Modified: dcplusplus/trunk/ADC.txt
===================================================================
--- dcplusplus/trunk/ADC.txt 2007-11-25 18:44:05 UTC (rev 912)
+++ dcplusplus/trunk/ADC.txt 2007-11-26 22:24:35 UTC (rev 913)
@@ -479,7 +479,7 @@
TO | string | Token, as received in RCM/CTM, when establishing a C-C connection.
CT | integer | Client (user) type, 1=bot, 2=registered user, 4=operator, 8=hub owner, 16=hub (used when the hub sends an INF about itself). Multiple types are specified by adding the numbers together.
AW | integer | 1=Away, 2=Extended away, not interested in hub chat (hubs may skip sending broadcast type MSG commands to clients with this flag)
-SU | string | Comma-separated list of feature FOURCC's. This notifies other clients of extended capabilities of the connecting client. Use with discretion.
+SU | string | Comma-separated list of feature FOURCC's. This notifies other clients of extended capabilities of the connecting client.
___
Hubs may mandate or discard any set of fields, but obviously the more the
@@ -686,8 +686,8 @@
``_
Client | Hub
___
-HSUP ADBASE <other-features> |
- | ISUP ADBASE <other-features>
+HSUP ADBASE ADTIGR ... |
+ | ISUP ADBASE ADTIGR ...
| ISID <client-sid>
| IINF HU1 HI1 ...
BINF <my-sid> ID... PD... |
@@ -704,8 +704,8 @@
``_
Client | Server
___
-CSUP ADBASE <other-features> |
- | CSUP ADBASE <other-features>
+CSUP ADBASE ADTIGR ... |
+ | CSUP ADBASE ADTIGR ...
| CINF IDxxx
CINF IDxxx TO<token> |
| CGET ...
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2007-11-25 18:44:05 UTC (rev 912)
+++ dcplusplus/trunk/changelog.txt 2007-11-26 22:24:35 UTC (rev 913)
@@ -13,6 +13,7 @@
* Readded list view double buffering (thanks poy)
* Fixed some msvc compile issues (thanks james ross)
* Fixed key handling in file listings (poy)
+* Message always focused first in chats (poy)
-- 0.703 2007-11-08 --
* Fixed invalid strings (thanks james ross)
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2007-11-25 18:44:05 UTC (rev 912)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2007-11-26 22:24:35 UTC (rev 913)
@@ -88,7 +88,7 @@
WidgetTextBox::Seed cs = WinUtil::Seeds::textBox;
cs.style = WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE;
message = createTextBox(cs);
- addWidget(message);
+ addWidget(message, true);
message->onKeyDown(std::tr1::bind(&HubFrame::handleMessageKeyDown, this, _1));
message->onChar(std::tr1::bind(&HubFrame::handleMessageChar, this, _1));
}
Modified: dcplusplus/trunk/win32/MDIChildFrame.h
===================================================================
--- dcplusplus/trunk/win32/MDIChildFrame.h 2007-11-25 18:44:05 UTC (rev 912)
+++ dcplusplus/trunk/win32/MDIChildFrame.h 2007-11-26 22:24:35 UTC (rev 913)
@@ -39,10 +39,11 @@
typedef WidgetFactory< SmartWin::WidgetChildWindow > BaseType;
protected:
- MDIChildFrame(SmartWin::WidgetTabView* tabView, const tstring& title, SmartWin::IconPtr icon = SmartWin::IconPtr(), bool activate = true) :
- BaseType(tabView->getTab()),
- lastFocus(NULL),
- reallyClose(false)
+ MDIChildFrame(SmartWin::WidgetTabView* tabView, const tstring& title, SmartWin::IconPtr icon = SmartWin::IconPtr(), bool activate = true) :
+ BaseType(tabView->getTab()),
+ lastFocus(NULL),
+ alwaysSameFocus(false),
+ reallyClose(false)
{
typename ThisType::Seed cs;
cs.style |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
@@ -88,12 +89,14 @@
void postClosing() { }
template<typename W>
- void addWidget(W* widget) {
+ void addWidget(W* widget, bool alwaysFocus = false) {
addColor(widget);
- if(lastFocus == NULL) {
+ if(alwaysFocus || (lastFocus == NULL)) {
lastFocus = widget->handle();
::SetFocus(lastFocus);
}
+ if(alwaysFocus)
+ alwaysSameFocus = true;
}
void setDirty(SettingsManager::IntSetting setting) {
@@ -115,7 +118,9 @@
}
private:
- HWND lastFocus;
+ HWND lastFocus; // last focused widget
+ bool alwaysSameFocus; // always focus the same widget
+
bool reallyClose;
void addColor(SmartWin::WidgetComboBox* widget) {
@@ -145,7 +150,7 @@
if(lastFocus) {
::SetFocus(lastFocus);
}
- } else {
+ } else if(!alwaysSameFocus) {
HWND focus = ::GetFocus();
if(focus != NULL && ::IsChild(static_cast<T*>(this)->handle(), focus))
lastFocus = focus;
Modified: dcplusplus/trunk/win32/PrivateFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/PrivateFrame.cpp 2007-11-25 18:44:05 UTC (rev 912)
+++ dcplusplus/trunk/win32/PrivateFrame.cpp 2007-11-26 22:24:35 UTC (rev 913)
@@ -102,7 +102,7 @@
WidgetTextBox::Seed cs = WinUtil::Seeds::textBox;
cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE;
message = createTextBox(cs);
- addWidget(message);
+ addWidget(message, true);
message->onKeyDown(std::tr1::bind(&PrivateFrame::handleKeyDown, this, _1));
message->onChar(std::tr1::bind(&PrivateFrame::handleChar, this, _1));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|