be user friendly on Unix and expand the / node automatically

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-10-18 12:50:10 +00:00
parent b2b4469be1
commit 09a65e631a

View File

@@ -551,8 +551,19 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
ExpandDir(m_rootId); // automatically expand first level ExpandDir(m_rootId); // automatically expand first level
// Expand and select the default path // Expand and select the default path
if (!m_defaultPath.IsEmpty()) if (!m_defaultPath.empty())
{
ExpandPath(m_defaultPath); ExpandPath(m_defaultPath);
}
#ifdef __UNIX__
else
{
// On Unix, there's only one node under the (hidden) root node. It
// represents the / path, so the user would always have to expand it;
// let's do it ourselves
ExpandPath(wxT("/"));
}
#endif
SetBestSize(size); SetBestSize(size);
DoResize(); DoResize();