Author: axeld Date: 2011-08-20 11:17:11 +0200 (Sat, 20 Aug 2011) New Revision: 42645 Changeset: https://dev.haiku-os.org/changeset/42645 Modified: haiku/trunk/src/preferences/mail/AutoConfigView.cpp Log: * Set the real name to the current user's real name by default. Modified: haiku/trunk/src/preferences/mail/AutoConfigView.cpp =================================================================== --- haiku/trunk/src/preferences/mail/AutoConfigView.cpp 2011-08-19 23:07:45 UTC (rev 42644) +++ haiku/trunk/src/preferences/mail/AutoConfigView.cpp 2011-08-20 09:17:11 UTC (rev 42645) @@ -7,6 +7,8 @@ #include "AutoConfigView.h" +#include <pwd.h> + #include <Catalog.h> #include <Directory.h> #include <Entry.h> @@ -85,6 +87,10 @@ B_TRANSLATE("Real name:"), "", NULL); AddChild(fNameView); fNameView->SetDivider(divider); + + struct passwd* passwd = getpwent(); + if (passwd != NULL) + fNameView->SetText(passwd->pw_gecos); }