[gnome-photos/wip/rishi/collection: 7/15] item-manager: Assert a few more invariants when going back from PREVIEW
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 7/15] item-manager: Assert a few more invariants when going back from PREVIEW
- Date: Fri, 28 Jul 2017 13:01:42 +0000 (UTC)
commit 235270e249881a042215c743294982176d6476e7
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Jul 28 14:08:31 2017 +0200
item-manager: Assert a few more invariants when going back from PREVIEW
src/photos-item-manager.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index c11c7c6..aa09582 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -1329,11 +1329,16 @@ photos_mode_controller_go_back (PhotosModeController *self)
case PHOTOS_WINDOW_MODE_COLLECTIONS:
case PHOTOS_WINDOW_MODE_FAVORITES:
case PHOTOS_WINDOW_MODE_OVERVIEW:
- case PHOTOS_WINDOW_MODE_PREVIEW:
case PHOTOS_WINDOW_MODE_SEARCH:
g_return_if_fail (old_mode != PHOTOS_WINDOW_MODE_PREVIEW);
break;
+ case PHOTOS_WINDOW_MODE_PREVIEW:
+ g_return_if_fail (PHOTOS_IS_BASE_ITEM (self->active_object));
+ g_return_if_fail (self->active_object != (GObject *) self->active_collection);
+ g_return_if_fail (old_mode != PHOTOS_WINDOW_MODE_PREVIEW);
+ break;
+
case PHOTOS_WINDOW_MODE_NONE:
default:
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]