[gimp] app: Rememeber if image windows are opened
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Rememeber if image windows are opened
- Date: Sat, 28 May 2011 14:23:55 +0000 (UTC)
commit 10aa3921a031abd721efc6ae097da3a4cb6ecbfc
Author: Martin Nordholts <martinn src gnome org>
Date: Sat May 14 18:16:31 2011 +0200
app: Rememeber if image windows are opened
Rememeber if image windows are opened because we want the
gimp_session_info_restore() code to run for the single-image window
once that code is in place.
app/dialogs/dialogs.c | 2 +-
app/tests/gimpdir/sessionrc-2-8 | 3 ++-
app/tests/gimpdir/sessionrc-expected | 3 ++-
app/widgets/gimpsessioninfo.c | 21 ++++++++++++---------
4 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/app/dialogs/dialogs.c b/app/dialogs/dialogs.c
index aaa29e4..f8c9e89 100644
--- a/app/dialogs/dialogs.c
+++ b/app/dialogs/dialogs.c
@@ -82,7 +82,7 @@ GimpContainer *global_recent_docks = NULL;
singleton /* singleton */, \
TRUE /* session_managed */, \
remember_size /* remember_size */, \
- FALSE /* remember_if_open */, \
+ TRUE /* remember_if_open */, \
FALSE /* hideable */, \
TRUE /* image_window */, \
FALSE /* dockable */}
diff --git a/app/tests/gimpdir/sessionrc-2-8 b/app/tests/gimpdir/sessionrc-2-8
index 94c4703..2d9e437 100644
--- a/app/tests/gimpdir/sessionrc-2-8
+++ b/app/tests/gimpdir/sessionrc-2-8
@@ -90,7 +90,8 @@
(session-info "toplevel"
(factory-entry "gimp-empty-image-window")
(position 140 30)
- (size 610 190))
+ (size 610 190)
+ (open-on-exit))
(session-info "toplevel"
(factory-entry "gimp-single-image-window")
(position 10 40)
diff --git a/app/tests/gimpdir/sessionrc-expected b/app/tests/gimpdir/sessionrc-expected
index 94c4703..2d9e437 100644
--- a/app/tests/gimpdir/sessionrc-expected
+++ b/app/tests/gimpdir/sessionrc-expected
@@ -90,7 +90,8 @@
(session-info "toplevel"
(factory-entry "gimp-empty-image-window")
(position 140 30)
- (size 610 190))
+ (size 610 190)
+ (open-on-exit))
(session-info "toplevel"
(factory-entry "gimp-single-image-window")
(position 10 40)
diff --git a/app/widgets/gimpsessioninfo.c b/app/widgets/gimpsessioninfo.c
index 9eff944..67f4e1c 100644
--- a/app/widgets/gimpsessioninfo.c
+++ b/app/widgets/gimpsessioninfo.c
@@ -488,15 +488,18 @@ gimp_session_info_restore (GimpSessionInfo *info,
info);
}
- /* We expect expect there to always be docks. In sessionrc files
- * from <= 2.6 not all dock window entries had dock entries, but we
- * take care of that during sessionrc parsing
- */
- for (iter = info->p->docks; iter; iter = g_list_next (iter))
- gimp_session_info_dock_restore ((GimpSessionInfoDock *)iter->data,
- factory,
- screen,
- GIMP_DOCK_CONTAINER (dialog));
+ if (dialog && GIMP_IS_DOCK_CONTAINER (dialog))
+ {
+ /* We expect expect there to always be docks. In sessionrc files
+ * from <= 2.6 not all dock window entries had dock entries, but we
+ * take care of that during sessionrc parsing
+ */
+ for (iter = info->p->docks; iter; iter = g_list_next (iter))
+ gimp_session_info_dock_restore ((GimpSessionInfoDock *)iter->data,
+ factory,
+ screen,
+ GIMP_DOCK_CONTAINER (dialog));
+ }
g_object_unref (info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]