[glib] mount-op: use gint64 instead of guint64 for time_left and bytes_left
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] mount-op: use gint64 instead of guint64 for time_left and bytes_left
- Date: Tue, 21 Aug 2012 09:18:24 +0000 (UTC)
commit 0d8a81b722e18092062f83b7fd8c0b3a5f4d613a
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Aug 20 19:46:33 2012 +0200
mount-op: use gint64 instead of guint64 for time_left and bytes_left
Since those can be -1, they need to be signed.
https://bugzilla.gnome.org/show_bug.cgi?id=682284
gio/gmountoperation.c | 9 +++++----
gio/gmountoperation.h | 4 ++--
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gio/gmountoperation.c b/gio/gmountoperation.c
index 31b2a34..ec7f5ff 100644
--- a/gio/gmountoperation.c
+++ b/gio/gmountoperation.c
@@ -243,8 +243,8 @@ show_processes (GMountOperation *op,
static void
show_unmount_progress (GMountOperation *op,
const gchar *message,
- guint64 time_left,
- guint64 bytes_left)
+ gint64 time_left,
+ gint64 bytes_left)
{
/* nothing to do */
}
@@ -387,7 +387,8 @@ g_mount_operation_class_init (GMountOperationClass *klass)
* GMountOperation::show-unmount-progress:
* @op: a #GMountOperation:
* @message: string containing a mesage to display to the user
- * @time_left: the estimated time left before the operation completes, or -1
+ * @time_left: the estimated time left before the operation completes,
+ * in microseconds, or -1
* @bytes_left: the amount of bytes to be written before the operation
* completes (or -1 if such amount is not known), or zero if the operation
* is completed
@@ -418,7 +419,7 @@ g_mount_operation_class_init (GMountOperationClass *klass)
G_STRUCT_OFFSET (GMountOperationClass, show_unmount_progress),
NULL, NULL, NULL,
G_TYPE_NONE, 3,
- G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_UINT64);
+ G_TYPE_STRING, G_TYPE_INT64, G_TYPE_INT64);
/**
* GMountOperation:username:
diff --git a/gio/gmountoperation.h b/gio/gmountoperation.h
index ae36398..0c11265 100644
--- a/gio/gmountoperation.h
+++ b/gio/gmountoperation.h
@@ -82,8 +82,8 @@ struct _GMountOperationClass
void (* show_unmount_progress) (GMountOperation *op,
const gchar *message,
- guint64 time_left,
- guint64 bytes_left);
+ gint64 time_left,
+ gint64 bytes_left);
/*< private >*/
/* Padding for future expansion */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]