After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 569160 - Anjuta doesn't remember main window layout
Anjuta doesn't remember main window layout
Status: RESOLVED FIXED
Product: gdl
Classification: Other
Component: general
CVS HEAD
Other All
: Normal normal
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
: 552662 (view as bug list)
Depends on:
Blocks: 616728
 
 
Reported: 2009-01-26 07:27 UTC by Tomasz Jankowski
Modified: 2012-07-17 20:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Custom layout (149.83 KB, image/png)
2009-07-05 17:00 UTC, Tomasz Jankowski
Details
Ajuta layout at startup (107.93 KB, image/png)
2009-07-05 17:13 UTC, Tomasz Jankowski
Details

Description Tomasz Jankowski 2009-01-26 07:27:15 UTC
Please describe the problem:
Anjuta doesn't remember elements layout in main window. After restart it always return to default settings.

Steps to reproduce:
1. Change elements layout in the main window
2. Select "Edit" -> "Lock items..."
3. Restart Anjuta
After restart Anjuta will not remember my custom layout. 


Actual results:


Expected results:


Does this happen every time?
Yes, always.

Other information:
Problem also occurred in line 2.24.x
Comment 1 Johannes Schmid 2009-02-02 12:29:06 UTC
Do you have a project open when you try this? Which parts of the layout are not remembered? Could you give more detailed instructions to reproduce (expected behaviour, actual result?

Thanks!
Comment 2 Tomasz Jankowski 2009-07-05 17:00:01 UTC
Created attachment 137883 [details]
Custom layout

I change place of "Messages" box like in the picture.
Comment 3 Tomasz Jankowski 2009-07-05 17:10:22 UTC
Sorry, I forgot about this bug...

So, when I start Anjuta "Messages" container is always placed like in the picture in attachment below.

Each time I launch Anjuta I have to change layout (picture in attachment above). I cannot make Anjuta remember my layout. I tried to lock IDE layout checking "Edit"->"Lock items layout" menu option and by clicking "Lock" option in "Messages" container's context menu.
Comment 4 Tomasz Jankowski 2009-07-05 17:13:44 UTC
Created attachment 137885 [details]
Ajuta layout at startup

No matter what I do "messages" container starts in this position when I launch Anjuta.
Comment 5 Johannes Schmid 2009-09-22 13:43:28 UTC
Hmm, I know why this happens but I don't know how to fix it:

* The message-manager plugin is not loaded until you first use it
* The layout is loaded before the message-manager plugin becomes active. So the layout won't affect the message-manager at all and it comes back to it's default place.

Maybe we need some way to query the last position from the layout...
Comment 6 Sébastien Granjoux 2009-09-22 17:43:24 UTC
I think the layout should save the position of each window and use the default position only when such position is not available.

So, it know by example that
  AnjutaMessageView is on RIGHT
  bookmarks is on RIGHT
  ...

Then when it needs to place a new windows it use the last position.

I have thought that we can perhaps define the position of all windows, by having for each of them only a relative position (TOP, RIGHT, BOTTOM, LEFT) and a order number.

You start placing the first window (relative position is useless for the first one) and continue with the remaining one in order. Window using the same space (using tab) have the same order number and position.


Then, the "only" problem is to find this ordered list of windows with their relative position from a current layout when you need to save it.

By example

The layout of comment 4 is
Document           0
Display            0
Inheritance        0
Message            1  BOTTOM
File Manager       2  LEFT
Symbol             2  LEFT
Project            2  LEFT
Help               2  LEFT
  
The layout of comment 2 is 
Document           0
Display            0
Inheritance        0
Message            0
File Manager       1  LEFT
Symbol             1  LEFT
Project            1  LEFT
Help               1  LEFT
Comment 7 Johannes Schmid 2009-09-22 19:14:53 UTC
That is something that probably needs to be added in gdl because I found nothing to query the position of a window in a layout. But it can probably be implemented on top of gdl-dock-layout.
Comment 8 Sébastien Granjoux 2009-09-22 19:32:52 UTC
Yes, I think it should be added in gdl. Perhaps we can look if inkscape or another fork has already implemented something like this.
Comment 9 Johannes Schmid 2010-02-28 18:16:34 UTC
Moving to gdl!
Comment 10 Johannes Schmid 2010-02-28 18:52:44 UTC
*** Bug 552662 has been marked as a duplicate of this bug. ***
Comment 11 Sébastien Granjoux 2012-07-17 20:46:09 UTC
I have just committed a patch that should fix this issue. It is completely different from my proposal above which is not really related to the real issue. It is a quite important change in the way GDL is working too.

Now when a widget is closed, it is not removed from the widget hierarchy, it is only hidden, so it keeps its position. When the layout is saved the position of all these hidden widgets and their parents are saved. When the layout is loaded, all existing widget are moved to the saved position but in addition hidden empty widget are created for all unexisting named widget. If a widget with the same name is created later it will replace the existing hidden widget.

So the layout will affect the position of the message view widget even if it is created later.