[eog] EogWindow: Avoid starting up fullscreen with an empty model



commit d71cdeab35cf881017b356426844670e7318299f
Author: Felix Riemann <friemann gnome org>
Date:   Sun Dec 8 15:16:01 2019 +0100

    EogWindow: Avoid starting up fullscreen with an empty model
    
    Leaving fullscreen may become difficult in this case as the
    fullscreen/slideshow controls could end up disabled.
    
    Fixes #66.

 src/eog-window.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 3a23f777..3c7c84d4 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -5248,6 +5248,14 @@ eog_job_model_cb (EogJobModel *job, gpointer data)
        if (n_images == 0) {
                gint n_files;
 
+               /* Avoid starting up fullscreen with an empty model as
+                * fullscreen controls might end up disabled */
+               if (priv->status == EOG_WINDOW_STATUS_INIT &&
+                   (priv->mode == EOG_WINDOW_MODE_FULLSCREEN
+                    || priv->mode == EOG_WINDOW_MODE_SLIDESHOW)) {
+                       eog_window_stop_fullscreen (window,
+                               priv->mode == EOG_WINDOW_MODE_SLIDESHOW);
+               }
                priv->status = EOG_WINDOW_STATUS_NORMAL;
                update_action_groups_state (window);
 


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