* 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:
@@ -30,8 +30,8 @@ MainApp *gMainApp;
|
|||||||
|
|
||||||
MainApp::MainApp()
|
MainApp::MainApp()
|
||||||
: BApplication("application/x-vnd.Haiku-MediaPlayer"),
|
: BApplication("application/x-vnd.Haiku-MediaPlayer"),
|
||||||
fFirstWindow(NewWindow()),
|
fPlayerCount(0),
|
||||||
fPlayerCount(1)
|
fFirstWindow(NewWindow())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,17 +129,11 @@ MainApp::AboutRequested()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
MainApp::QuitRequested()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
gMainApp = new MainApp;
|
gMainApp = new MainApp;
|
||||||
gMainApp->Run();
|
gMainApp->Run();
|
||||||
|
delete gMainApp;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,31 +23,28 @@
|
|||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include "MainWin.h"
|
#include "MainWin.h"
|
||||||
|
|
||||||
enum
|
enum {
|
||||||
{
|
|
||||||
M_PLAYER_QUIT = 'plqt',
|
M_PLAYER_QUIT = 'plqt',
|
||||||
};
|
};
|
||||||
|
|
||||||
class MainApp : public BApplication
|
class MainApp : public BApplication {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
MainApp();
|
MainApp();
|
||||||
~MainApp();
|
virtual ~MainApp();
|
||||||
|
|
||||||
BWindow * NewWindow();
|
BWindow* NewWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RefsReceived(BMessage *msg);
|
virtual void RefsReceived(BMessage* message);
|
||||||
void ArgvReceived(int32 argc, char **argv);
|
virtual void ArgvReceived(int32 argc, char** argv);
|
||||||
void MessageReceived(BMessage *msg);
|
virtual void MessageReceived(BMessage* message);
|
||||||
void AboutRequested();
|
virtual void AboutRequested();
|
||||||
bool QuitRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BWindow * fFirstWindow;
|
int32 fPlayerCount;
|
||||||
int32 fPlayerCount;
|
BWindow* fFirstWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern MainApp *gMainApp;
|
extern MainApp* gMainApp;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user