[gnome-photos/wip/rishi/edit-mode: 4/10] embed: Don't reset the PreviewView when returning from edit mode
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/edit-mode: 4/10] embed: Don't reset the PreviewView when returning from edit mode
- Date: Thu, 14 May 2015 09:13:02 +0000 (UTC)
commit 194c7d6c87e4238479b4d69d39daaaedc05b1814
Author: Debarshi Ray <debarshir gnome org>
Date: Thu May 7 08:36:50 2015 +0200
embed: Don't reset the PreviewView when returning from edit mode
src/photos-embed.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index e3467b1..b239ca5 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -201,7 +201,7 @@ photos_embed_activate_result (PhotosEmbed *self)
static void
-photos_embed_prepare_for_preview (PhotosEmbed *self)
+photos_embed_prepare_for_preview (PhotosEmbed *self, gboolean reset)
{
PhotosEmbedPrivate *priv = self->priv;
@@ -209,8 +209,10 @@ photos_embed_prepare_for_preview (PhotosEmbed *self)
* ErrorHandler
*/
+ if (reset)
+ photos_preview_view_set_node (PHOTOS_PREVIEW_VIEW (priv->preview), NULL);
+
photos_spinner_box_stop (PHOTOS_SPINNER_BOX (priv->spinner_box));
- photos_preview_view_set_node (PHOTOS_PREVIEW_VIEW (priv->preview), NULL);
gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), "preview");
}
@@ -539,7 +541,7 @@ photos_embed_window_mode_changed (PhotosModeController *mode_cntrlr,
goto set_toolbar_model;
case PHOTOS_WINDOW_MODE_PREVIEW:
- photos_embed_prepare_for_preview (self);
+ photos_embed_prepare_for_preview (self, old_mode != PHOTOS_WINDOW_MODE_EDIT);
break;
case PHOTOS_WINDOW_MODE_SEARCH:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]