1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

Handle B_ARGV_RECEIVED messages, apparently needed for browser (and

command line) interaction.

Patch by Alan Westbrook.
This commit is contained in:
Eric Petit 2006-04-04 08:03:57 +00:00
parent 235255b8f0
commit bfaf5d0ac6

View file

@ -202,6 +202,24 @@ void TRApplication::RefsReceived(BMessage *message) {
} }
} }
/**
* Needed for browsers or command line interaction
*/
void TRApplication::ArgvReceived(int32 _argc, char** _argv)
{
entry_ref ref;
BMessage refs(B_REFS_RECEIVED);
for( int32 i = 0; i < _argc; ++i )
{
if( B_OK == get_ref_for_path(_argv[i], &ref) )
{
refs.AddRef("refs", &ref);
}
}
be_app_messenger.SendMessage(refs);
}
/** /**
* BMessage handling. * BMessage handling.
*/ */