diff --git a/src/apps/mediaplayer/MainApp.cpp b/src/apps/mediaplayer/MainApp.cpp index fb5c5ff3db..7ee83fb059 100644 --- a/src/apps/mediaplayer/MainApp.cpp +++ b/src/apps/mediaplayer/MainApp.cpp @@ -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; } diff --git a/src/apps/mediaplayer/MainApp.h b/src/apps/mediaplayer/MainApp.h index 23ca380e0f..0bc36c63cd 100644 --- a/src/apps/mediaplayer/MainApp.h +++ b/src/apps/mediaplayer/MainApp.h @@ -23,31 +23,28 @@ #include #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