* Set the real name to the current user's real name by default.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42645 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2011-08-20 09:17:11 +00:00
parent d3e8b64208
commit c9991cca23

View File

@ -7,6 +7,8 @@
#include "AutoConfigView.h"
#include <pwd.h>
#include <Catalog.h>
#include <Directory.h>
#include <Entry.h>
@ -85,6 +87,10 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
B_TRANSLATE("Real name:"), "", NULL);
AddChild(fNameView);
fNameView->SetDivider(divider);
struct passwd* passwd = getpwent();
if (passwd != NULL)
fNameView->SetText(passwd->pw_gecos);
}