]> git.saurik.com Git - wxWidgets.git/commitdiff
a more easy to use version of wxGetHomeDir() added
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 9 Dec 1999 15:14:58 +0000 (15:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 9 Dec 1999 15:14:58 +0000 (15:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/function.tex
include/wx/utils.h
src/common/utilscmn.cpp

index 26367bbf94c5bcc8a8e69e863cf0637a0b2ea760..da99a835baa0a8369187fc163f7f6e1ab7cf8935 100644 (file)
@@ -1284,11 +1284,15 @@ Under X only, returns the current display name. See also \helpref{wxSetDisplayNa
 
 <wx/utils.h>
 
-\membersection{::wxGetHomeDir}
+\membersection{::wxGetHomeDir}\label{wxgethomedir}
 
-\func{wxString}{wxGetHomeDir}{\param{const wxString\& }{buf}}
+\func{wxString}{wxGetHomeDir}{\void}
 
-Fills the buffer with a string representing the user's home directory (Unix only).
+Return the (current) user's home directory.
+
+\wxheading{See also:}
+
+\helpref{wxGetUserHome}{wxgetuserhome}
 
 \wxheading{Include files}
 
@@ -1300,8 +1304,7 @@ Fills the buffer with a string representing the user's home directory (Unix only
 
 Copies the host name of the machine the program is running on into the
 buffer {\it buf}, of maximum size {\it bufSize}, returning TRUE if
-successful. Under Unix, this will return a machine name. Under Windows,
-this returns ``windows''.
+successful.
 
 \wxheading{Include files}
 
@@ -1434,6 +1437,18 @@ Under Windows, this returns ``user''.
 
 <wx/utils.h>
 
+\membersection{::wxGetUserHome}\label{wxgetuserhome}
+
+\func{const wxChar *}{wxGetUserHome}{\param{const wxString\& }{user = ""}}
+
+Returns the home directory for the given user. If the username is empty
+(default value), this function behaves like 
+\helpref{wxGetHomeDir}{wxgethomedir}.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
 \membersection{::wxGetUserName}
 
 \func{bool}{wxGetUserName}{\param{const wxString\& }{buf}, \param{int}{ bufSize}}
index a3c326248b8d2fa5d80f214f0d6cdef739e68d99..7893bd1700e603324514eba2c3da9288b03f1925 100644 (file)
@@ -212,6 +212,7 @@ WXDLLEXPORT bool wxGetUserName(wxChar *buf, int maxSize);
 WXDLLEXPORT wxString wxGetUserName();
 
 // Get current Home dir and copy to dest (returns pstr->c_str())
+WXDLLEXPORT wxString wxGetHomeDir();
 WXDLLEXPORT const wxChar* wxGetHomeDir(wxString *pstr);
 
 // Get the user's home dir (caller must copy --- volatile)
index bab380b7a80fd32ed5d02c5e358daf8630cd1ac2..9dd4d99b3e0abd75eb624a1c3e1caf7c31229d90 100644 (file)
@@ -1041,3 +1041,10 @@ wxString wxGetFullHostName()
     return buf;
 }
 
+wxString wxGetHomeDir()
+{
+    wxString home;
+    wxGetHomeDir(&home);
+
+    return home;
+}