aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-01 05:44:38 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-01 05:44:38 +0800
commit692886962aec6022d4fab9cdbd9867f2acd7f75c (patch)
treef0db8cc8325ed3b377d5663c7377db6967e41e8b /libempathy-gtk
parentfb06002dc6fcf523f22f671aeaf22054515e926a (diff)
downloadgsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.tar
gsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.tar.gz
gsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.tar.bz2
gsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.tar.lz
gsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.tar.xz
gsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.tar.zst
gsoc2013-empathy-692886962aec6022d4fab9cdbd9867f2acd7f75c.zip
Make use of tp-glib debug system.
svn path=/trunk/; revision=1066
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c21
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.c3
-rw-r--r--libempathy-gtk/empathy-account-widget.c29
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c22
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c13
-rw-r--r--libempathy-gtk/empathy-avatar-image.c4
-rw-r--r--libempathy-gtk/empathy-cell-renderer-activatable.c4
-rw-r--r--libempathy-gtk/empathy-chat-view.c11
-rw-r--r--libempathy-gtk/empathy-chat.c44
-rw-r--r--libempathy-gtk/empathy-conf.c14
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c77
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c23
-rw-r--r--libempathy-gtk/empathy-contact-menu.c2
-rw-r--r--libempathy-gtk/empathy-geometry.c18
-rw-r--r--libempathy-gtk/empathy-irc-network-dialog.c3
-rw-r--r--libempathy-gtk/empathy-log-window.c17
-rw-r--r--libempathy-gtk/empathy-new-message-dialog.c3
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c3
-rw-r--r--libempathy-gtk/empathy-smiley-manager.c4
-rw-r--r--libempathy-gtk/empathy-spell.c23
-rw-r--r--libempathy-gtk/empathy-spell.h2
-rw-r--r--libempathy-gtk/empathy-theme-boxes.c7
-rw-r--r--libempathy-gtk/empathy-theme-irc.c3
-rw-r--r--libempathy-gtk/empathy-theme.c3
-rw-r--r--libempathy-gtk/empathy-ui-utils.c17
25 files changed, 152 insertions, 218 deletions
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index 64325f970..242085ccc 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -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);
diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c
index d07abc0c0..28832e0d7 100644
--- a/libempathy-gtk/empathy-account-widget-sip.c
+++ b/libempathy-gtk/empathy-account-widget-sip.c
@@ -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;
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index f0668ee97..5116841c1 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -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) {
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index b57766521..e48aaab31 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -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,
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 99132b8a1..c6021b73f 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -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);
}
diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c
index 2aeeba458..17ab19091 100644
--- a/libempathy-gtk/empathy-avatar-image.c
+++ b/libempathy-gtk/empathy-avatar-image.c
@@ -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
diff --git a/libempathy-gtk/empathy-cell-renderer-activatable.c b/libempathy-gtk/empathy-cell-renderer-activatable.c
index 6cdce0d28..fc218e88b 100644
--- a/libempathy-gtk/empathy-cell-renderer-activatable.c
+++ b/libempathy-gtk/empathy-cell-renderer-activatable.c
@@ -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,
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index f84ae9e16..491de2269 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -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) {
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 4a7de774c..1b2ed9d43 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -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);
diff --git a/libempathy-gtk/empathy-conf.c b/libempathy-gtk/empathy-conf.c
index 1ec3feeb4..0ecb8e166 100644
--- a/libempathy-gtk/empathy-conf.c
+++ b/libempathy-gtk/empathy-conf.c
@@ -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);
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index fa96eb492..e18675295 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -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,
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index c4dbbf6af..1a9890b79 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -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>
#include <libempathy/empathy-utils.h>
#include "empathy-contact-list-view.h"
@@ -49,7 +48,8 @@
#include "empathy-gtk-enum-types.h"
#include "empathy-gtk-marshal.h"
-#define DEBUG_DOMAIN "ContactListView"
+#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
+#include <libempathy/empathy-debug.h>
/* Flashing delay for icons (milliseconds). */
#define FLASH_TIMEOUT 500
@@ -141,10 +141,10 @@ contact_list_view_drag_data_received (GtkWidget *widget,
priv = GET_PRIV (widget);
id = (const gchar*) selection->data;
- empathy_debug (DEBUG_DOMAIN, "Received %s%s drag & drop contact from roster with id:'%s'",
- context->action == GDK_ACTION_MOVE ? "move" : "",
- context->action == GDK_ACTION_COPY ? "copy" : "",
- id);
+ DEBUG ("Received %s%s drag & drop contact from roster with id:'%s'",
+ context->action == GDK_ACTION_MOVE ? "move" : "",
+ context->action == GDK_ACTION_COPY ? "copy" : "",
+ id);
strv = g_strsplit (id, "/", 2);
factory = empathy_contact_factory_new ();
@@ -159,7 +159,7 @@ contact_list_view_drag_data_received (GtkWidget *widget,
g_strfreev (strv);
if (!contact) {
- empathy_debug (DEBUG_DOMAIN, "No contact found associated with drag & drop");
+ DEBUG ("No contact found associated with drag & drop");
return;
}
@@ -190,11 +190,10 @@ contact_list_view_drag_data_received (GtkWidget *widget,
gtk_tree_path_free (path);
}
- empathy_debug (DEBUG_DOMAIN,
- "contact %s (%d) dragged from '%s' to '%s'",
- empathy_contact_get_id (contact),
- empathy_contact_get_handle (contact),
- old_group, new_group);
+ DEBUG ("contact %s (%d) dragged from '%s' to '%s'",
+ empathy_contact_get_id (contact),
+ empathy_contact_get_handle (contact),
+ old_group, new_group);
list = empathy_contact_list_store_get_list_iface (priv->store);
if (new_group) {
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index b06bcd3e4..275729f98 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -34,8 +34,6 @@
#include "empathy-log-window.h"
#include "empathy-contact-dialogs.h"
-#define DEBUG_DOMAIN "ContactMenu"
-
GtkWidget *
empathy_contact_menu_new (EmpathyContact *contact,
EmpathyContactFeatureFlags features)
diff --git a/libempathy-gtk/empathy-geometry.c b/libempathy-gtk/empathy-geometry.c
index c8bbd2b21..b3bd09ca1 100644
--- a/libempathy-gtk/empathy-geometry.c
+++ b/libempathy-gtk/empathy-geometry.c
@@ -29,11 +29,10 @@
#include <glib.h>
#include <gdk/gdk.h>
-#include <libempathy/empathy-debug.h>
-
#include "empathy-geometry.h"
-#define DEBUG_DOMAIN "Geometry"
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include <libempathy/empathy-debug.h>
#define GEOMETRY_DIR_CREATE_MODE (S_IRUSR | S_IWUSR | S_IXUSR)
#define GEOMETRY_FILE_CREATE_MODE (S_IRUSR | S_IWUSR)
@@ -52,7 +51,7 @@ geometry_get_filename (void)
dir = g_build_filename (g_get_home_dir (), ".gnome2", PACKAGE_NAME, NULL);
if (!g_file_test (dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
- empathy_debug (DEBUG_DOMAIN, "Creating directory:'%s'", dir);
+ DEBUG ("Creating directory:'%s'", dir);
g_mkdir_with_parents (dir, GEOMETRY_DIR_CREATE_MODE);
}
@@ -79,8 +78,8 @@ empathy_geometry_save (const gchar *name,
gsize length;
gchar *str;
- empathy_debug (DEBUG_DOMAIN, "Saving window geometry: x:%d, y:%d, w:%d, h:%d\n",
- x, y, w, h);
+ DEBUG ("Saving window geometry: x:%d, y:%d, w:%d, h:%d\n",
+ x, y, w, h);
screen = gdk_screen_get_default ();
max_width = gdk_screen_get_width (screen);
@@ -174,11 +173,8 @@ empathy_geometry_load (const gchar *name,
g_free (str);
}
- empathy_debug (DEBUG_DOMAIN, "Loading window geometry: x:%d, y:%d, w:%d, h:%d\n",
- x ? *x : -1,
- y ? *y : -1,
- w ? *w : -1,
- h ? *h : -1);
+ DEBUG ("Loading window geometry: x:%d, y:%d, w:%d, h:%d\n",
+ x ? *x : -1, y ? *y : -1, w ? *w : -1, h ? *h : -1);
g_free (filename);
g_key_file_free (key_file);
diff --git a/libempathy-gtk/empathy-irc-network-dialog.c b/libempathy-gtk/empathy-irc-network-dialog.c
index 7f352f86d..7c6e27d30 100644
--- a/libempathy-gtk/empathy-irc-network-dialog.c
+++ b/libempathy-gtk/empathy-irc-network-dialog.c
@@ -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-ui-utils.h"
@@ -40,8 +39,6 @@
#include "empathy-irc-network-dialog.h"
-#define DEBUG_DOMAIN "AccountWidgetIRC"
-
typedef struct {
EmpathyIrcNetwork *network;
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 7441911cb..f1d958a30 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -35,7 +35,6 @@
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-chatroom.h>
#include <libempathy/empathy-message.h>
-#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-time.h>
@@ -44,7 +43,8 @@
#include "empathy-chat-view.h"
#include "empathy-ui-utils.h"
-#define DEBUG_DOMAIN "LogWindow"
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include <libempathy/empathy-debug.h>
typedef struct {
GtkWidget *window;
@@ -895,7 +895,7 @@ log_window_chats_get_messages (EmpathyLogWindow *window,
}
- empathy_debug (DEBUG_DOMAIN, "Marking date:'%s'", str);
+ DEBUG ("Marking date:'%s'", str);
gtk_calendar_mark_day (GTK_CALENDAR (window->calendar_chats), day);
if (l->next) {
@@ -986,7 +986,7 @@ log_window_calendar_chats_day_selected_cb (GtkWidget *calendar,
date = g_strdup_printf ("%4.4d%2.2d%2.2d", year, month, day);
- empathy_debug (DEBUG_DOMAIN, "Currently selected date is:'%s'", date);
+ DEBUG ("Currently selected date is:'%s'", date);
log_window_chats_get_messages (window, date);
@@ -1010,7 +1010,7 @@ log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
if (!log_window_chats_get_selected (window, &account,
&chat_id, &is_chatroom)) {
- empathy_debug (DEBUG_DOMAIN, "No chat selected to get dates for...");
+ DEBUG ("No chat selected to get dates for...");
return;
}
@@ -1042,7 +1042,7 @@ log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
sscanf (str, "%4d%2d%2d", &year, &month, &day);
if (year == year_selected && month == month_selected) {
- empathy_debug (DEBUG_DOMAIN, "Marking date:'%s'", str);
+ DEBUG ("Marking date:'%s'", str);
gtk_calendar_mark_day (GTK_CALENDAR (window->calendar_chats), day);
}
}
@@ -1050,9 +1050,8 @@ log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
g_list_foreach (dates, (GFunc) g_free, NULL);
g_list_free (dates);
- empathy_debug (DEBUG_DOMAIN,
- "Currently showing month %d and year %d",
- month_selected, year_selected);
+ DEBUG ("Currently showing month %d and year %d", month_selected,
+ year_selected);
}
static void
diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c
index 8a8d937c4..b07f13e21 100644
--- a/libempathy-gtk/empathy-new-message-dialog.c
+++ b/libempathy-gtk/empathy-new-message-dialog.c
@@ -32,7 +32,6 @@
#include <libmissioncontrol/mission-control.h>
#include <libempathy/empathy-contact-factory.h>
-#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-ui-utils.h>
@@ -40,8 +39,6 @@
#include "empathy-new-message-dialog.h"
#include "empathy-account-chooser.h"
-#define DEBUG_DOMAIN "NewMessageDialog"
-
typedef struct {
GtkWidget *dialog;
GtkWidget *table_contact;
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 5d442bd36..d22eee993 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -36,7 +36,6 @@
#include <libempathy/empathy-idle.h>
#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-status-presets.h>
#include "empathy-ui-utils.h"
@@ -45,8 +44,6 @@
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooserPriv))
-#define DEBUG_DOMAIN "PresenceChooser"
-
/* Flashing delay for icons (milliseconds). */
#define FLASH_TIMEOUT 500
diff --git a/libempathy-gtk/empathy-smiley-manager.c b/libempathy-gtk/empathy-smiley-manager.c
index d32570bb3..7d2a744a1 100644
--- a/libempathy-gtk/empathy-smiley-manager.c
+++ b/libempathy-gtk/empathy-smiley-manager.c
@@ -24,16 +24,12 @@
#include <string.h>
-#include <libempathy/empathy-debug.h>
-
#include "empathy-smiley-manager.h"
#include "empathy-ui-utils.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
EMPATHY_TYPE_SMILEY_MANAGER, EmpathySmileyManagerPriv))
-#define DEBUG_DOMAIN "SmileyManager"
-
typedef struct {
gunichar c;
GdkPixbuf *pixbuf;
diff --git a/libempathy-gtk/empathy-spell.c b/libempathy-gtk/empathy-spell.c
index 422dcfb10..c1c630354 100644
--- a/libempathy-gtk/empathy-spell.c
+++ b/libempathy-gtk/empathy-spell.c
@@ -32,12 +32,11 @@
#include <enchant.h>
#endif
-#include <libempathy/empathy-debug.h>
-
#include "empathy-spell.h"
#include "empathy-conf.h"
-#define DEBUG_DOMAIN "Spell"
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include <libempathy/empathy-debug.h>
#ifdef HAVE_ENCHANT
@@ -166,7 +165,7 @@ spell_notify_languages_cb (EmpathyConf *conf,
{
GList *l;
- empathy_debug (DEBUG_DOMAIN, "Resetting languages due to config change");
+ DEBUG ("Resetting languages due to config change");
/* We just reset the languages list. */
for (l = languages; l; l = l->next) {
@@ -213,7 +212,7 @@ spell_setup_languages (void)
while (strv && strv[i]) {
SpellLanguage *lang;
- empathy_debug (DEBUG_DOMAIN, "Setting up language:'%s'", strv[i]);
+ DEBUG ("Setting up language:'%s'", strv[i]);
lang = g_slice_new0 (SpellLanguage);
@@ -310,7 +309,7 @@ empathy_spell_check (const gchar *word)
spell_setup_languages ();
if (!languages) {
- empathy_debug (DEBUG_DOMAIN, "No languages to check against");
+ DEBUG ("No languages to check against");
return TRUE;
}
@@ -322,7 +321,7 @@ empathy_spell_check (const gchar *word)
if (digit) {
/* We don't spell check digits. */
- empathy_debug (DEBUG_DOMAIN, "Not spell checking word:'%s', it is all digits", word);
+ DEBUG ("Not spell checking word:'%s', it is all digits", word);
return TRUE;
}
@@ -382,7 +381,7 @@ gboolean
empathy_spell_supported (void)
{
if (g_getenv ("EMPATHY_SPELL_DISABLED")) {
- empathy_debug (DEBUG_DOMAIN, "EMPATHY_SPELL_DISABLE env variable defined");
+ DEBUG ("EMPATHY_SPELL_DISABLE env variable defined");
return FALSE;
}
@@ -400,7 +399,7 @@ empathy_spell_supported (void)
GList *
empathy_spell_get_suggestions (const gchar *word)
{
- empathy_debug (DEBUG_DOMAIN, "Support disabled, could not get suggestions");
+ DEBUG ("Support disabled, could not get suggestions");
return NULL;
}
@@ -408,7 +407,7 @@ empathy_spell_get_suggestions (const gchar *word)
gboolean
empathy_spell_check (const gchar *word)
{
- empathy_debug (DEBUG_DOMAIN, "Support disabled, could not check spelling");
+ DEBUG ("Support disabled, could not check spelling");
return TRUE;
}
@@ -416,7 +415,7 @@ empathy_spell_check (const gchar *word)
const gchar *
empathy_spell_get_language_name (const gchar *lang)
{
- empathy_debug (DEBUG_DOMAIN, "Support disabled, could not get language name");
+ DEBUG ("Support disabled, could not get language name");
return NULL;
}
@@ -424,7 +423,7 @@ empathy_spell_get_language_name (const gchar *lang)
GList *
empathy_spell_get_language_codes (void)
{
- empathy_debug (DEBUG_DOMAIN, "Support disabled, could not get language codes");
+ DEBUG ("Support disabled, could not get language codes");
return NULL;
}
diff --git a/libempathy-gtk/empathy-spell.h b/libempathy-gtk/empathy-spell.h
index 4f483cf35..797997c0a 100644
--- a/libempathy-gtk/empathy-spell.h
+++ b/libempathy-gtk/empathy-spell.h
@@ -24,6 +24,8 @@
#ifndef __EMPATHY_SPELL_H__
#define __EMPATHY_SPELL_H__
+#include <glib.h>
+
G_BEGIN_DECLS
gboolean empathy_spell_supported (void);
diff --git a/libempathy-gtk/empathy-theme-boxes.c b/libempathy-gtk/empathy-theme-boxes.c
index 94f7abaf9..a2466cdcf 100644
--- a/libempathy-gtk/empathy-theme-boxes.c
+++ b/libempathy-gtk/empathy-theme-boxes.c
@@ -25,12 +25,11 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libempathy/empathy-debug.h>
-
#include "empathy-ui-utils.h"
#include "empathy-theme-boxes.h"
-#define DEBUG_DOMAIN "FancyTheme"
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include <libempathy/empathy-debug.h>
#define MARGIN 4
#define HEADER_PADDING 2
@@ -549,7 +548,7 @@ theme_boxes_maybe_append_header (EmpathyTheme *theme,
last_contact = empathy_chat_view_get_last_contact (view);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
- empathy_debug (DEBUG_DOMAIN, "Maybe add fancy header");
+ DEBUG ("Maybe add fancy header");
/* Only insert a header if the previously inserted block is not the same
* as this one. This catches all the different cases:
diff --git a/libempathy-gtk/empathy-theme-irc.c b/libempathy-gtk/empathy-theme-irc.c
index 07ee6781b..52ebb18fa 100644
--- a/libempathy-gtk/empathy-theme-irc.c
+++ b/libempathy-gtk/empathy-theme-irc.c
@@ -21,14 +21,11 @@
#include "config.h"
#include <glib/gi18n.h>
-#include <libempathy/empathy-debug.h>
#include "empathy-chat.h"
#include "empathy-ui-utils.h"
#include "empathy-theme-irc.h"
-#define DEBUG_DOMAIN "Theme"
-
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_THEME_IRC, EmpathyThemeIrcPriv))
typedef struct _EmpathyThemeIrcPriv EmpathyThemeIrcPriv;
diff --git a/libempathy-gtk/empathy-theme.c b/libempathy-gtk/empathy-theme.c
index f33126a95..b3638476c 100644
--- a/libempathy-gtk/empathy-theme.c
+++ b/libempathy-gtk/empathy-theme.c
@@ -24,7 +24,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
#include "empathy-chat.h"
@@ -32,8 +31,6 @@
#include "empathy-theme.h"
#include "empathy-smiley-manager.h"
-#define DEBUG_DOMAIN "Theme"
-
/* Number of seconds between timestamps when using normal mode, 5 minutes. */
#define TIMESTAMP_INTERVAL 300
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 6ac6ebd9f..bc4d7597b 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -40,12 +40,11 @@
#include <libmissioncontrol/mc-profile.h>
-#include <libempathy/empathy-debug.h>
-
#include "empathy-ui-utils.h"
#include "empathy-images.h"
-#define DEBUG_DOMAIN "UiUtils"
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include <libempathy/empathy-debug.h>
struct SizeData {
gint width;
@@ -64,7 +63,7 @@ get_glade_file (const gchar *filename,
const char *name;
GtkWidget **widget_ptr;
- empathy_debug (DEBUG_DOMAIN, "Loading glade file %s", filename);
+ DEBUG ("Loading glade file %s", filename);
gui = glade_xml_new (filename, root, domain);
@@ -259,15 +258,15 @@ empathy_pixbuf_from_data (gchar *data,
loader = gdk_pixbuf_loader_new ();
if (!gdk_pixbuf_loader_write (loader, data, data_size, &error)) {
- empathy_debug (DEBUG_DOMAIN, "Failed to write to pixbuf loader: %s",
- error ? error->message : "No error given");
+ DEBUG ("Failed to write to pixbuf loader: %s",
+ error ? error->message : "No error given");
g_clear_error (&error);
g_object_unref (loader);
return NULL;
}
if (!gdk_pixbuf_loader_close (loader, &error)) {
- empathy_debug (DEBUG_DOMAIN, "Failed to close pixbuf loader: %s",
- error ? error->message : "No error given");
+ DEBUG ("Failed to close pixbuf loader: %s",
+ error ? error->message : "No error given");
g_clear_error (&error);
g_object_unref (loader);
return NULL;
@@ -527,7 +526,7 @@ empathy_pixbuf_from_icon_name (const gchar *icon_name,
0,
&error);
if (error) {
- empathy_debug (DEBUG_DOMAIN, "Error loading icon: %s", error->message);
+ DEBUG ("Error loading icon: %s", error->message);
g_clear_error (&error);
}