Changeset 5017


Ignore:
Timestamp:
Feb 13, 2008, 3:21:40 AM (14 years ago)
Author:
charles
Message:

(gtk) fix minor r5015 oops on setting the default destination directory when pressing the "open" button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r5015 r5017  
    754754{
    755755    struct cbdata * cbdata = gdata;
    756 
    757     if( g_list_length( paths ) != 1 )
     756    const int len = g_list_length( paths );
     757    if( len > 1 )
    758758        promptfordir( cbdata->wind, core, paths, ctor );
    759759    else {
    760         tr_ctorSetMetainfoFromFile( ctor, paths->data );
     760        if( len == 1 )
     761            tr_ctorSetMetainfoFromFile( ctor, paths->data );
    761762        makeaddwind( cbdata->wind, core, ctor );
    762763    }
     
    10101011    if ( !strcmp (action_name, "open-torrent-menu") || !strcmp( action_name, "open-torrent-toolbar" ))
    10111012    {
    1012         makeaddwind( data->wind, data->core, tr_ctorNew( tr_core_handle( data->core ) ) );
     1013        tr_core_add_list( data->core, NULL, tr_ctorNew( tr_core_handle( data->core ) ) );
    10131014    }
    10141015    else if (!strcmp (action_name, "show-stats"))
Note: See TracChangeset for help on using the changeset viewer.