]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-account-widget-salut.c
Unset account parameter if user gives an empthy value.
[empathy.git] / libempathy-gtk / empathy-account-widget-salut.c
index 5d9bba9ff341f5f76df41cfde1fd228469d8d34b..78dce23127710cd3c1ca126cd68eb1e2f4e2aecf 100644 (file)
 #include <libmissioncontrol/mc-profile.h>
 
 #include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-debug.h>
 
 #include "empathy-account-widget-salut.h"
 #include "empathy-ui-utils.h"
 
+#define DEBUG_DOMAIN "AccountWidgetMSN"
+
 typedef struct {
        McAccount *account;
        
@@ -78,14 +81,16 @@ account_widget_salut_entry_focus_cb (GtkWidget               *widget,
        }
        
        str = gtk_entry_get_text (GTK_ENTRY (widget));
-       
        if (G_STR_EMPTY (str)) {
                gchar *value = NULL;
 
+               mc_account_unset_param (settings->account, param);
                mc_account_get_param_string (settings->account, param, &value);
+               empathy_debug (DEBUG_DOMAIN, "Unset %s and restore to %s", param, value);
                gtk_entry_set_text (GTK_ENTRY (widget), value ? value : "");
                g_free (value);
        } else {
+               empathy_debug (DEBUG_DOMAIN, "Setting %s to %s", param, str);
                mc_account_set_param_string (settings->account, param, str);
        }