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:
parent
b1d47df423
commit
963a4fdc81
2 changed files with 3 additions and 0 deletions
|
@ -372,6 +372,7 @@ windowsizehack( GtkWidget * wind, GtkWidget * scroll, GtkWidget * view,
|
||||||
}
|
}
|
||||||
gtk_widget_show_now( wind );
|
gtk_widget_show_now( wind );
|
||||||
gtk_window_resize( GTK_WINDOW( wind ), width, height );
|
gtk_window_resize( GTK_WINDOW( wind ), width, height );
|
||||||
|
gtk_window_set_focus( GTK_WINDOW( wind ), NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -533,6 +533,8 @@ float * tr_torrentCompletion( tr_torrent_t * tor )
|
||||||
assert( -0.1 < weight && 1.1 > weight );
|
assert( -0.1 < weight && 1.1 > weight );
|
||||||
if( fileoff == filelen )
|
if( fileoff == filelen )
|
||||||
{
|
{
|
||||||
|
ret[file] = MIN( 1.0, ret[file] );
|
||||||
|
ret[file] = MAX( 0.0, ret[file] );
|
||||||
filestart += fileoff;
|
filestart += fileoff;
|
||||||
fileoff = 0;
|
fileoff = 0;
|
||||||
file++;
|
file++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue