(gtk) fix minor r5015 oops on setting the default destination directory when pressing the "open" button
This commit is contained in:
parent
e280126634
commit
249045641f
|
@ -753,10 +753,11 @@ coreprompt( TrCore * core,
|
||||||
gpointer gdata )
|
gpointer gdata )
|
||||||
{
|
{
|
||||||
struct cbdata * cbdata = gdata;
|
struct cbdata * cbdata = gdata;
|
||||||
|
const int len = g_list_length( paths );
|
||||||
if( g_list_length( paths ) != 1 )
|
if( len > 1 )
|
||||||
promptfordir( cbdata->wind, core, paths, ctor );
|
promptfordir( cbdata->wind, core, paths, ctor );
|
||||||
else {
|
else {
|
||||||
|
if( len == 1 )
|
||||||
tr_ctorSetMetainfoFromFile( ctor, paths->data );
|
tr_ctorSetMetainfoFromFile( ctor, paths->data );
|
||||||
makeaddwind( cbdata->wind, core, ctor );
|
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" ))
|
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"))
|
else if (!strcmp (action_name, "show-stats"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue