nautilus-sendto r410 - in trunk: . src/plugins/empathy



Author: jonnylamb
Date: Wed Mar  4 21:41:50 2009
New Revision: 410
URL: http://svn.gnome.org/viewvc/nautilus-sendto?rev=410&view=rev

Log:
2009-02-28  Jonny Lamb  <jonny lamb collabora co uk>

	* src/plugins/empathy/empathy.c: Use tp-glib enums instead of hardcoded
	values. (Closes: #573545)



Modified:
   trunk/ChangeLog
   trunk/src/plugins/empathy/empathy.c

Modified: trunk/src/plugins/empathy/empathy.c
==============================================================================
--- trunk/src/plugins/empathy/empathy.c	(original)
+++ trunk/src/plugins/empathy/empathy.c	Wed Mar  4 21:41:50 2009
@@ -26,6 +26,8 @@
 #include <gtk/gtk.h>
 #include <gio/gio.h>
 
+#include <telepathy-glib/enums.h>
+
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-contact-manager.h>
 #include <libempathy/empathy-dispatcher.h>
@@ -161,13 +163,11 @@
                   GParamSpec *arg,
                   gpointer user_data)
 {
-  guint state, reason;
+  TpFileTransferState state;
 
-  state = empathy_tp_file_get_state (tp_file, &reason);
+  state = empathy_tp_file_get_state (tp_file, NULL);
 
-  /* If the transfer is completed or cancelled (use constants from tp-glib
-   * when the FT spec is undrafted). */
-  if (state == 4 || state == 5)
+  if (state == TP_FILE_TRANSFER_STATE_COMPLETED || state == TP_FILE_TRANSFER_STATE_CANCELLED)
     quit ();
 }
 



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