[nautilus/gnome-3-2] window: add debug messages for pane closing



commit f28821eb53b292e95cfde21a7e870f6178d4d78b
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 ab6bc8d..6cda426 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,
 	       G_TYPE_OBJECT)
 
@@ -926,6 +929,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;
 
@@ -955,6 +960,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 2518e8d..68dc93f 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -718,6 +718,8 @@ nautilus_window_destroy (GtkWidget *object)
 
 	window = NAUTILUS_WINDOW (object);
 
+	DEBUG ("Destroying window");
+
 	window->details->content_paned = NULL;
 	window->details->split_view_hpane = NULL;
 
@@ -927,6 +929,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);
@@ -977,6 +981,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) {
@@ -994,6 +1001,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]