Mon Mar 15 17:09:37 1999 Gregory McLean <gregm@comstar.net>
* gdialogs.c (file_progress_show_bytes): Fixed a GTK Warning when done / total >= 1.0 * file.c : Actually update the progress bar when copying files around.
Этот коммит содержится в:
родитель
f91b5de7c8
Коммит
150cc7de1c
@ -1,3 +1,9 @@
|
||||
Mon Mar 15 17:09:37 1999 Gregory McLean <gregm@comstar.net>
|
||||
|
||||
* gdialogs.c (file_progress_show_bytes): Fixed a GTK Warning when
|
||||
done / total >= 1.0
|
||||
* file.c : Actually update the progress bar when copying files around.
|
||||
|
||||
1999-03-15 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gscreen.c (x_select_item): It is not necessary to call
|
||||
|
@ -273,6 +273,7 @@ FileProgressStatus
|
||||
file_progress_show_bytes (FileOpContext *ctx, double done, double total)
|
||||
{
|
||||
FileOpContextUI *ui;
|
||||
gfloat per;
|
||||
|
||||
g_return_val_if_fail (ctx != NULL, FILE_CONT);
|
||||
|
||||
@ -284,12 +285,12 @@ file_progress_show_bytes (FileOpContext *ctx, double done, double total)
|
||||
|
||||
if (ui->aborting)
|
||||
return FILE_ABORT;
|
||||
per = ( done / total <= 1.0) ? done / total : 1.0;
|
||||
|
||||
if (total == 0.0)
|
||||
if (total <= 0.0)
|
||||
gtk_progress_bar_update (GTK_PROGRESS_BAR (ui->byte_prog), 0.0);
|
||||
else
|
||||
gtk_progress_bar_update (GTK_PROGRESS_BAR (ui->byte_prog),
|
||||
(gfloat) done/(gfloat) total);
|
||||
gtk_progress_bar_update (GTK_PROGRESS_BAR (ui->byte_prog), per);
|
||||
while (gtk_events_pending ())
|
||||
gtk_main_iteration ();
|
||||
return FILE_CONT;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user