From 09a65e631a6294643ba3d7453e3f82ada0da2fbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 18 Oct 2004 12:50:10 +0000 Subject: [PATCH] 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 --- src/generic/dirctrlg.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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(); -- 2.47.2