set the default save as directory appropriately

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2044 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty
2002-11-20 23:43:33 +00:00
parent e2344ee25b
commit 6cd1da58ba
+9 -1
View File
@@ -660,7 +660,15 @@ status_t
StyledEditWindow::SaveAs()
{
if (fSavePanel == 0) {
fSavePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), NULL, B_FILE_NODE, false);
entry_ref * directory = 0;
if (fSaveMessage != 0) {
entry_ref dirref;
if (fSaveMessage->FindRef("directory", &dirref)) {
directory = new entry_ref(dirref);
}
}
fSavePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), directory, B_FILE_NODE, false);
fSavePanelTextView =
dynamic_cast<BTextControl*>(fSavePanel->Window()->FindView("text view"));
BMenuBar * menuBar =