From ad4fdf8d15303dd925c4c42b4cdb549719547841 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 6 Oct 2002 22:48:39 +0000 Subject: [PATCH] * Don't uninitialized be_app_messenger in the destructor. * Fixed missing variable initialization in GetSupportedSuites(). * InitData(): Don't post B_ARGV_RECEIVED to ourselfs when pre-registered. * InitData(): Added create_app_meta_mime(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1411 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/Application.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index 2916e2a451..95f7af79d3 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -217,7 +217,8 @@ BApplication::~BApplication() be_roster->RemoveApp(Team()); // uninitialize be_app and be_app_messenger be_app = NULL; - be_app_messenger = BMessenger(); +// R5 doesn't uninitialize be_app_messenger. +// be_app_messenger = BMessenger(); } //------------------------------------------------------------------------------ BApplication::BApplication(BMessage* data) @@ -518,7 +519,7 @@ void BApplication::SetPulseRate(bigtime_t rate) //------------------------------------------------------------------------------ status_t BApplication::GetSupportedSuites(BMessage* data) { - status_t err; + status_t err = B_OK; if (!data) { err = B_BAD_VALUE; @@ -654,15 +655,6 @@ void BApplication::InitData(const char* signature, status_t* error) fMsgPort = appInfo.port; } else appInfo.port = fMsgPort; - // Create a B_ARGV_RECEIVED message and send it to ourselves. - // Do that even, if we are B_ARGV_ONLY. - // TODO: When BLooper::AddMessage() is done, use that instead of - // PostMessage(). - if (__libc_argc > 1) { - BMessage argvMessage(B_ARGV_RECEIVED); - do_argv(&argvMessage); - PostMessage(&argvMessage, this); - } // complete the registration fInitError = be_roster->CompleteRegistration(team, thread, appInfo.port); @@ -720,7 +712,12 @@ void BApplication::InitData(const char* signature, status_t* error) // set the BHandler's name if (fInitError == B_OK) SetName(ref.name); - // TODO: create_app_meta_mime() + // create meta MIME + if (fInitError == B_OK) { + BPath path; + if (path.SetTo(&ref) == B_OK) + create_app_meta_mime(path.Path(), false, true, false); + } // Return the error or exit, if there was an error and no error variable // has been supplied. if (error)