From: Václav Slavík Date: Mon, 18 Oct 2004 12:50:10 +0000 (+0000) Subject: be user friendly on Unix and expand the / node automatically X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/09a65e631a6294643ba3d7453e3f82ada0da2fbe 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 --- diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 7a5d5a8d36..791b3a97a0 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -551,8 +551,19 @@ bool wxGenericDirCtrl::Create(wxWindow *parent, ExpandDir(m_rootId); // automatically expand first level // Expand and select the default path - if (!m_defaultPath.IsEmpty()) + if (!m_defaultPath.empty()) + { 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); DoResize();