mirror of
https://github.com/transmission/transmission
synced 2024-12-24 00:34:04 +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
15
gtk/notify.c
15
gtk/notify.c
|
@ -37,16 +37,17 @@ notifyCallback( NotifyNotification * n UNUSED,
|
|||
|
||||
if( !strcmp( action, "folder" ) )
|
||||
{
|
||||
char *argv[] = { "xdg-open", (char*)tr_torrentGetFolder(tor), NULL };
|
||||
g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, 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);
|
||||
char * path = g_build_filename( tr_torrentGetFolder(tor), info->files[0].name, NULL );
|
||||
char * argv[] = { "xdg-open", path, NULL };
|
||||
g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL );
|
||||
g_free( path );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue