diff options
| author | Alex Wilson <yourpalal2@gmail.com> | 2012-07-16 14:52:56 +1200 |
|---|---|---|
| committer | Alex Wilson <yourpalal2@gmail.com> | 2012-07-16 14:59:38 +1200 |
| commit | 3bbf781c1a27f5c0e8d4f3c632908174ed1f6ede (patch) | |
| tree | 34710ebf16620c470772ff3ce4f4d538a5f10938 | |
| parent | 0a96da93d180a27d0d4ae58915dd516b17f1f6ba (diff) | |
There is no 'name' entry in the message from a B_OPEN_PANEL BFilePanel.
Also fix a little memory leak along the way.
| -rw-r--r-- | src/apps/poorman/PoorManPreferencesWindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/apps/poorman/PoorManPreferencesWindow.cpp b/src/apps/poorman/PoorManPreferencesWindow.cpp index 5535f338b2..0095c82deb 100644 --- a/src/apps/poorman/PoorManPreferencesWindow.cpp +++ b/src/apps/poorman/PoorManPreferencesWindow.cpp @@ -142,12 +142,15 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message) Quit(); break; case MSG_PREF_SITE_BTN_SELECT: + { // Select the Web Directory, root directory to look in. fWebDirFilePanel->SetTarget(this); - fWebDirFilePanel->SetMessage(new BMessage(MSG_FILE_PANEL_SELECT_WEB_DIR)); + BMessage webDirSelectedMsg(MSG_FILE_PANEL_SELECT_WEB_DIR); + fWebDirFilePanel->SetMessage(&webDirSelectedMsg); if (!fWebDirFilePanel->IsShowing()) fWebDirFilePanel->Show(); break; + } case MSG_FILE_PANEL_SELECT_WEB_DIR: // handle the open BMessage from the Select Web Directory File Panel PRINT(("Select Web Directory:\n")); @@ -177,13 +180,10 @@ void PoorManPreferencesWindow::SelectWebDir(BMessage* message) { entry_ref ref; - const char* name; BPath path; BEntry entry; - if (message->FindRef("refs", &ref) != B_OK - || message->FindString("name", &name) != B_OK - || entry.SetTo(&ref) != B_OK) { + if (message->FindRef("refs", &ref) != B_OK || entry.SetTo(&ref) != B_OK) { return; } entry.GetPath(&path); |
