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:
@@ -1,5 +1,7 @@
|
|||||||
SubDir HAIKU_TOP src add-ons tracker zipomatic ;
|
SubDir HAIKU_TOP src add-ons tracker zipomatic ;
|
||||||
|
|
||||||
|
UsePrivateHeaders shared ;
|
||||||
|
|
||||||
Application ZipOMatic-Z :
|
Application ZipOMatic-Z :
|
||||||
GenericThread.cpp
|
GenericThread.cpp
|
||||||
ZipOMatic.cpp
|
ZipOMatic.cpp
|
||||||
|
|||||||
@@ -7,27 +7,12 @@
|
|||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <TrackerAddOn.h>
|
#include <TrackerAddOnAppLaunch.h>
|
||||||
|
|
||||||
#include "ZipOMaticMisc.h"
|
#include "ZipOMaticMisc.h"
|
||||||
#include "ZipOMaticWindow.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
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
@@ -65,6 +50,15 @@ ZipOMatic::~ZipOMatic()
|
|||||||
void
|
void
|
||||||
ZipOMatic::RefsReceived(BMessage* message)
|
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())
|
if (IsLaunching())
|
||||||
fGotRefs = true;
|
fGotRefs = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user