* 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:
parent
d3e8b64208
commit
c9991cca23
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
#include "AutoConfigView.h"
|
#include "AutoConfigView.h"
|
||||||
|
|
||||||
|
#include <pwd.h>
|
||||||
|
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
@ -85,6 +87,10 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
B_TRANSLATE("Real name:"), "", NULL);
|
B_TRANSLATE("Real name:"), "", NULL);
|
||||||
AddChild(fNameView);
|
AddChild(fNameView);
|
||||||
fNameView->SetDivider(divider);
|
fNameView->SetDivider(divider);
|
||||||
|
|
||||||
|
struct passwd* passwd = getpwent();
|
||||||
|
if (passwd != NULL)
|
||||||
|
fNameView->SetText(passwd->pw_gecos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user