[gimp] app: gimp_session_info_dockable_restore(): don't return existing singletons
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: gimp_session_info_dockable_restore(): don't return existing singletons
- Date: Thu, 12 May 2011 20:00:47 +0000 (UTC)
commit 80cf95319e559e9d601ac6cc494bea14faf477f5
Author: Michael Natterer <mitch gimp org>
Date: Thu May 12 20:24:32 2011 +0200
app: gimp_session_info_dockable_restore(): don't return existing singletons
Instead, return NULL. The singleton dockable can't be restored in this
dock because it's already open in another dock.
app/widgets/gimpsessioninfo-dockable.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpsessioninfo-dockable.c b/app/widgets/gimpsessioninfo-dockable.c
index 83ecff0..2604466 100644
--- a/app/widgets/gimpsessioninfo-dockable.c
+++ b/app/widgets/gimpsessioninfo-dockable.c
@@ -290,6 +290,13 @@ gimp_session_info_dockable_restore (GimpSessionInfoDockable *info,
if (dockable)
{
+ /* gimp_dialog_factory_dockable_new() might return an already
+ * existing singleton dockable, return NULL so our caller won't
+ * try to add it to another dockbook
+ */
+ if (gimp_dockable_get_dockbook (GIMP_DOCKABLE (dockable)))
+ return NULL;
+
gimp_dockable_set_locked (GIMP_DOCKABLE (dockable), info->locked);
gimp_dockable_set_tab_style (GIMP_DOCKABLE (dockable), info->tab_style);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]