From 9a9f64e114d09cbeb07f8dd1d76fdb31dd1f7988 Mon Sep 17 00:00:00 2001 From: shatty Date: Fri, 2 Apr 2004 02:08:34 +0000 Subject: [PATCH] use BFilePanel::SetSaveText which selects the filename git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7140 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/stylededit/Jamfile | 7 ------- src/apps/stylededit/StyledEditWindow.cpp | 10 +--------- src/apps/stylededit/StyledEditWindow.h | 1 - 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/apps/stylededit/Jamfile b/src/apps/stylededit/Jamfile index 5393ab3201..510e0296ab 100644 --- a/src/apps/stylededit/Jamfile +++ b/src/apps/stylededit/Jamfile @@ -13,18 +13,11 @@ App StyledEdit : StyledEditApp.cpp StyledEditView.cpp StyledEditWindow.cpp - # OBOS textencodings - CharacterSet.cpp - CharacterSetRoster.cpp - character_sets.cpp # OBOS String String.cpp string_helper.cpp ; -SEARCH on CharacterSet.cpp += [ FDirName $(OBOS_TOP) src kits textencoding ] ; -SEARCH on CharacterSetRoster.cpp += [ FDirName $(OBOS_TOP) src kits textencoding ] ; -SEARCH on character_sets.cpp += [ FDirName $(OBOS_TOP) src kits textencoding ] ; SEARCH on String.cpp += [ FDirName $(OBOS_TOP) src kits support ] ; SEARCH on string_helper.cpp += [ FDirName $(OBOS_TOP) src kits support ] ; diff --git a/src/apps/stylededit/StyledEditWindow.cpp b/src/apps/stylededit/StyledEditWindow.cpp index d1abbe1a07..abe92748b1 100644 --- a/src/apps/stylededit/StyledEditWindow.cpp +++ b/src/apps/stylededit/StyledEditWindow.cpp @@ -902,8 +902,6 @@ StyledEditWindow::SaveAs(BMessage *message) } fSavePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), directory, B_FILE_NODE, false); - fSavePanelTextView = - dynamic_cast(fSavePanel->Window()->FindView("text view")); BMenuBar * menuBar = dynamic_cast(fSavePanel->Window()->FindView("MenuBar")); @@ -930,13 +928,7 @@ StyledEditWindow::SaveAs(BMessage *message) } } - // its own scope allows the lock to be released before Show() - { - BAutolock lock(fSavePanel->Window()); - if (lock.IsLocked()) { - fSavePanelTextView->SetText(Title()); - } - } + fSavePanel->SetSaveText(Title()); if (message != 0) { fSavePanel->SetMessage(message); } diff --git a/src/apps/stylededit/StyledEditWindow.h b/src/apps/stylededit/StyledEditWindow.h index 044ed3a251..0baa0ab740 100644 --- a/src/apps/stylededit/StyledEditWindow.h +++ b/src/apps/stylededit/StyledEditWindow.h @@ -98,7 +98,6 @@ private: BScrollView *fScrollView; BFilePanel *fSavePanel; - BTextControl *fSavePanelTextView; BMenu *fSavePanelEncodingMenu; };