aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-11-22 00:18:15 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:18:15 +0800
commit19e9827684f11667fc9d51f868094be91cc4fd50 (patch)
treeb3f476563c19a9bb23aa7a309a197814cefe2105 /libempathy
parent737daddb3938c81bb1c4e53c0a3fd7dd8aa51bc5 (diff)
downloadgsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.tar
gsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.tar.gz
gsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.tar.bz2
gsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.tar.lz
gsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.tar.xz
gsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.tar.zst
gsoc2013-empathy-19e9827684f11667fc9d51f868094be91cc4fd50.zip
Made state_change_reason None in the constructor instead of an invalid value. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1807
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-file.c7
1 files changed, 2 insertions, 5 deletions
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;
}