From 19e9827684f11667fc9d51f868094be91cc4fd50 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 21 Nov 2008 16:18:15 +0000 Subject: Made state_change_reason None in the constructor instead of an invalid value. (Jonny Lamb) Signed-off-by: Jonny Lamb svn path=/trunk/; revision=1807 --- libempathy/empathy-tp-file.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libempathy/empathy-tp-file.c') diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c index df5b7da2e..889b7b61b 100644 --- a/libempathy/empathy-tp-file.c +++ b/libempathy/empathy-tp-file.c @@ -569,9 +569,8 @@ tp_file_constructor (GType type, tp_file->priv->state = g_value_get_uint ( g_hash_table_lookup (properties, "State")); - /* Invalid reason, so empathy_file_get_state_change_reason() can give - * a warning if called for a not closed file transfer. */ - tp_file->priv->state_change_reason = -1; + tp_file->priv->state_change_reason = + EMP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE; tp_file->priv->transferred_bytes = g_value_get_uint64 ( g_hash_table_lookup (properties, "TransferredBytes")); @@ -851,8 +850,6 @@ empathy_tp_file_get_state_change_reason (EmpathyTpFile *tp_file) { g_return_val_if_fail (EMPATHY_IS_TP_FILE (tp_file), EMP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE); - g_return_val_if_fail (tp_file->priv->state_change_reason >= 0, - EMP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE); return tp_file->priv->state_change_reason; } -- cgit v1.2.3