From 0f85a3eb5b99a4d78f33a1c16a5998f3cd397da3 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 25 Sep 2008 12:00:03 +0000 Subject: [PATCH] renamed field variables to fit our guidelines. Also use sem_id instead of long git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27735 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../transports/print_to_file/FileSelector.cpp | 30 +++++++++---------- .../transports/print_to_file/FileSelector.h | 11 ++++--- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/add-ons/print/transports/print_to_file/FileSelector.cpp b/src/add-ons/print/transports/print_to_file/FileSelector.cpp index c9deccbf07..7f7157311a 100644 --- a/src/add-ons/print/transports/print_to_file/FileSelector.cpp +++ b/src/add-ons/print/transports/print_to_file/FileSelector.cpp @@ -39,23 +39,23 @@ FileSelector::FileSelector(void) : BWindow(BRect(0,0,320,160), "printtofile", B_TITLED_WINDOW, B_NOT_ZOOMABLE, B_CURRENT_WORKSPACE) { - m_exit_sem = create_sem(0, "FileSelector"); - m_result = B_ERROR; - m_save_panel = NULL; + fExitSem = create_sem(0, "FileSelector"); + fResult = B_ERROR; + fSavePanel = NULL; } FileSelector::~FileSelector() { - delete m_save_panel; - delete_sem(m_exit_sem); + delete fSavePanel; + delete_sem(fExitSem); } bool FileSelector::QuitRequested() { - release_sem(m_exit_sem); + release_sem(fExitSem); return BWindow::QuitRequested(); } @@ -67,11 +67,11 @@ FileSelector::MessageReceived(BMessage * msg) case START_MSG: { BMessenger messenger(this); - m_save_panel = new BFilePanel(B_SAVE_PANEL, + fSavePanel = new BFilePanel(B_SAVE_PANEL, &messenger, NULL, 0, false); - m_save_panel->Window()->SetWorkspaces(B_CURRENT_WORKSPACE); - m_save_panel->Show(); + fSavePanel->Window()->SetWorkspaces(B_CURRENT_WORKSPACE); + fSavePanel->Show(); break; } case B_SAVE_REQUESTED: @@ -84,16 +84,16 @@ FileSelector::MessageReceived(BMessage * msg) BDirectory bdir(&dir); if (msg->FindString("name", &name) == B_OK) { if (name != NULL) - m_result = m_entry.SetTo(&bdir, name); + fResult = fEntry.SetTo(&bdir, name); }; }; - release_sem(m_exit_sem); + release_sem(fExitSem); break; }; case B_CANCEL: - release_sem(m_exit_sem); + release_sem(fExitSem); break; default: @@ -110,13 +110,13 @@ FileSelector::Go(entry_ref* ref) Hide(); Show(); PostMessage(START_MSG); - acquire_sem(m_exit_sem); + acquire_sem(fExitSem); // cache result to avoid memory access of deleted window object // after Quit(). - status_t result = m_result; + status_t result = fResult; if (result == B_OK && ref) - result = m_entry.GetRef(ref); + result = fEntry.GetRef(ref); Lock(); Quit(); diff --git a/src/add-ons/print/transports/print_to_file/FileSelector.h b/src/add-ons/print/transports/print_to_file/FileSelector.h index 79b16fc197..07b81fe85a 100644 --- a/src/add-ons/print/transports/print_to_file/FileSelector.h +++ b/src/add-ons/print/transports/print_to_file/FileSelector.h @@ -35,8 +35,7 @@ #include #include -class FileSelector : public BWindow -{ +class FileSelector : public BWindow { public: // Constructors, destructors, operators... @@ -59,10 +58,10 @@ class FileSelector : public BWindow // From here, it's none of your business! ;-) private: - BEntry m_entry; - volatile status_t m_result; - long m_exit_sem; - BFilePanel * m_save_panel; + BEntry fEntry; + volatile status_t fResult; + sem_id fExitSem; + BFilePanel * fSavePanel; }; #endif // FILESELECTOR_H