[nautilus] dbus-manager: add DEBUG messages for NautilusDBusManager
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] dbus-manager: add DEBUG messages for NautilusDBusManager
- Date: Thu, 2 Dec 2010 15:23:53 +0000 (UTC)
commit 8ee6c67b5fe1b12999c2e2f4c7f42d85a497c233
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Dec 2 16:23:19 2010 +0100
dbus-manager: add DEBUG messages for NautilusDBusManager
libnautilus-private/nautilus-dbus-manager.c | 14 +++++++++++---
libnautilus-private/nautilus-debug.c | 1 +
libnautilus-private/nautilus-debug.h | 15 ++++++++-------
3 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/libnautilus-private/nautilus-dbus-manager.c b/libnautilus-private/nautilus-dbus-manager.c
index d8e4f40..bd979d2 100644
--- a/libnautilus-private/nautilus-dbus-manager.c
+++ b/libnautilus-private/nautilus-dbus-manager.c
@@ -27,6 +27,9 @@
#include "nautilus-file-operations.h"
+#define DEBUG_FLAG NAUTILUS_DEBUG_DBUS
+#include "nautilus-debug.h"
+
#include <gio/gio.h>
static const gchar introspection_xml[] =
@@ -102,7 +105,7 @@ trigger_copy_file_operation (const gchar **sources,
if (sources == NULL || sources[0] == NULL || destination == NULL)
{
- g_debug ("Called 'CopyURIs' with NULL arguments, discarding");
+ DEBUG ("Called 'CopyURIs' with NULL arguments, discarding");
return;
}
@@ -139,13 +142,16 @@ handle_method_call (GDBusConnection *connection,
const gchar **uris = NULL;
const gchar *destination_uri = NULL;
+ DEBUG ("Handle method, sender %s, object_path %s, interface %s, method %s",
+ sender, object_path, interface_name, method_name);
+
if (g_strcmp0 (method_name, "CopyURIs") == 0)
{
g_variant_get (parameters, "(^a&s&s)", &uris, &destination_uri);
trigger_copy_file_operation (uris, destination_uri);
- g_debug ("Called CopyURIs with dest %s and uri %s\n", destination_uri, uris[0]);
+ DEBUG ("Called CopyURIs with dest %s and uri %s\n", destination_uri, uris[0]);
goto out;
}
@@ -154,7 +160,7 @@ handle_method_call (GDBusConnection *connection,
{
trigger_empty_trash_operation ();
- g_debug ("Called EmptyTrash");
+ DEBUG ("Called EmptyTrash");
}
out:
@@ -177,6 +183,8 @@ bus_acquired_handler_cb (GDBusConnection *conn,
GDBusNodeInfo *introspection_data;
GError *error = NULL;
+ DEBUG ("Bus acquired at %s", name);
+
self->connection = g_object_ref (conn);
introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, &error);
diff --git a/libnautilus-private/nautilus-debug.c b/libnautilus-private/nautilus-debug.c
index b9071aa..d325a82 100644
--- a/libnautilus-private/nautilus-debug.c
+++ b/libnautilus-private/nautilus-debug.c
@@ -37,6 +37,7 @@ static gboolean initialized = FALSE;
static GDebugKey keys[] = {
{ "Application", NAUTILUS_DEBUG_APPLICATION },
+ { "DBus", NAUTILUS_DEBUG_DBUS },
{ "DirectoryView", NAUTILUS_DEBUG_DIRECTORY_VIEW },
{ "IconContainer", NAUTILUS_DEBUG_ICON_CONTAINER },
{ "ListView", NAUTILUS_DEBUG_LIST_VIEW },
diff --git a/libnautilus-private/nautilus-debug.h b/libnautilus-private/nautilus-debug.h
index becae88..630399b 100644
--- a/libnautilus-private/nautilus-debug.h
+++ b/libnautilus-private/nautilus-debug.h
@@ -34,13 +34,14 @@ G_BEGIN_DECLS
typedef enum {
NAUTILUS_DEBUG_APPLICATION = 1 << 1,
- NAUTILUS_DEBUG_DIRECTORY_VIEW = 1 << 2,
- NAUTILUS_DEBUG_ICON_CONTAINER = 1 << 3,
- NAUTILUS_DEBUG_LIST_VIEW = 1 << 4,
- NAUTILUS_DEBUG_MIME = 1 << 5,
- NAUTILUS_DEBUG_PLACES = 1 << 6,
- NAUTILUS_DEBUG_SMCLIENT = 1 << 7,
- NAUTILUS_DEBUG_WINDOW = 1 << 8,
+ NAUTILUS_DEBUG_DBUS = 1 << 2,
+ NAUTILUS_DEBUG_DIRECTORY_VIEW = 1 << 3,
+ NAUTILUS_DEBUG_ICON_CONTAINER = 1 << 4,
+ NAUTILUS_DEBUG_LIST_VIEW = 1 << 5,
+ NAUTILUS_DEBUG_MIME = 1 << 6,
+ NAUTILUS_DEBUG_PLACES = 1 << 7,
+ NAUTILUS_DEBUG_SMCLIENT = 1 << 8,
+ NAUTILUS_DEBUG_WINDOW = 1 << 9,
} DebugFlags;
void nautilus_debug_set_flags_from_env (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]