empathy r1807 - trunk/libempathy



Author: xclaesse
Date: Fri Nov 21 16:18:15 2008
New Revision: 1807
URL: http://svn.gnome.org/viewvc/empathy?rev=1807&view=rev

Log:
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>

Modified:
   trunk/libempathy/empathy-tp-file.c

Modified: trunk/libempathy/empathy-tp-file.c
==============================================================================
--- trunk/libempathy/empathy-tp-file.c	(original)
+++ trunk/libempathy/empathy-tp-file.c	Fri Nov 21 16:18:15 2008
@@ -569,9 +569,8 @@
   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 @@
 {
   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;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]