[nautilus] window: add debug messages for pane closing



commit 269c6b23cf2b97f74a8c7c2654221be491b60cf4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 29 01:13:21 2011 -0400

    window: add debug messages for pane closing

 src/nautilus-window-pane.c |    6 ++++++
 src/nautilus-window.c      |    9 +++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-pane.c b/src/nautilus-window-pane.c
index 569c8c2..30a7d4d 100644
--- a/src/nautilus-window-pane.c
+++ b/src/nautilus-window-pane.c
@@ -40,6 +40,9 @@
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-entry.h>
 
+#define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW
+#include <libnautilus-private/nautilus-debug.h>
+
 G_DEFINE_TYPE (NautilusWindowPane, nautilus_window_pane,
 	       GTK_TYPE_BOX)
 
@@ -919,6 +922,8 @@ nautilus_window_pane_slot_close (NautilusWindowPane *pane,
 {
 	NautilusWindowSlot *next_slot;
 
+	DEBUG ("Requesting to remove slot %p from pane %p", slot, pane);
+
 	if (pane->window) {
 		NautilusWindow *window;
 
@@ -948,6 +953,7 @@ nautilus_window_pane_slot_close (NautilusWindowPane *pane,
 				DEBUG ("Calling set_active_pane, new slot %p", new_pane->active_slot);
 				nautilus_window_set_active_pane (window, new_pane);
 			} else {
+				DEBUG ("Last slot removed from the last pane, close the window");
 				nautilus_window_close (window);
 			}
 		}
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 47c3d24..39c3bf9 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -717,6 +717,8 @@ nautilus_window_destroy (GtkWidget *object)
 
 	window = NAUTILUS_WINDOW (object);
 
+	DEBUG ("Destroying window");
+
 	window->details->content_paned = NULL;
 	window->details->split_view_hpane = NULL;
 
@@ -921,6 +923,8 @@ nautilus_window_close_slot (NautilusWindowSlot *slot)
 	g_assert (NAUTILUS_IS_WINDOW_PANE(slot->pane));
 	g_assert (g_list_find (slot->pane->slots, slot) != NULL);
 
+	DEBUG ("Closing slot %p", slot);
+
 	/* save pane because slot is not valid anymore after this call */
 	pane = slot->pane;
 	notebook = GTK_NOTEBOOK (pane->notebook);
@@ -971,6 +975,9 @@ nautilus_window_set_active_pane (NautilusWindow *window,
 				 NautilusWindowPane *new_pane)
 {
 	g_assert (NAUTILUS_IS_WINDOW_PANE (new_pane));
+
+	DEBUG ("Setting new pane %p as active", new_pane);
+
 	if (new_pane->active_slot) {
 		nautilus_window_set_active_slot (window, new_pane->active_slot);
 	} else if (new_pane != window->details->active_pane) {
@@ -988,6 +995,8 @@ nautilus_window_set_active_slot (NautilusWindow *window, NautilusWindowSlot *new
 
 	g_assert (NAUTILUS_IS_WINDOW (window));
 
+	DEBUG ("Setting new slot %p as active", new_slot);
+
 	if (new_slot) {
 		g_assert (NAUTILUS_IS_WINDOW_SLOT (new_slot));
 		g_assert (NAUTILUS_IS_WINDOW_PANE (new_slot->pane));



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