aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:18:15 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:18:15 +0800
commit6993bc1e81c36431decd77b1f67be6452fcfae04 (patch)
treeb3f476563c19a9bb23aa7a309a197814cefe2105
parentdd51fb6f9da5f4bae2e135d76edf73dddf01c4e7 (diff)
downloadgsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.tar
gsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.tar.gz
gsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.tar.bz2
gsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.tar.lz
gsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.tar.xz
gsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.tar.zst
gsoc2013-empathy-6993bc1e81c36431decd77b1f67be6452fcfae04.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> git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1807 4ee84921-47dd-4033-b63a-18d7a039a3e4
-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;
}