Changeset 5109


Ignore:
Timestamp:
Feb 25, 2008, 4:13:54 AM (14 years ago)
Author:
charles
Message:

tweak which folder to open in the notify window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/notify.c

    r5100 r5109  
    3838    if( !strcmp( action, "folder" ) )
    3939    {
    40         char *argv[] = { "xdg-open", (char*)tr_torrentGetFolder(tor), NULL };
    41         g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
     40        char * folder = g_build_filename( tr_torrentGetFolder(tor), info->name, NULL );
     41        char * argv[] = { "xdg-open", folder, NULL };
     42        g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL );
     43        g_free( folder );
    4244    }
    4345    else if( !strcmp( action, "file" ) )
    4446    {
    45         char * path = g_build_filename(tr_torrentGetFolder(tor), info->files[0].name, NULL); 
    46         char *argv[] = { "xdg-open", path, NULL };
    47         g_message( "path: %s", path );
    48         g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
    49         g_free(path);
     47        char * path = g_build_filename( tr_torrentGetFolder(tor), info->files[0].name, NULL );
     48        char * argv[] = { "xdg-open", path, NULL };
     49        g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL );
     50        g_free( path );
    5051    }
    5152}
Note: See TracChangeset for help on using the changeset viewer.