* remove QuitRequested() implementation again, because the bug that MediaPlayer

didn't quit was really in BApplication (the fix there also fixes other apps
  not quitting, like Icon-O-Matic and probably others)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21502 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2007-06-24 11:45:50 +00:00
parent 82d0e2c2b5
commit 0f5e6b41e7
2 changed files with 15 additions and 24 deletions

View File

@ -30,8 +30,8 @@ MainApp *gMainApp;
MainApp::MainApp()
: BApplication("application/x-vnd.Haiku-MediaPlayer"),
fFirstWindow(NewWindow()),
fPlayerCount(1)
fPlayerCount(0),
fFirstWindow(NewWindow())
{
}
@ -129,17 +129,11 @@ MainApp::AboutRequested()
}
bool
MainApp::QuitRequested()
{
return true;
}
int
main()
{
gMainApp = new MainApp;
gMainApp->Run();
delete gMainApp;
return 0;
}

View File

@ -23,31 +23,28 @@
#include <Application.h>
#include "MainWin.h"
enum
{
enum {
M_PLAYER_QUIT = 'plqt',
};
class MainApp : public BApplication
{
class MainApp : public BApplication {
public:
MainApp();
~MainApp();
MainApp();
virtual ~MainApp();
BWindow * NewWindow();
BWindow* NewWindow();
private:
void RefsReceived(BMessage *msg);
void ArgvReceived(int32 argc, char **argv);
void MessageReceived(BMessage *msg);
void AboutRequested();
bool QuitRequested();
virtual void RefsReceived(BMessage* message);
virtual void ArgvReceived(int32 argc, char** argv);
virtual void MessageReceived(BMessage* message);
virtual void AboutRequested();
private:
BWindow * fFirstWindow;
int32 fPlayerCount;
int32 fPlayerCount;
BWindow* fFirstWindow;
};
extern MainApp *gMainApp;
extern MainApp* gMainApp;
#endif