[gnome-photos/wip/rishi/fullscreen: 2/5] embed, mode-controller: Rearrange the code for subsequent fixes



commit e49701c0e58ea6beebe4ab796e6c5cfa7658bc93
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Oct 6 17:11:56 2015 +0200

    embed, mode-controller: Rearrange the code for subsequent fixes
    
    This keeps the code in sync with gnome-documents and will make it
    easier to understand future changes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756131

 src/photos-embed.c           |    2 --
 src/photos-mode-controller.c |    9 ++++-----
 2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index ee205bb..0d113e2 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -273,8 +273,6 @@ photos_embed_load_started (PhotosEmbed *self, PhotosBaseItem *item, GCancellable
     }
 
   photos_mode_controller_set_window_mode (priv->mode_cntrlr, PHOTOS_WINDOW_MODE_PREVIEW);
-  photos_mode_controller_set_can_fullscreen (priv->mode_cntrlr, TRUE);
-
   photos_main_toolbar_set_cancellable (PHOTOS_MAIN_TOOLBAR (priv->toolbar), cancellable);
 
   photos_embed_clear_load_timer (self);
diff --git a/src/photos-mode-controller.c b/src/photos-mode-controller.c
index 85a46e4..bd375ae 100644
--- a/src/photos-mode-controller.c
+++ b/src/photos-mode-controller.c
@@ -1,6 +1,6 @@
 /*
  * Photos - access, organize and share your photos on GNOME
- * Copyright © 2012, 2013, 2014 Red Hat, Inc.
+ * Copyright © 2012, 2013, 2014, 2015 Red Hat, Inc.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -247,10 +247,9 @@ photos_mode_controller_set_window_mode (PhotosModeController *self, PhotosWindow
   if (old_mode == mode)
     return;
 
-  if (mode == PHOTOS_WINDOW_MODE_OVERVIEW
-      || mode == PHOTOS_WINDOW_MODE_COLLECTIONS
-      || mode == PHOTOS_WINDOW_MODE_FAVORITES
-      || mode == PHOTOS_WINDOW_MODE_SEARCH)
+  if (mode == PHOTOS_WINDOW_MODE_PREVIEW)
+    photos_mode_controller_set_can_fullscreen (self, TRUE);
+  else
     photos_mode_controller_set_can_fullscreen (self, FALSE);
 
   g_queue_push_head (priv->history, GINT_TO_POINTER (old_mode));


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