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

This commit is contained in:
Charles Kerr 2008-02-13 03:21:40 +00:00
parent e280126634
commit 249045641f
1 changed files with 5 additions and 4 deletions

View File

@ -753,11 +753,12 @@ coreprompt( TrCore * core,
gpointer gdata )
{
struct cbdata * cbdata = gdata;
if( g_list_length( paths ) != 1 )
const int len = g_list_length( paths );
if( len > 1 )
promptfordir( cbdata->wind, core, paths, ctor );
else {
tr_ctorSetMetainfoFromFile( ctor, paths->data );
if( len == 1 )
tr_ctorSetMetainfoFromFile( ctor, paths->data );
makeaddwind( cbdata->wind, core, ctor );
}
}
@ -1009,7 +1010,7 @@ doAction ( const char * action_name, gpointer user_data )
if ( !strcmp (action_name, "open-torrent-menu") || !strcmp( action_name, "open-torrent-toolbar" ))
{
makeaddwind( data->wind, data->core, tr_ctorNew( tr_core_handle( data->core ) ) );
tr_core_add_list( data->core, NULL, tr_ctorNew( tr_core_handle( data->core ) ) );
}
else if (!strcmp (action_name, "show-stats"))
{