Recent

Author Topic: How to keep the Lazarus windows layout on restart?  (Read 1544 times)

BosseB

  • Sr. Member
  • ****
  • Posts: 468
How to keep the Lazarus windows layout on restart?
« on: August 07, 2020, 07:41:16 am »
I keep losing my carefully arranged windows in Lazarus when I close Lazarus and then start it. It happens not always but often enough to be really annoying.

Today it happened again, I closed Lazarus yesterday with the source editor and a number of other windows present and arranged on screen like i want them (and close to what Lazarus itself does when starting afresh from a new install).

But now when starting Lazarus all I get is the code editor and none of the other windows! Normally they are restored but like today sometimes the other windows just disappear and I have a hard time getting them back since I cannot for the life of me remember the names they have been given...

Is there some way to be able to define the window arrangement and save it somewhere so it can be restored easily?

This concerns Lazarus 2.0.8 on Linux (RaspberryPi) if that matters.
--
Bo Berglund
Sweden

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: How to keep the Lazarus windows layout on restart?
« Reply #1 on: August 07, 2020, 09:43:41 am »
I experience same issue too.

My trick is to use Desktops feature:
Lazarus main menu > Tools > Desktops

Not many users know about it, but it can be very useful. You can have several Desktops, one for coding, one debugging and so on. And to make it easier to access, you should put a shortcut (icon) on the Editor ToolBar.

For avoid accidentally modifying the active Desktop, you should disable the auto save checkbox.
« Last Edit: August 07, 2020, 10:10:21 am by Handoko »

fabiopesaju

  • Jr. Member
  • **
  • Posts: 93
Re: How to keep the Lazarus windows layout on restart?
« Reply #2 on: August 07, 2020, 12:34:13 pm »
I experience same issue too.

My trick is to use Desktops feature:
Lazarus main menu > Tools > Desktops

Not many users know about it, but it can be very useful. You can have several Desktops, one for coding, one debugging and so on. And to make it easier to access, you should put a shortcut (icon) on the Editor ToolBar.

For avoid accidentally modifying the active Desktop, you should disable the auto save checkbox.

to be perfect, it would be phenomenal if I could associate each "desktop" with a shortcut key... and I could navigate between them by a shortcut key... it would be wonderful....

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: How to keep the Lazarus windows layout on restart?
« Reply #3 on: August 07, 2020, 01:20:02 pm »
If you meant each desktop has each own shortcut, you can't. But you can assign a shortcut for the Desktops Manager:

Lazarus main menu
> Tools > Options > (left panel) > Editor > Key Mappings > on the filter edit box, type: "desktops" > double click the "Manage desktops" item

fabiopesaju

  • Jr. Member
  • **
  • Posts: 93
Re: How to keep the Lazarus windows layout on restart?
« Reply #4 on: August 08, 2020, 03:13:40 am »
but it would be amazin if it had

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: How to keep the Lazarus windows layout on restart?
« Reply #5 on: August 08, 2020, 09:49:23 am »
I experience same issue too.
Good to know I am not alone.
Does it happen only on Linux or both Linux and Windows?
I am nowadays mostly working on Linux but I now and then go to Windows to check that the supposedly dual-platform app builds also there...

BTW:
I experienced crashes of Lazarus during the spring when I lost edited code changes multiple times.
To work around that I installed the package AutoSave so that only the last 10 s (configurable time) worth of edits would be lost in a crash.
Very useful, it should be a normal part of Lazarus in my opinion.
But I found that it does not autosave the lpr project file for some reason, only pas, pp etc source files.
--
Bo Berglund
Sweden

kupferstecher

  • Hero Member
  • *****
  • Posts: 583
Re: How to keep the Lazarus windows layout on restart?
« Reply #6 on: August 08, 2020, 11:08:26 am »
Does it happen only on Linux or both Linux and Windows?
Seems the behaviour is different on the systems and I'm having some trouble on both. On Windows all Lazarus windows will be shown, no problem in this regard, but the arrangement is destroyed often. E.g. if I switch from external monitor. Also the desktop configuration that Handoko mentioned often looses its settings. I guess its a "User account control"-issue, there could be more than one config file lying around managed by Windows.

On LinuxMint I experienced what I think you described: Some of the Lazarus windows get lost, so I activated a seperated taskbar icon for each window. It's cluttering the taskbar, but better than the windows getting unreachable. Perhaps the desktop layout configuration helps there, I should try.


Quote
I experienced crashes of Lazarus during the spring when I lost edited code changes multiple times.
[...] AutoSave [...]
I never had any crashes while actually coding, both on Windows 7 and LinuxMint. There were crashes when packages of a project couldn't be loaded and I tried to do something with the package. But that was either at startup or when I manipulated the package, so no dataloss, just a bit annoying.

Maybe you have addons that make Lazarus unstable?

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: How to keep the Lazarus windows layout on restart?
« Reply #7 on: August 08, 2020, 12:04:43 pm »
Quote
I experienced crashes of Lazarus during the spring when I lost edited code changes multiple times.
[...] AutoSave [...]
I never had any crashes while actually coding, both on Windows 7 and LinuxMint. There were crashes when packages of a project couldn't be loaded and I tried to do something with the package. But that was either at startup or when I manipulated the package, so no dataloss, just a bit annoying.

Maybe you have addons that make Lazarus unstable?
I really do not know what caused the actual crashes, but a typical scenario was that I had been happily coding and I used the mouse in order to select a command to copy. At the very moment I clicked the mouse I was looking at an empty desktop, no sign of Lazarus at all.
When you talk about Add-on do you mean some custom tools in the IDE or such?
In that case, no I have not installed anything like that. I always install Lazarus by checking out a release tag from svn and then build it through make.
Then I use OLPM in order to install the packages I use in my software (Indy, LazSerial, ....). But these are not add-ons, just code packages used in my apps.
Note:
I do not have a monitor attached to my RPi units, I always deal with those that have a GUI through VNC.
And all RPi's are managed through the PuTTY command line interface.
--
Bo Berglund
Sweden

 

TinyPortal © 2005-2018