mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(gtk) #1259: GLib-GObject-WARNING **: value "-100" of type gint' is invalid or out of range for property
value' of type `gint'
This commit is contained in:
parent
9050a6de57
commit
b29143614c
1 changed files with 2 additions and 1 deletions
|
@ -451,7 +451,8 @@ torrent_cell_renderer_render( GtkCellRenderer * cell,
|
|||
my_cell.height = p->bar_height;
|
||||
if( 1 )
|
||||
{
|
||||
g_object_set( p->progress_renderer, "value", (int)(torStat->percentDone*100.0),
|
||||
const double percent = MAX( 0.0, torStat->percentDone );
|
||||
g_object_set( p->progress_renderer, "value", (int)(percent*100.0),
|
||||
"text", "",
|
||||
NULL );
|
||||
gtk_cell_renderer_render( p->progress_renderer,
|
||||
|
|
Loading…
Reference in a new issue