summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnome-autoar/autoar-extract.c14
-rw-r--r--tests/test-extract.c8
2 files changed, 10 insertions, 12 deletions
diff --git a/gnome-autoar/autoar-extract.c b/gnome-autoar/autoar-extract.c
index bfdfd9d..65a49d0 100644
--- a/gnome-autoar/autoar-extract.c
+++ b/gnome-autoar/autoar-extract.c
@@ -816,10 +816,8 @@ autoar_extract_signal_progress (AutoarExtract *arextract)
if (mtime - arextract->priv->notify_last >= arextract->priv->notify_interval) {
autoar_common_g_signal_emit (arextract, arextract->priv->in_thread,
autoar_extract_signals[PROGRESS], 0,
- ((double)(arextract->priv->completed_size)) /
- ((double)(arextract->priv->size)),
- ((double)(arextract->priv->completed_files)) /
- ((double)(arextract->priv->files)));
+ arextract->priv->completed_size,
+ arextract->priv->completed_files);
arextract->priv->notify_last = mtime;
}
}
@@ -1394,8 +1392,8 @@ autoar_extract_class_init (AutoarExtractClass *klass)
/**
* AutoarExtract::progress:
* @arextract: the #AutoarExtract
- * @fraction_size: fraction of size has been written to disk
- * @fraction_files: fraction of number of files have been written to disk
+ * @completed_size: bytes has been written to disk
+ * @completed_files: number of files have been written to disk
*
* This signal is used to report progress of creating archives.
**/
@@ -1407,8 +1405,8 @@ autoar_extract_class_init (AutoarExtractClass *klass)
g_cclosure_marshal_generic,
G_TYPE_NONE,
2,
- G_TYPE_DOUBLE,
- G_TYPE_DOUBLE);
+ G_TYPE_UINT64,
+ G_TYPE_UINT);
/**
* AutoarExtract::cancelled:
diff --git a/tests/test-extract.c b/tests/test-extract.c
index 64876d8..197eca8 100644
--- a/tests/test-extract.c
+++ b/tests/test-extract.c
@@ -28,13 +28,13 @@ my_handler_decide_dest (AutoarExtract *arextract,
static void
my_handler_progress (AutoarExtract *arextract,
- gdouble fraction_size,
- gdouble fraction_files,
+ guint64 completed_size,
+ guint completed_files,
gpointer data)
{
g_print ("\rProgress: Archive Size %.2lf %%, Files %.2lf %%",
- fraction_size * 100,
- fraction_files * 100);
+ ((double)(completed_size)) * 100 / autoar_extract_get_size (arextract),
+ ((double)(completed_files)) * 100 / autoar_extract_get_files (arextract));
}
static void