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:
parent
235255b8f0
commit
bfaf5d0ac6
1 changed files with 18 additions and 0 deletions
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue