From c9991cca23ac3c96f381329a856eb57bebe01898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 20 Aug 2011 09:17:11 +0000 Subject: [PATCH] * 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 --- src/preferences/mail/AutoConfigView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/preferences/mail/AutoConfigView.cpp b/src/preferences/mail/AutoConfigView.cpp index 37a9d3599c..b4e57c3fba 100644 --- a/src/preferences/mail/AutoConfigView.cpp +++ b/src/preferences/mail/AutoConfigView.cpp @@ -7,6 +7,8 @@ #include "AutoConfigView.h" +#include + #include #include #include @@ -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); }