[eog] EogWindow: Always show image area and enabled bars
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogWindow: Always show image area and enabled bars
- Date: Fri, 22 May 2015 22:44:50 +0000 (UTC)
commit c80dcda164a2fad9f7f66ea8083b795ad26bdb09
Author: Felix Riemann <friemann gnome org>
Date: Sat May 23 00:42:03 2015 +0200
EogWindow: Always show image area and enabled bars
This might become necessary if the infobars are relayouted.
The collection bar stays hidden since it doesn't have a nice
appearance if empty.
https://bugzilla.gnome.org/show_bug.cgi?id=538279
src/eog-window.c | 56 +++++++++++++++++++++++++----------------------------
1 files changed, 26 insertions(+), 30 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 0a42a35..529d4c8 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -347,6 +347,7 @@ eog_window_set_gallery_mode (EogWindow *window,
}
gtk_box_pack_end (GTK_BOX (priv->cbox), priv->layout, TRUE, TRUE, 0);
+ gtk_widget_show (priv->layout);
eog_thumb_nav_set_mode (EOG_THUMB_NAV (priv->nav), mode);
@@ -743,9 +744,32 @@ update_action_groups_state (EogWindow *window)
n_images = eog_list_store_length (EOG_LIST_STORE (priv->store));
}
- if (n_images == 0) {
- gtk_widget_hide (priv->layout);
+ if (priv->flags & EOG_STARTUP_DISABLE_GALLERY) {
+ g_settings_set_boolean (priv->ui_settings,
+ EOG_CONF_UI_IMAGE_GALLERY,
+ FALSE);
+
+ show_image_gallery = FALSE;
+ } else {
+ show_image_gallery =
+ g_settings_get_boolean (priv->ui_settings,
+ EOG_CONF_UI_IMAGE_GALLERY);
+ }
+
+ show_image_gallery &= n_images > 1 &&
+ priv->mode != EOG_WINDOW_MODE_SLIDESHOW;
+ gtk_widget_set_visible (priv->nav, show_image_gallery);
+
+ g_simple_action_set_state (G_SIMPLE_ACTION (action_gallery),
+ g_variant_new_boolean (show_image_gallery));
+
+ if (show_image_gallery)
+ gtk_widget_grab_focus (priv->thumbview);
+ else
+ gtk_widget_grab_focus (priv->view);
+
+ if (n_images == 0) {
_eog_window_enable_window_actions (window, TRUE);
_eog_window_enable_image_actions (window, FALSE);
_eog_window_enable_gallery_actions (window, FALSE);
@@ -759,29 +783,6 @@ update_action_groups_state (EogWindow *window)
priv->status = EOG_WINDOW_STATUS_NORMAL;
}
} else {
- if (priv->flags & EOG_STARTUP_DISABLE_GALLERY) {
- g_settings_set_boolean (priv->ui_settings,
- EOG_CONF_UI_IMAGE_GALLERY,
- FALSE);
-
- show_image_gallery = FALSE;
- } else {
- show_image_gallery =
- g_settings_get_boolean (priv->ui_settings,
- EOG_CONF_UI_IMAGE_GALLERY);
- }
-
- show_image_gallery = show_image_gallery &&
- n_images > 1 &&
- priv->mode != EOG_WINDOW_MODE_SLIDESHOW;
-
- gtk_widget_show (priv->layout);
-
- gtk_widget_set_visible (priv->nav, show_image_gallery);
-
- g_simple_action_set_state (G_SIMPLE_ACTION (action_gallery),
- g_variant_new_boolean (show_image_gallery));
-
_eog_window_enable_window_actions (window, TRUE);
_eog_window_enable_image_actions (window, TRUE);
@@ -795,11 +796,6 @@ update_action_groups_state (EogWindow *window)
_eog_window_enable_gallery_actions (window, TRUE);
g_simple_action_set_enabled (G_SIMPLE_ACTION (action_sshow), TRUE);
}
-
- if (show_image_gallery)
- gtk_widget_grab_focus (priv->thumbview);
- else
- gtk_widget_grab_focus (priv->view);
}
print_disabled = g_settings_get_boolean (priv->lockdown_settings,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]