mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
tweak which folder to open in the notify window
This commit is contained in:
parent
8edb5e6fa0
commit
faee51f779
1 changed files with 8 additions and 7 deletions
|
@ -37,14 +37,15 @@ notifyCallback( NotifyNotification * n UNUSED,
|
|||
|
||||
if( !strcmp( action, "folder" ) )
|
||||
{
|
||||
char *argv[] = { "xdg-open", (char*)tr_torrentGetFolder(tor), NULL };
|
||||
char * folder = g_build_filename( tr_torrentGetFolder(tor), info->name, NULL );
|
||||
char * argv[] = { "xdg-open", folder, NULL };
|
||||
g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL );
|
||||
g_free( folder );
|
||||
}
|
||||
else if( !strcmp( action, "file" ) )
|
||||
{
|
||||
char * path = g_build_filename( tr_torrentGetFolder(tor), info->files[0].name, NULL );
|
||||
char * argv[] = { "xdg-open", path, NULL };
|
||||
g_message( "path: %s", path );
|
||||
g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL );
|
||||
g_free( path );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue