style changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27734 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-09-25 11:55:00 +00:00
parent bdee0a3f6d
commit 68fba17fe7
@@ -44,6 +44,7 @@ FileSelector::FileSelector(void)
m_save_panel = NULL; m_save_panel = NULL;
} }
FileSelector::~FileSelector() FileSelector::~FileSelector()
{ {
delete m_save_panel; delete m_save_panel;
@@ -51,17 +52,18 @@ FileSelector::~FileSelector()
} }
bool FileSelector::QuitRequested() bool
FileSelector::QuitRequested()
{ {
release_sem(m_exit_sem); release_sem(m_exit_sem);
return true; return BWindow::QuitRequested();
} }
void FileSelector::MessageReceived(BMessage * msg) void
FileSelector::MessageReceived(BMessage * msg)
{ {
switch (msg->what) switch (msg->what) {
{
case START_MSG: case START_MSG:
{ {
BMessenger messenger(this); BMessenger messenger(this);
@@ -76,14 +78,12 @@ void FileSelector::MessageReceived(BMessage * msg)
{ {
entry_ref dir; entry_ref dir;
if ( msg->FindRef("directory", &dir) == B_OK) if (msg->FindRef("directory", &dir) == B_OK) {
{ const char* name;
const char * name;
BDirectory bdir(&dir); BDirectory bdir(&dir);
if ( msg->FindString("name", &name) == B_OK) if (msg->FindString("name", &name) == B_OK) {
{ if (name != NULL)
if ( name != NULL )
m_result = m_entry.SetTo(&bdir, name); m_result = m_entry.SetTo(&bdir, name);
}; };
}; };
@@ -103,7 +103,8 @@ void FileSelector::MessageReceived(BMessage * msg)
} }
status_t FileSelector::Go(entry_ref * ref) status_t
FileSelector::Go(entry_ref* ref)
{ {
MoveTo(300,300); MoveTo(300,300);
Hide(); Hide();
@@ -114,7 +115,7 @@ status_t FileSelector::Go(entry_ref * ref)
// cache result to avoid memory access of deleted window object // cache result to avoid memory access of deleted window object
// after Quit(). // after Quit().
status_t result = m_result; status_t result = m_result;
if ( result == B_OK && ref) if (result == B_OK && ref)
result = m_entry.GetRef(ref); result = m_entry.GetRef(ref);
Lock(); Lock();
@@ -123,5 +124,3 @@ status_t FileSelector::Go(entry_ref * ref)
return result; return result;
} }