empathy r2777 - trunk/libempathy-gtk



Author: xclaesse
Date: Fri Apr 10 16:53:42 2009
New Revision: 2777
URL: http://svn.gnome.org/viewvc/empathy?rev=2777&view=rev

Log:
Fix bug where priv->state might be unset

From: Davyd Madeley <davyd madeley id au>

Modified:
   trunk/libempathy-gtk/empathy-presence-chooser.c

Modified: trunk/libempathy-gtk/empathy-presence-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-presence-chooser.c	(original)
+++ trunk/libempathy-gtk/empathy-presence-chooser.c	Fri Apr 10 16:53:42 2009
@@ -39,6 +39,10 @@
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-status-presets.h>
 
+// FIXME - what's the correct debug flag?
+#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER
+#include <libempathy/empathy-debug.h>
+
 #include "empathy-ui-utils.h"
 #include "empathy-images.h"
 #include "empathy-presence-chooser.h"
@@ -254,6 +258,10 @@
 
 	/* update the status with MC */
 	const char *status = gtk_entry_get_text (GTK_ENTRY (entry));
+	DEBUG ("Sending state to MC-> %s (%s)\n",
+			g_enum_get_value (g_type_class_peek (MC_TYPE_PRESENCE),
+				priv->state)->value_name,
+			status);
 	empathy_idle_set_presence (priv->idle, priv->state, status);
 }
 
@@ -470,7 +478,7 @@
 
 	priv = GET_PRIV (chooser);
 
-	state = empathy_idle_get_state (priv->idle);
+	priv->state = state = empathy_idle_get_state (priv->idle);
 	status = empathy_idle_get_status (priv->idle);
 	flash_state = empathy_idle_get_flash_state (priv->idle);
 



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