[nautilus] view: don't assert on window slot signal callback ordering



commit f6bbf0f111f344276472aaa54072bf99ae7be9b2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 29 01:02:32 2011 -0400

    view: don't assert on window slot signal callback ordering
    
    There's no reason to assert on the fact that inactive and active signals
    will be always emitted in alternate state. If this doesn't happen, just
    return.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652320

 src/nautilus-view.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 399e8f6..295b1db 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2375,7 +2375,10 @@ static void
 slot_active (NautilusWindowSlot *slot,
 	     NautilusView *view)
 {
-	g_assert (!view->details->active);
+	if (view->details->active) {
+		return;
+	}
+
 	view->details->active = TRUE;
 
 	nautilus_view_merge_menus (view);
@@ -2386,8 +2389,10 @@ static void
 slot_inactive (NautilusWindowSlot *slot,
 	       NautilusView *view)
 {
-	g_assert (view->details->active ||
-		  gtk_widget_get_parent (GTK_WIDGET (view)) == NULL);
+	if (!view->details->active) {
+		return;
+	}
+
 	view->details->active = FALSE;
 
 	nautilus_view_unmerge_menus (view);



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