From 9e1c6aa02ba908b5073e2f557d721e9b682f5539 Mon Sep 17 00:00:00 2001 From: Michael Henning Date: Tue, 10 Oct 2023 21:56:29 -0400 Subject: [PATCH] app: Save maximize state of image window in... ...multi-window-mode too. --- app/display/gimpimagewindow.c | 16 ++++++++-------- app/tests/gimpdir/sessionrc-expected | 4 +++- .../gimpdir/sessionrc-expected-multi-window | 4 +++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c index 13785c5ec8..e8af081670 100644 --- a/app/display/gimpimagewindow.c +++ b/app/display/gimpimagewindow.c @@ -1037,6 +1037,7 @@ static GList * gimp_image_window_get_aux_info (GimpSessionManaged *session_managed) { GList *aux_info = NULL; + GimpSessionInfoAux *aux; GimpImageWindowPrivate *private; GimpGuiConfig *config; @@ -1047,9 +1048,8 @@ gimp_image_window_get_aux_info (GimpSessionManaged *session_managed) if (config->single_window_mode) { - GimpSessionInfoAux *aux; - GtkAllocation allocation; - gchar widthbuf[128]; + GtkAllocation allocation; + gchar widthbuf[128]; g_snprintf (widthbuf, sizeof (widthbuf), "%d", gtk_paned_get_position (GTK_PANED (private->left_hpane))); @@ -1065,13 +1065,13 @@ gimp_image_window_get_aux_info (GimpSessionManaged *session_managed) aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_RIGHT_DOCKS_WIDTH, widthbuf); aux_info = g_list_append (aux_info, aux); - - aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_MAXIMIZED, - gimp_image_window_is_maximized (GIMP_IMAGE_WINDOW (session_managed)) ? - "yes" : "no"); - aux_info = g_list_append (aux_info, aux); } + aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_MAXIMIZED, + gimp_image_window_is_maximized (GIMP_IMAGE_WINDOW (session_managed)) ? + "yes" : "no"); + aux_info = g_list_append (aux_info, aux); + return aux_info; } diff --git a/app/tests/gimpdir/sessionrc-expected b/app/tests/gimpdir/sessionrc-expected index 5617d791dc..29885785b2 100644 --- a/app/tests/gimpdir/sessionrc-expected +++ b/app/tests/gimpdir/sessionrc-expected @@ -92,7 +92,9 @@ (factory-entry "gimp-empty-image-window") (position 140 30) (size 610 190) - (open-on-exit)) + (open-on-exit) + (aux-info + (maximized "no"))) (session-info "toplevel" (factory-entry "gimp-single-image-window") (position 10 40) diff --git a/app/tests/gimpdir/sessionrc-expected-multi-window b/app/tests/gimpdir/sessionrc-expected-multi-window index 312e7486c3..b3104cf0b7 100644 --- a/app/tests/gimpdir/sessionrc-expected-multi-window +++ b/app/tests/gimpdir/sessionrc-expected-multi-window @@ -107,7 +107,9 @@ (factory-entry "gimp-empty-image-window") (position 140 30) (size 610 190) - (open-on-exit)) + (open-on-exit) + (aux-info + (maximized "no"))) (session-info "toplevel" (factory-entry "gimp-single-image-window") (position 10 40)