Replace process_refs() with the same from TrackerAddOnAppLaunch.h, and adapt to it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33015 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
70dc439139
commit
72a7ad1137
@ -1,5 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons tracker zipomatic ;
|
||||
|
||||
UsePrivateHeaders shared ;
|
||||
|
||||
Application ZipOMatic-Z :
|
||||
GenericThread.cpp
|
||||
ZipOMatic.cpp
|
||||
|
@ -7,27 +7,12 @@
|
||||
#include <Alert.h>
|
||||
#include <Roster.h>
|
||||
#include <Screen.h>
|
||||
#include <TrackerAddOn.h>
|
||||
#include <TrackerAddOnAppLaunch.h>
|
||||
|
||||
#include "ZipOMaticMisc.h"
|
||||
#include "ZipOMaticWindow.h"
|
||||
|
||||
|
||||
extern "C" void
|
||||
process_refs(entry_ref dirRef, BMessage* message, void*)
|
||||
{
|
||||
status_t status = B_OK;
|
||||
type_code refType = B_REF_TYPE;
|
||||
int32 refCount = 0;
|
||||
|
||||
status = message->GetInfo("refs", &refType, &refCount);
|
||||
if (status != B_OK || refCount < 1)
|
||||
be_roster->Launch(ZIPOMATIC_APP_SIG);
|
||||
else
|
||||
be_roster->Launch(ZIPOMATIC_APP_SIG, message);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
@ -65,6 +50,15 @@ ZipOMatic::~ZipOMatic()
|
||||
void
|
||||
ZipOMatic::RefsReceived(BMessage* message)
|
||||
{
|
||||
message->RemoveName("dir_ref");
|
||||
|
||||
entry_ref ref;
|
||||
if (message->FindRef("refs", &ref) != B_OK) {
|
||||
if (!IsLaunching())
|
||||
PostMessage(B_SILENT_RELAUNCH);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsLaunching())
|
||||
fGotRefs = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user