Commit 69288696 authored by Xavier Claessens's avatar Xavier Claessens

Make use of tp-glib debug system.

svn path=/trunk/; revision=1066
parent fb06002d
......@@ -103,6 +103,18 @@ PKG_CHECK_MODULES(EMPATHY,
libebook-1.2
])
# -----------------------------------------------------------
# Enable debug
# -----------------------------------------------------------
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--disable-debug],[compile without debug code]),
enable_debug=$enableval, enable_debug=yes )
if test x$enable_debug = xyes; then
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
# -----------------------------------------------------------
# Language Support
# -----------------------------------------------------------
......
......@@ -32,7 +32,6 @@
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-irc-network-manager.h>
#include "empathy-irc-network-dialog.h"
......@@ -40,7 +39,8 @@
#include "empathy-account-widget-irc.h"
#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "AccountWidgetIRC"
#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT | EMPATHY_DEBUG_IRC
#include <libempathy/empathy-debug.h>
#define IRC_NETWORKS_FILENAME "irc-networks.xml"
......@@ -73,7 +73,7 @@ account_widget_irc_destroy_cb (GtkWidget *widget,
static void
unset_server_params (EmpathyAccountWidgetIrc *settings)
{
empathy_debug (DEBUG_DOMAIN, "Unset server, port and use-ssl");
DEBUG ("Unset server, port and use-ssl");
mc_account_unset_param (settings->account, "server");
mc_account_unset_param (settings->account, "port");
mc_account_unset_param (settings->account, "use-ssl");
......@@ -101,7 +101,7 @@ update_server_params (EmpathyAccountWidgetIrc *settings)
g_assert (network != NULL);
g_object_get (network, "charset", &charset, NULL);
empathy_debug (DEBUG_DOMAIN, "Setting charset to %s", charset);
DEBUG ("Setting charset to %s", charset);
mc_account_set_param_string (settings->account, "charset", charset);
g_free (charset);
......@@ -120,12 +120,11 @@ update_server_params (EmpathyAccountWidgetIrc *settings)
"ssl", &ssl,
NULL);
empathy_debug (DEBUG_DOMAIN, "Setting server to %s", address);
DEBUG ("Setting server to %s", address);
mc_account_set_param_string (settings->account, "server", address);
empathy_debug (DEBUG_DOMAIN, "Setting port to %u", port);
DEBUG ("Setting port to %u", port);
mc_account_set_param_int (settings->account, "port", port);
empathy_debug (DEBUG_DOMAIN, "Setting use-ssl to %s",
ssl ? "TRUE": "FALSE" );
DEBUG ("Setting use-ssl to %s", ssl ? "TRUE": "FALSE" );
mc_account_set_param_boolean (settings->account, "use-ssl", ssl);
g_free (address);
......@@ -217,7 +216,7 @@ account_widget_irc_button_remove_clicked_cb (GtkWidget *button,
g_assert (network != NULL);
g_object_get (network, "name", &name, NULL);
empathy_debug (DEBUG_DOMAIN, "Remove network %s", name);
DEBUG ("Remove network %s", name);
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
empathy_irc_network_manager_remove (settings->network_manager, network);
......@@ -378,7 +377,7 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
g_object_set (network, "charset", charset, NULL);
g_object_get (network, "name", &name, NULL);
empathy_debug (DEBUG_DOMAIN, "Account use network %s", name);
DEBUG ("Account use network %s", name);
g_free (name);
}
......@@ -388,7 +387,7 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
EmpathyIrcServer *srv;
GtkTreeIter iter;
empathy_debug (DEBUG_DOMAIN, "Create a network %s", server);
DEBUG ("Create a network %s", server);
network = empathy_irc_network_new (server);
srv = empathy_irc_server_new (server, port, ssl);
......
......@@ -33,14 +33,11 @@
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-debug.h>
#include "empathy-account-widget.h"
#include "empathy-account-widget-sip.h"
#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "AccountWidgetSIP"
typedef struct {
McAccount *account;
......
......@@ -32,13 +32,13 @@
#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
#include "empathy-account-widget.h"
#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "AccountWidget"
#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
#include <libempathy/empathy-debug.h>
static gboolean
account_widget_entry_focus_cb (GtkWidget *widget,
......@@ -56,12 +56,12 @@ account_widget_entry_focus_cb (GtkWidget *widget,
mc_account_unset_param (account, param_name);
mc_account_get_param_string (account, param_name, &value);
empathy_debug (DEBUG_DOMAIN, "Unset %s and restore to %s", param_name, value);
DEBUG ("Unset %s and restore to %s", param_name, value);
gtk_entry_set_text (GTK_ENTRY (widget), value ? value : "");
g_free (value);
} else {
empathy_debug (DEBUG_DOMAIN, "Setting %s to %s", param_name,
strstr (param_name, "password") ? "***" : str);
DEBUG ("Setting %s to %s", param_name,
strstr (param_name, "password") ? "***" : str);
mc_account_set_param_string (account, param_name, str);
}
......@@ -81,10 +81,10 @@ account_widget_int_changed_cb (GtkWidget *widget,
if (value == 0) {
mc_account_unset_param (account, param_name);
mc_account_get_param_int (account, param_name, &value);
empathy_debug (DEBUG_DOMAIN, "Unset %s and restore to %d", param_name, value);
DEBUG ("Unset %s and restore to %d", param_name, value);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value);
} else {
empathy_debug (DEBUG_DOMAIN, "Setting %s to %d", param_name, value);
DEBUG ("Setting %s to %d", param_name, value);
mc_account_set_param_int (account, param_name, value);
}
}
......@@ -107,9 +107,9 @@ account_widget_checkbutton_toggled_cb (GtkWidget *widget,
mc_account_get_param_boolean (account, param_name, &default_value);
if (default_value == value) {
empathy_debug (DEBUG_DOMAIN, "Unset %s and restore to %d", param_name, default_value);
DEBUG ("Unset %s and restore to %d", param_name, default_value);
} else {
empathy_debug (DEBUG_DOMAIN, "Setting %s to %d", param_name, value);
DEBUG ("Setting %s to %d", param_name, value);
mc_account_set_param_boolean (account, param_name, value);
}
}
......@@ -124,7 +124,7 @@ account_widget_forget_clicked_cb (GtkWidget *button,
param_name = g_object_get_data (G_OBJECT (entry), "param_name");
account = g_object_get_data (G_OBJECT (entry), "account");
empathy_debug (DEBUG_DOMAIN, "Unset %s", param_name);
DEBUG ("Unset %s", param_name);
mc_account_unset_param (account, param_name);
gtk_entry_set_text (GTK_ENTRY (entry), "");
}
......@@ -209,9 +209,7 @@ account_widget_setup_widget (GtkWidget *widget,
G_CALLBACK (account_widget_checkbutton_toggled_cb),
account);
} else {
empathy_debug (DEBUG_DOMAIN,
"Unknown type of widget for param %s",
param_name);
DEBUG ("Unknown type of widget for param %s", param_name);
}
}
......@@ -357,9 +355,8 @@ accounts_widget_generic_setup (McAccount *account,
GTK_FILL | GTK_EXPAND, 0,
0, 0);
} else {
empathy_debug (DEBUG_DOMAIN,
"Unknown signature for param %s: %s",
param_name_formatted, param->signature);
DEBUG ("Unknown signature for param %s: %s",
param_name_formatted, param->signature);
}
if (widget) {
......
......@@ -38,7 +38,6 @@
#include <libmissioncontrol/mc-account-monitor.h>
#include <telepathy-glib/util.h>
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-ui-utils.h>
......@@ -48,7 +47,8 @@
#include "empathy-account-widget-irc.h"
#include "empathy-account-widget-sip.h"
#define DEBUG_DOMAIN "AccountDialog"
#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
#include <libempathy/empathy-debug.h>
/* Flashing delay for icons (milliseconds). */
#define FLASH_TIMEOUT 500
......@@ -402,9 +402,8 @@ accounts_dialog_enable_toggled_cb (GtkCellRendererToggle *cell_renderer,
enabled = mc_account_is_enabled (account);
mc_account_set_enabled (account, !enabled);
empathy_debug (DEBUG_DOMAIN, "%s account %s",
enabled ? "Disabled" : "Enable",
mc_account_get_display_name(account));
DEBUG ("%s account %s", enabled ? "Disabled" : "Enable",
mc_account_get_display_name(account));
g_object_unref (account);
}
......@@ -663,7 +662,7 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
g_return_if_fail (name != NULL);
empathy_debug (DEBUG_DOMAIN, "Adding new account: %s", name);
DEBUG ("Adding new account: %s", name);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->treeview));
gtk_list_store_insert_with_values (GTK_LIST_STORE (model), &iter,
......@@ -747,9 +746,8 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->treeview));
account = mc_account_lookup (unique_name);
empathy_debug (DEBUG_DOMAIN, "Status changed for account %s: "
"status=%d presence=%d",
unique_name, status, presence);
DEBUG ("Status changed for account %s: status=%d presence=%d",
unique_name, status, presence);
if (accounts_dialog_get_account_iter (dialog, account, &iter)) {
GtkTreePath *path;
......@@ -808,9 +806,9 @@ accounts_dialog_account_enabled_cb (McAccountMonitor *monitor,
account = mc_account_lookup (unique_name);
enabled = mc_account_is_enabled (account);
empathy_debug (DEBUG_DOMAIN, "Account %s is now %s",
mc_account_get_display_name (account),
enabled ? "enabled" : "disabled");
DEBUG ("Account %s is now %s",
mc_account_get_display_name (account),
enabled ? "enabled" : "disabled");
if (accounts_dialog_get_account_iter (dialog, account, &iter)) {
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
......
......@@ -29,13 +29,12 @@
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libempathy/empathy-debug.h>
#include "empathy-avatar-chooser.h"
#include "empathy-conf.h"
#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "AvatarChooser"
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_AVATAR_CHOOSER, EmpathyAvatarChooserPriv))
......@@ -187,8 +186,8 @@ avatar_chooser_set_pixbuf (EmpathyAvatarChooser *chooser,
&priv->image_data_size,
"png",
&error, NULL)) {
empathy_debug (DEBUG_DOMAIN, "Failed to save pixbuf: %s",
error ? error->message : "No error given");
DEBUG ("Failed to save pixbuf: %s",
error ? error->message : "No error given");
g_clear_error (&error);
}
image = gtk_image_new_from_pixbuf (pixbuf_view);
......@@ -212,8 +211,8 @@ avatar_chooser_set_image_from_file (EmpathyAvatarChooser *chooser,
GError *error = NULL;
if (!(pixbuf = gdk_pixbuf_new_from_file (filename, &error))) {
empathy_debug (DEBUG_DOMAIN, "Failed to load pixbuf from file: %s",
error ? error->message : "No error given");
DEBUG ("Failed to load pixbuf from file: %s",
error ? error->message : "No error given");
g_clear_error (&error);
}
......
......@@ -29,13 +29,9 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <libempathy/empathy-debug.h>
#include "empathy-avatar-image.h"
#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "AvatarImage"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_AVATAR_IMAGE, EmpathyAvatarImagePriv))
#define MAX_SMALL 64
......
......@@ -22,12 +22,8 @@
#include <gtk/gtktreeview.h>
#include <libempathy/empathy-debug.h>
#include "empathy-cell-renderer-activatable.h"
#define DEBUG_DOMAIN "CellRendererActivatable"
static void empathy_cell_renderer_activatable_init (EmpathyCellRendererActivatable *cell);
static void empathy_cell_renderer_activatable_class_init (EmpathyCellRendererActivatableClass *klass);
static gboolean cell_renderer_activatable_activate (GtkCellRenderer *cell,
......
......@@ -43,7 +43,6 @@
#include <libmissioncontrol/mc-account.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-debug.h>
#include "empathy-chat-view.h"
#include "empathy-chat.h"
......@@ -52,7 +51,8 @@
#include "empathy-ui-utils.h"
#include "empathy-smiley-manager.h"
#define DEBUG_DOMAIN "ChatView"
#define DEBUG_FLAG EMPATHY_DEBUG_CHAT
#include <libempathy/empathy-debug.h>
/* Number of seconds between timestamps when using normal mode, 5 minutes. */
#define TIMESTAMP_INTERVAL 300
......@@ -208,7 +208,7 @@ chat_view_finalize (GObject *object)
view = EMPATHY_CHAT_VIEW (object);
priv = GET_PRIV (view);
empathy_debug (DEBUG_DOMAIN, "finalize: %p", object);
DEBUG ("finalize: %p", object);
empathy_conf_notify_remove (empathy_conf_get (), priv->notify_system_fonts_id);
empathy_conf_notify_remove (empathy_conf_get (), priv->notify_show_avatars_id);
......@@ -780,7 +780,7 @@ empathy_chat_view_scroll_down (EmpathyChatView *view)
return;
}
empathy_debug (DEBUG_DOMAIN, "Scrolling down");
DEBUG ("Scrolling down");
if (priv->scroll_time) {
g_timer_reset (priv->scroll_time);
......@@ -933,8 +933,7 @@ empathy_chat_view_scroll (EmpathyChatView *view,
g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
empathy_debug (DEBUG_DOMAIN, "Scrolling %s",
allow_scrolling ? "enabled" : "disabled");
DEBUG ("Scrolling %s", allow_scrolling ? "enabled" : "disabled");
priv->allow_scrolling = allow_scrolling;
if (allow_scrolling) {
......
......@@ -39,7 +39,6 @@
#include <libempathy/empathy-log-manager.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
#include "empathy-chat.h"
......@@ -51,9 +50,10 @@
#include "empathy-contact-menu.h"
#include "empathy-ui-utils.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT, EmpathyChatPriv))
#define DEBUG_FLAG EMPATHY_DEBUG_CHAT
#include <libempathy/empathy-debug.h>
#define DEBUG_DOMAIN "Chat"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT, EmpathyChatPriv))
#define CHAT_DIR_CREATE_MODE (S_IRUSR | S_IWUSR | S_IXUSR)
#define CHAT_FILE_CREATE_MODE (S_IRUSR | S_IWUSR)
......@@ -184,8 +184,7 @@ chat_status_changed_cb (MissionControl *mc,
if (status == TP_CONNECTION_STATUS_CONNECTED && !priv->tp_chat &&
empathy_account_equal (account, priv->account) &&
priv->handle_type != TP_HANDLE_TYPE_NONE) {
empathy_debug (DEBUG_DOMAIN,
"Account reconnected, request a new Text channel");
DEBUG ("Account reconnected, request a new Text channel");
mission_control_request_channel_with_string_handle (mc,
priv->account,
TP_IFACE_CHANNEL_TYPE_TEXT,
......@@ -304,8 +303,7 @@ chat_sent_message_get_next (EmpathyChat *chat)
priv = GET_PRIV (chat);
if (!priv->sent_messages) {
empathy_debug (DEBUG_DOMAIN,
"No sent messages, next message is NULL");
DEBUG ("No sent messages, next message is NULL");
return NULL;
}
......@@ -315,9 +313,7 @@ chat_sent_message_get_next (EmpathyChat *chat)
priv->sent_messages_index++;
}
empathy_debug (DEBUG_DOMAIN,
"Returning next message index:%d",
priv->sent_messages_index);
DEBUG ("Returning next message index:%d", priv->sent_messages_index);
return g_slist_nth_data (priv->sent_messages, priv->sent_messages_index);
}
......@@ -332,8 +328,7 @@ chat_sent_message_get_last (EmpathyChat *chat)
priv = GET_PRIV (chat);
if (!priv->sent_messages) {
empathy_debug (DEBUG_DOMAIN,
"No sent messages, last message is NULL");
DEBUG ("No sent messages, last message is NULL");
return NULL;
}
......@@ -341,9 +336,7 @@ chat_sent_message_get_last (EmpathyChat *chat)
priv->sent_messages_index--;
}
empathy_debug (DEBUG_DOMAIN,
"Returning last message index:%d",
priv->sent_messages_index);
DEBUG ("Returning last message index:%d", priv->sent_messages_index);
return g_slist_nth_data (priv->sent_messages, priv->sent_messages_index);
}
......@@ -446,9 +439,9 @@ chat_state_changed_cb (EmpathyTpChat *tp_chat,
g_assert_not_reached ();
}
empathy_debug (DEBUG_DOMAIN, "Was composing: %s now composing: %s",
was_composing ? "yes" : "no",
priv->compositors ? "yes" : "no");
DEBUG ("Was composing: %s now composing: %s",
was_composing ? "yes" : "no",
priv->compositors ? "yes" : "no");
if ((was_composing && !priv->compositors) ||
(!was_composing && priv->compositors)) {
......@@ -488,18 +481,17 @@ chat_message_received_cb (EmpathyTpChat *tp_chat,
/* The message we received is already displayed because
* some jabber chatrooms sends us back logs and we
* already displayed it from localy logged messages. */
empathy_debug (DEBUG_DOMAIN, "Skipping message because "
"it is already displayed from logged "
"messages");
DEBUG ("Skipping message because it is already "
"displayed from logged messages");
g_object_unref (log_message);
return;
}
g_object_unref (log_message);
}
empathy_debug (DEBUG_DOMAIN, "Appending new message from %s (%d)",
empathy_contact_get_name (sender),
empathy_contact_get_handle (sender));
DEBUG ("Appending new message from %s (%d)",
empathy_contact_get_name (sender),
empathy_contact_get_handle (sender));
if (priv->id) {
gboolean is_chatroom;
......@@ -898,7 +890,7 @@ static void
chat_input_realize_cb (GtkWidget *widget,
EmpathyChat *chat)
{
empathy_debug (DEBUG_DOMAIN, "Setting focus to the input text view");
DEBUG ("Setting focus to the input text view");
gtk_widget_grab_focus (widget);
}
......@@ -1399,7 +1391,7 @@ chat_finalize (GObject *object)
chat = EMPATHY_CHAT (object);
priv = GET_PRIV (chat);
empathy_debug (DEBUG_DOMAIN, "Finalized: %p", object);
DEBUG ("Finalized: %p", object);
g_slist_foreach (priv->sent_messages, (GFunc) g_free, NULL);
g_slist_free (priv->sent_messages);
......
......@@ -26,11 +26,10 @@
#include <gconf/gconf-client.h>
#include <libempathy/empathy-debug.h>
#include "empathy-conf.h"
#define DEBUG_DOMAIN "Config"
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
#define EMPATHY_CONF_ROOT "/apps/empathy"
#define DESKTOP_INTERFACE_ROOT "/desktop/gnome/interface"
......@@ -131,7 +130,7 @@ empathy_conf_set_int (EmpathyConf *conf,
g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
empathy_debug (DEBUG_DOMAIN, "Setting int:'%s' to %d", key, value);
DEBUG ("Setting int:'%s' to %d", key, value);
priv = GET_PRIV (conf);
......@@ -177,8 +176,8 @@ empathy_conf_set_bool (EmpathyConf *conf,
g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
empathy_debug (DEBUG_DOMAIN, "Setting bool:'%s' to %d ---> %s",
key, value, value ? "true" : "false");
DEBUG ("Setting bool:'%s' to %d ---> %s", key, value,
value ? "true" : "false");
priv = GET_PRIV (conf);
......@@ -224,8 +223,7 @@ empathy_conf_set_string (EmpathyConf *conf,
g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
empathy_debug (DEBUG_DOMAIN, "Setting string:'%s' to '%s'",
key, value);
DEBUG ("Setting string:'%s' to '%s'", key, value);
priv = GET_PRIV (conf);
......
......@@ -31,13 +31,13 @@
#include <gtk/gtk.h>
#include <telepathy-glib/util.h>
#include <libempathy/empathy-debug.h>
#include "empathy-contact-list-store.h"
#include "empathy-ui-utils.h"
#include "empathy-gtk-enum-types.h"
#define DEBUG_DOMAIN "ContactListStore"
#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
#include <libempathy/empathy-debug.h>
/* Active users are those which have recently changed state
* (e.g. online, offline or from normal to a busy state).
......@@ -786,11 +786,10 @@ contact_list_store_members_changed_cb (EmpathyContactList *list_iface,
priv = GET_PRIV (store);
empathy_debug (DEBUG_DOMAIN,
"Contact %s (%d) %s",
empathy_contact_get_id (contact),
empathy_contact_get_handle (contact),
is_member ? "added" : "removed");
DEBUG ("Contact %s (%d) %s",
empathy_contact_get_id (contact),
empathy_contact_get_handle (contact),
is_member ? "added" : "removed");
if (is_member) {
g_signal_connect (contact, "notify::presence",
......@@ -831,9 +830,9 @@ contact_list_store_groups_changed_cb (EmpathyContactList *list_iface,
priv = GET_PRIV (store);
empathy_debug (DEBUG_DOMAIN, "Updating groups for contact %s (%d)",
empathy_contact_get_id (contact),
empathy_contact_get_handle (contact));
DEBUG ("Updating groups for contact %s (%d)",
empathy_contact_get_id (contact),
empathy_contact_get_handle (contact));
/* We do this to make sure the groups are correct, if not, we
* would have to check the groups already set up for each
......@@ -978,18 +977,16 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
if (!in_list && !should_be_in_list) {
/* Nothing to do. */
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:NO, should be:NO",
empathy_contact_get_name (contact));
DEBUG ("Contact:'%s' in list:NO, should be:NO",
empathy_contact_get_name (contact));
g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
g_list_free (iters);
return;
}
else if (in_list && !should_be_in_list) {
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:YES, should be:NO",
empathy_contact_get_name (contact));
DEBUG ("Contact:'%s' in list:YES, should be:NO",
empathy_contact_get_name (contact));
if (priv->show_active) {
do_remove = TRUE;
......@@ -997,28 +994,26 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
do_set_refresh = TRUE;
set_model = TRUE;
empathy_debug (DEBUG_DOMAIN, "Remove item (after timeout)");
DEBUG ("Remove item (after timeout)");
} else {
empathy_debug (DEBUG_DOMAIN, "Remove item (now)!");
DEBUG ("Remove item (now)!");
contact_list_store_remove_contact (store, contact);
}
}
else if (!in_list && should_be_in_list) {
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:NO, should be:YES",
empathy_contact_get_name (contact));
DEBUG ("Contact:'%s' in list:NO, should be:YES",
empathy_contact_get_name (contact));
contact_list_store_add_contact (store, contact);
if (priv->show_active) {
do_set_active = TRUE;
empathy_debug (DEBUG_DOMAIN, "Set active (contact added)");
DEBUG ("Set active (contact added)");
}
} else {
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:YES, should be:YES",
empathy_contact_get_name (contact));
DEBUG ("Contact:'%s' in list:YES, should be:YES",
empathy_contact_get_name (contact));
/* Get online state before. */
if (iters && g_list_length (iters) > 0) {
......@@ -1033,15 +1028,15 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
do_set_active = TRUE;
do_set_refresh = TRUE;
empathy_debug (DEBUG_DOMAIN, "Set active (contact updated %s)",
was_online ? "online -> offline" :
"offline -> online");
DEBUG ("Set active (contact updated %s)",
was_online ? "online -> offline" :
"offline -> online");
} else {
/* Was TRUE for presence updates. */
/* do_set_active = FALSE; */
do_set_refresh = TRUE;
empathy_debug (DEBUG_DOMAIN, "Set active (contact updated)");
DEBUG ("Set active (contact updated)");
}
}
......@@ -1096,9 +1091,8 @@ contact_list_store_contact_updated_cb (EmpathyContact *contact,
GParamSpec *param,
EmpathyContactListStore *store)
{
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' updated, checking roster is in sync...",
empathy_contact_get_name (contact));
DEBUG ("Contact:'%s' updated, checking roster is in sync...",
empathy_contact_get_name (contact));
contact_list_store_contact_update (store, contact);
}
......@@ -1124,7 +1118,7 @@ contact_list_store_contact_set_active (EmpathyContactListStore *store,
EMPATHY_CONTACT_LIST_STORE_COL_IS_ACTIVE, active,
-1);
empathy_debug (DEBUG_DOMAIN, "Set item %s", active ? "active" : "inactive");
DEBUG ("Set item %s", active ? "active" : "inactive");
if (set_changed) {
path = gtk_tree_model_get_path (model, l->data);
......@@ -1145,10 +1139,9 @@ contact_list_store_contact_active_new (EmpathyContactListStore *store,
{
ShowActiveData *data;
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' now active, and %s be removed",
empathy_contact_get_name (contact),
remove ? "WILL" : "WILL NOT");
DEBUG ("Contact:'%s' now active, and %s be removed",
empathy_contact_get_name (contact),
remove ? "WILL" : "WILL NOT");
data = g_slice_new0 (ShowActiveData);
......@@ -1178,15 +1171,13 @@ contact_list_store_contact_active_cb (ShowActiveData *data)
if (data->remove &&
!priv->show_offline &&
!empathy_contact_is_online (data->contact)) {
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' active timeout, removing item",
empathy_contact_get_name (data->contact));
DEBUG ("Contact:'%s' active timeout, removing item",
empathy_contact_get_name (data->contact));
contact_list_store_remove_contact (data->store, data->contact);
}
empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' no longer active",
empathy_contact_get_name (data->contact));
DEBUG ("Contact:'%s' no longer active",
empathy_contact_get_name (data->contact));
contact_list_store_contact_set_active (data->store,
data->contact,
......
......@@ -36,7 +36,6 @@
#include <libempathy/empathy-contact-factory.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-contact-groups.h>
#include <libempathy/empathy-debug.h>