linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05206
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2818: Propose a default nick using the Win user account name
------------------------------------------------------------
revno: 2818
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2012-01-14 19:08:07 +0100
message:
Propose a default nick using the Win user account name
modified:
changelog.txt
win32/GeneralPage.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 'changelog.txt'
--- changelog.txt 2012-01-13 17:10:09 +0000
+++ changelog.txt 2012-01-14 18:08:07 +0000
@@ -7,6 +7,7 @@
* Improve file reading operations
* [L#678432] Context-sensitive help tooltips in the settings dialog (poy)
* [L#804993] Improve multiple monitor support (poy)
+* Propose a default nick using the Win user account name (poy)
-- 0.790 2011-12-29 --
* Fav users frame becomes users frame and shows all users
=== modified file 'win32/GeneralPage.cpp'
--- win32/GeneralPage.cpp 2012-01-13 20:55:20 +0000
+++ win32/GeneralPage.cpp 2012-01-14 18:08:07 +0000
@@ -79,6 +79,16 @@
nick->onUpdated([this] { handleNickTextChanged(); });
+ if(SETTING(NICK).empty()) {
+ // fill the Nick field with the Win user account name.
+ DWORD size = 0;
+ ::GetUserName(0, &size);
+ tstring str(size - 1, 0);
+ if(::GetUserName(&str[0], &size)) {
+ nick->setText(str);
+ }
+ }
+
int selected = 0, j = 0;
for(auto i = SettingsManager::connectionSpeeds.begin(); i != SettingsManager::connectionSpeeds.end(); ++i, ++j) {
connections->addValue(Text::toT(*i).c_str());