1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-06 11:38:21 +00:00

Clamp file progress to 0.0-1.0

Clear focus when opening files dialog.
This commit is contained in:
Josh Elsasser 2007-02-23 11:49:18 +00:00
parent b1d47df423
commit 963a4fdc81
2 changed files with 3 additions and 0 deletions

View file

@ -372,6 +372,7 @@ windowsizehack( GtkWidget * wind, GtkWidget * scroll, GtkWidget * view,
}
gtk_widget_show_now( wind );
gtk_window_resize( GTK_WINDOW( wind ), width, height );
gtk_window_set_focus( GTK_WINDOW( wind ), NULL );
}
void

View file

@ -533,6 +533,8 @@ float * tr_torrentCompletion( tr_torrent_t * tor )
assert( -0.1 < weight && 1.1 > weight );
if( fileoff == filelen )
{
ret[file] = MIN( 1.0, ret[file] );
ret[file] = MAX( 0.0, ret[file] );
filestart += fileoff;
fileoff = 0;
file++;