From 6c4f44206374b2cd1611a2243a19dbcbd6f9a24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 18 Mar 2004 08:24:46 +0000 Subject: [PATCH] Changes the destination folder when "same folder" is selected even when there is one already, thanks to MYOB Enable expand buttons only when the destination folder is valid Don't provide a destination folder for listing git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7021 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/expander/ExpanderWindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apps/expander/ExpanderWindow.cpp b/src/apps/expander/ExpanderWindow.cpp index af7cfb565b..45785544b7 100644 --- a/src/apps/expander/ExpanderWindow.cpp +++ b/src/apps/expander/ExpanderWindow.cpp @@ -399,7 +399,7 @@ ExpanderWindow::RefsReceived(BMessage *msg) fSourceChanged = true; fSourceRef = ref; fSourceText->SetText(path.Path()); - if (destination_folder==0x63 && strcmp(fDestText->Text(), "")==0) { + if (destination_folder==0x63) { BPath parent; path.GetParent(&parent); fDestText->SetText(parent.Path()); @@ -410,9 +410,14 @@ ExpanderWindow::RefsReceived(BMessage *msg) BPath dPath(&dEntry); fDestText->SetText(dPath.Path()); } + + BEntry dEntry(&fDestRef, true); + if (dEntry.Exists()) { + fExpandButton->SetEnabled(true); + fExpandItem->SetEnabled(true); + } + fShowContents->SetEnabled(true); - fExpandButton->SetEnabled(true); - fExpandItem->SetEnabled(true); fShowItem->SetEnabled(true); bool fromApp; @@ -516,7 +521,6 @@ ExpanderWindow::StartListing() } message.AddString("cmd", rule->ListingCmd()); message.AddRef("srcRef", &fSourceRef); - message.AddRef("destRef", &fDestRef); fShowContents->SetEnabled(true); fSourceItem->SetEnabled(false);