* cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27893 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich
2008-10-06 20:20:09 +00:00
parent 23f4249171
commit f3547bb3d3
+9 -9
View File
@@ -53,7 +53,7 @@ MainApp::MainApp()
{ {
// XXX: HACK HACK HACK // XXX: HACK HACK HACK
// this works around a locking issue where gMainApp isn't set yet, // this works around a locking issue where gMainApp isn't set yet,
// while NewWindow() calls Show() which in the window thread calls // while NewWindow() calls Show() which in the window thread calls
// Controller::PlayerActivated() which calls gMainApp->PlayerCount() // Controller::PlayerActivated() which calls gMainApp->PlayerCount()
gMainApp = this; gMainApp = this;
fFirstWindow = NewWindow(); fFirstWindow = NewWindow();
@@ -102,7 +102,7 @@ MainApp::PlayerCount() const
void void
MainApp::ReadyToRun() MainApp::ReadyToRun()
{ {
// setup the settings window now, we need to have it // setup the settings window now, we need to have it
fSettingsWindow = new SettingsWindow(BRect(150, 150, 450, 520)); fSettingsWindow = new SettingsWindow(BRect(150, 150, 450, 520));
fSettingsWindow->Hide(); fSettingsWindow->Hide();
fSettingsWindow->Show(); fSettingsWindow->Show();
@@ -122,7 +122,7 @@ MainApp::ReadyToRun()
void void
MainApp::RefsReceived(BMessage *msg) MainApp::RefsReceived(BMessage *msg)
{ {
// The user dropped a file (or files) on this app's icon, // The user dropped a file (or files) on this app's icon,
// or double clicked a file that's handled by this app. // or double clicked a file that's handled by this app.
// Command line arguments are also redirected to here by // Command line arguments are also redirected to here by
// ArgvReceived() but without MIME type check. // ArgvReceived() but without MIME type check.
@@ -131,7 +131,7 @@ MainApp::RefsReceived(BMessage *msg)
// If IsLaunching() is true, we use fFirstWindow as first // If IsLaunching() is true, we use fFirstWindow as first
// window. // window.
printf("MainApp::RefsReceived\n"); printf("MainApp::RefsReceived\n");
entry_ref ref; entry_ref ref;
for (int i = 0; B_OK == msg->FindRef("refs", i, &ref); i++) { for (int i = 0; B_OK == msg->FindRef("refs", i, &ref); i++) {
BWindow *win; BWindow *win;
@@ -143,7 +143,7 @@ MainApp::RefsReceived(BMessage *msg)
} }
void void
MainApp::ArgvReceived(int32 argc, char **argv) MainApp::ArgvReceived(int32 argc, char **argv)
{ {
char cwd[B_PATH_NAME_LENGTH]; char cwd[B_PATH_NAME_LENGTH];
@@ -161,7 +161,7 @@ MainApp::ArgvReceived(int32 argc, char **argv)
BEntry entry(path.Path(), true); BEntry entry(path.Path(), true);
if (!entry.Exists() || !entry.IsFile()) if (!entry.Exists() || !entry.IsFile())
continue; continue;
entry_ref ref; entry_ref ref;
if (B_OK == entry.GetRef(&ref)) if (B_OK == entry.GetRef(&ref))
m.AddRef("refs", &ref); m.AddRef("refs", &ref);
@@ -174,7 +174,7 @@ MainApp::ArgvReceived(int32 argc, char **argv)
} }
void void
MainApp::MessageReceived(BMessage* message) MainApp::MessageReceived(BMessage* message)
{ {
switch (message->what) { switch (message->what) {
@@ -195,7 +195,7 @@ MainApp::MessageReceived(BMessage* message)
bool isAddonServer = strcmp(mimeSig, kMediaServerAddOnSig) == 0; bool isAddonServer = strcmp(mimeSig, kMediaServerAddOnSig) == 0;
if (!isMediaServer && !isAddonServer) if (!isMediaServer && !isAddonServer)
break; break;
bool running = (message->what == B_SOME_APP_LAUNCHED); bool running = (message->what == B_SOME_APP_LAUNCHED);
if (isMediaServer) if (isMediaServer)
fMediaServerRunning = running; fMediaServerRunning = running;
@@ -275,7 +275,7 @@ MainApp::_ShowSettingsWindow()
// #pragma mark - // #pragma mark -
int int
main() main()
{ {
EventQueue::CreateDefault(); EventQueue::CreateDefault();