LayoutManager [release 1.1]

Discuss and share scripts and script files...
aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: LayoutManager

Post by aurumdigitus »

Given the minimal toolkit available to manipulate the GUI you have managed to wring an amazing amount of functionality out of it!

Is there a name for when a set of interlocking XYS files constitute the functional equivalent of one program operation? If not perhaps a neologism is in order. :)

To call this a bug would be an abuse of the word; so let’s use artifact instead. While struggling to understand the code had layouts.ini open in a text editor. This prevented the file being written to and hence interfered with LayoutManager’s operation.

Whichever is your scripting Muse is she is powerful. :biggrin:

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,
klownboy wrote:I hope all is well.
though the weekend is over and the long working days got their hold on me again, I'm fine. 70°F sounds very comfortable (I'm no heat-seeker :wink: ).
klownboy wrote:Though when I initially installed it (copied it to the script folder), I checked out "Renaming layout" and I think it was going to allow me to rename a layout when no layout had a golden star yet and there was no current layout reflected in brackets. So what layout would I be renaming in that case? I cancelled out so I'm not sure.
klownboy wrote:Filehero, as a follow-up to my last post (please read that first), I was able to duplicate getting the Layout Manager Menu to show up with no layouts having a golden star (no currrent layout). It happens everytime you exit XYplorer and then restart it, even when you save all settings before you exit (I do not have the program save setting automatically on exit). In other words, I have a current layout one that is golden starred, it doesn't seem to matter which one, I then save all my settings and when I reopen XYplorer, there is no golden starred layout, though the layout looks the same as what it was before I exited.
Another valid point - and gotcha! :whistle:
This time I have to apologize, because this is an open issue being on my list for quite some time now. I really should have stated that before. Sorry, sloppy me! :oops:

But your little bump finally made me decide what way to go. :)

Some more technically background: Currently there is no way the script could get to know when XY is closing. So, a save-last-layout-only-on-exit as in XY itself is impossible to implement until the Custom Event Actions (CEA) will be available. On the other end of the lifecyle, sensing the very first script call in a new XY session could be addressed by e.g. a 'global' counter. But I don't like that kind of style...

The 'most perfect' solution (marketing dept. would say: "real-time full state awareness" :mrgreen: ):
Each time the current layout, for whatever reason, including a new XY session, is undefined, ask XY about the current state of every single supported GUI element state first. Then go through all known (=saved) layouts and compare individual properties. Once you find a total match, you have the 'real' current layout -> golden star. However, the else-case (no hit) is still open -> grey star. Briefly: High costs to get 98%.

The smarter way:
Each time a layout switch actually occurs save the 'last layout' to the ini-file as well. In case the 'current layout', for whatever reason, including a new XY session, is undefined, read the last layout from the ini and give it a golden star. Note, no layout switching will occur, it's just a matter of visual indication. I don't want to mess/collide with XY's inbuild mechanism for state saving.
Yes, this will still not handle all situations (for instance, the last layout migh tbe missing from the allLayouts ini list). Since the outcome would be a grey star at worst, I prefer this implementation by far - especially since two menu clicks at max will bring everything back in synch again. Briefly: Get 98% at a dramatically lower rate.

What do you think?


Cheers,
Filehero

PS: I'm afraid, I will need some more days for the next release. :? But it will come this week. :)

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey again Filehero. I typed up a reply to your post last night and it was all lost since I took so long to write it in between household chores. The web page expired when I tried to sent the post. :cry: My fault, I should have saved a draft. Here goes again.

I agree with your logic and which is the best way to proceed as far as the addressing that issue. I'm not totally sure what you meant by a "layout switch", each and every change to a layout attribute or a switch in layouts via Layout Manager? Anyway, as I see your plan, you would have a "last layout" entry in the menu that would have a golden star if the user wasn't using a predefined or saved layout? If he was using a predefined layout, that layout would be the "last layout" and would have the golden star. In that case, would the "last layout" be still on the menu without a golden star (i.e., gray) or would it be eliminated from the menu and the predefined layout have the golden star?

One question though, currently (as of version 0.6 alpha), you are not saving layout attributes each and every time a person makes a layout change (without a save in Layout Manager), are you? Don't you simply save the the layout changes to layouts.ini when a person saves the layout or saves one as a new layout? If that's the case, wouldn't it be cleaner to somehow (I'm not a coder) flag the current layout (i.e., the layout with the golden star) when it is changed or saved so it can be addressed later, rather than coming up with a "last layout". I say that with the understanding that the current layout may not have a golden star or be a defined layout (i.e., the layouts may be all grayed out). A person using Layout Manager may be changing layout attributes and either not want them saved or hasn't bothered to save them to a new layout name or save them over an existing layout name. I'm not so sure you should have to worry about that situation.

My feeling is that you should only worry about saving the layout when the current layout is defined and has a golden star. Let the XYplorer program do the saving of the "current" layout that is not a defined new or saved "Layout Manager" layout whether one has the program automatically save settings on exit or whether they save them manually, that's the user's responsibility. If they are using your Layout Manager they shouldn't be total newbies. :)

I suppose it would be a nice thing to see the "last layout" with a golden star on the menu unless you were using a predefined or saved layout, but if it requires more computer processing power to be saving layout attribute changes each and every time, I'm not sure it's worth it or necessary. I guess it boils down to you, you're the programmer (and quite a good one) so it's up to you on what's the cleanest and perhaps the easiest way to accomplish what you want to do. Sorry for being so wordy.

Thanks again and take care,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,

one of my posts in this thread had been a complete rewrite as well. In my case it was Notepad++ crashing (for the very first time, so I was only drafting but never saving lol)

Your asking interesting questions. But before adressing them I would like to drop some general words about the script implementation and its XY "hosting" context. This also may help to clear up any misconceptions before they arise (the ghost of my very recent experience speaks through me.. :wink: ).

1. XY and scripts
My XY script - as well as all others in XY - doesn't just sit somewhere in the background and waits for its menu button to be clicked. It's the other way round: XY is the master, XY captures all the user events like mouse-clicks, key shortcuts etc. and triggers all actions registered with them.
What happens if the LM user button is clicked?
The script(s) is run - and once the menu (or any other derived popup) is closed, the script run is over. So, each menu open/close event is associated with a complete script lifecycle (just like a XY session being started and finally closed by hitting 'X')!Everything you see in such a menu lifecycle is done on-the-fly. Each time, the whole menu setup is "generated" from scratch based upon the saved ini-data (and one global variable I'll come back to soon).
The same principle applies for loading a layout (be it py picking a named favorite or via the load popup). Each time, the script reads the entire property set from the ini, then checks every single one against its corresponding state in the running XY host application. And only if To-Be is different from As-Is, the XY state is changed (the comparison is required, because in XY the script commands to hide/show gui elements I'm using aren't real switches with freely adressable ON/OFF-states, but toggles with strictly serial ON-OFF-ON-OFF-logic: e.g. F8).

And what's in between those open/close cycles? There simply is "no LM script" at all!


2. LM and XY application state(s)
You remember, the script is dead once the menu is gone. Therefore it should be obvious that for a script there is no means to "monitor" any XY state changes and react to them in real-time - for instance, by marking a layout as "changed, but not saved yet" or doing a sort of autosave. The autosave stuff is completely governed by the user via XY's settings-handling settings!


Now, let me turn to your questions.
klownboy wrote:I'm not totally sure what you meant by a "layout switch", each and every change to a layout attribute or a switch in layouts via Layout Manager?
A layout switch is happening when the To-Be/As-Is property comparison results in at least one difference. Just make a test: Save any existing layout under a new name and apply them alternatingly. What do you see? Correct, nothing happens on the gui, even the counters remain unchanged -> no layout switch. It's just the same thing having to different names.
klownboy wrote:One question though, currently (as of version 0.6 alpha), you are not saving layout attributes each and every time a person makes a layout change (without a save in Layout Manager), are you? Don't you simply save the the layout changes to layouts.ini when a person saves the layout or saves one as a new layout?
You're completely right, a layout save is only triggered via "Save Layout" or "Save Layout As" (because of 2.). But note: In contrast, the ini General settings are saved/updated (almost) every time the script is run (menu open/close)!
klownboy wrote:If that's the case, wouldn't it be cleaner to somehow (I'm not a coder) flag the current layout (i.e., the layout with the golden star) when it is changed or saved so it can be addressed later, rather than coming up with a "last layout".
Good question. Have been thinking about that, too. My first conclusion was: No change marker.
The reasons weren't technical, but conceptual in the first place. To me, a layout is just a batch-shortcut, a quick way to setup the gui as I need it. So I have set up a basic set of layouts to cover a useful range of starting points. In my notion - though I know I do - I don't "feel to change" a layout once I modify a loaded layout (for instance, TreeXPane by hitting F8), I'm rather creating a new one (XPanes, for example). Do you know, what I mean?
But after reading my last sentence over and over again, I see the logical conflict in "conceptually a change isn't a change". ;)
From the user's perspective you would find an asteriks a meaning- and helpful add-on for daily use?

The "lastlayout" is a different beast. Why a lastLayout-Property or the golden-star phenomenon?
In my first sketches, the "golden star" was supposed to simply mark the last picked/loaded layout, independent from it being "changed" in XY but outside the script scope later on. I simply defined a script variable holding the name after the "layout switch", the rest is just matching names. This also means, by now there's no "smart" layout detection logic involved at all. As a side note: Now, I see why the term "current" layout can/will be misleading.
After the lines of code became more and more I decided to split the script into pieces to reduce heavy mouse-wheel scrolling. Now, technically I faced a problem. The entry script builds the menu, but the layout application is done by a second script file triggered from the first script. So, how should the first menu script know, what layout have been picked during the last script runtime? My luck, XY's script engine has a concept of "permanent" variables, which comes in two flavors.
Flavor one means, it's a variable global to the XY session. You can reference it in as many scripts as you like. As long as all those scripts are run during the same XY session, they will all "see"/share the same variable value (e.g. $name = "Filehero"). Fine, my original problem was solved. The second flavor comes in the game, when you activate F9/Advanced/Remember permanent variables in XY. Now the value even survives sessions.
I'm sure, you already know what I'm after. In my XY standard usage scenario my "lastLayout" persistence is provided by XY. When I open a new XY instance, the permament variable previoulsy saved with its last value is read from XY's dat-files and "passed" to the script runtime again. So, during development I always saw "Plain" golden star-red. But since I completely share your view that the user is the only authority about how XY's settings should be handled, I had to implement my own "Remember permanent variable" - "lastLayout" was born.

Oups, what an epic writing...as much fun as scripting(*), I guess. ;)
klownboy wrote:Sorry for being so wordy
ahem.... :mrgreen:

Thanks a lot for your valid input and interesting discussion! It's always astonishing how focusing on things (which is a good thing per se) can easily turn into a sort of tunnel-vision when overdone.

I'll think I have to revisit some stuff, especially the 'golden star' appears to require another stringency and consistency check. I'm not sure about the asterisk change mark.
But other things (making the current version stable) will have to come first.


Cheers,
Filehero

*: Had to be canceled for today :wink:

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hi Filehero,
Thanks for the explanations or actually the lesson in scripting. :biggrin: It makes me want to learn more about it. I knew about global variables and their use between scripts within a session, but I did wonder about the saving of information such as the last layout between sessions as permanent variables...very interesting. If I knew more (I should say anything) about scripting, I'd be able to provide better comments.

I'm still a bit confused on whether you plan to have a "Last Layout" menu item appear on the menu with a golden star but only if the last layout is not a predefined menu, in that case the predefined, like Pany would have the star. :? It sounds like your still sketching it out in your mind, at least how to accomplish it.

Good luck. I look forward to the next version.

Thanks agian,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,
klownboy wrote:I knew about global variables and their use between scripts within a session, but I did wonder about the saving of information such as the last layout between sessions as permanent variables...very interesting. If I knew more (I should say anything) about scripting, I'd be able to provide better comments.
switch on F9/Advanced/Remember permanent, pick any layout, close XY with save settings, restart XY and open menu Scripting/Permament Variables. What do you see?
klownboy wrote:I'm still a bit confused on whether you plan to have a "Last Layout" menu item appear on the menu with a golden star but only if the last layout is not a predefined menu, in that case the predefined, like Pany would have the star. :?
Thanks for keeping at that. Believe it or not, I'm afraid I've got your point only now (wood for the trees...überlong posts are bad :mrgreen: ). :whistle:

But before I get caught in that trap again:
What's the difference between a changed-but-not-saved layout marked with an asterisk and this "last unnamed" one? Do you mean, use the asterisk mark to indicate a changed one in a XY running session. And only if the changed one hasn't been saved before closing that session, turn it into a "last unnamed/unsaved layout" menu entry in a new session? Indeed, interesting idea.


Cheers,
Filehero

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey again Filehero,
switch on F9/Advanced/Remember permanent, pick any layout, close XY with save settings, restart XY and open menu Scripting/Permament Variables. What do you see?
I see: $p_currentLayout = Original ...cool...permanent variable saved between sessions.
What's the difference between a changed-but-not-saved layout marked with an asterisk and this "last unnamed" one? Do you mean, use the asterisk mark to indicate a changed one in a XY running session. And only if the changed one hasn't been saved before closing that session, turn it into a "last unnamed/unsaved layout" menu entry in a new session? Indeed, interesting idea.
There's probably no difference that I can think of at the moment. I'm not sure what you are referring to when you talk about asterisks. This is the second time you mentioned an asterisk. I don't believe I ever used that word. In a previous post (the long one), I was only referring to you simply "flagging" the current layout (the defined layout with the golden star) "within the script" in lieu of having what you called a "last layout". The flagging was not intended to be something apparent to the end-user other than the fact that you would see the golden star on the predefined layout (like Pany) when you began a new session.

Now, if someone did not end a session using a predefined layout, and you (as teh scripter) decide to recognize and start up a new session with that undefined layout (one that hasn't been saved or is an unnamed layout) that would be fine. In this case, I think you were planning on calling it "Last Layout" and it would have the golden star instead of one of the defined layouts having the golden star. What I was getting at in that other post was, I'm not sure it's necessary. If someone didn't bother to save the new layout, so be it. I think it would be nice to get back to the same layout you had in the last session especially if it was a predefined layout and have it golden starred. It it wasn't a defined layout, wouldn't XY itself take care of getting you back to the same undefined layout you had in the last session? If that's the case, the only difference would be the user would have the "Last Layout" golden starred, so he would know it wasn't saved as a new layout name and if he wanted to he could then go ahead and save it.

Wow, sorry getting wordy again.
Thanks,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,
klownboy wrote:Hey again Filehero,
I see: $p_currentLayout = Original ...cool...permanent variable saved between sessions.
yep, that's a nice and helpful feature. However, basically I consider it a user's very own realm just like XY's settings. That's why I've tried to put the minimum required persisting information there (the one you posted) and manage the rest from within the script.
klownboy wrote:I'm not sure what you are referring to when you talk about asterisks. This is the second time you mentioned an asterisk. I don't believe I ever used that word. In a previous post (the long one), I was only referring to you simply "flagging" the current layout (the defined layout with the golden star) "within the script" in lieu of having what you called a "last layout". The flagging was not intended to be something apparent to the end-user other than the fact that you would see the golden star on the predefined layout (like Pany) when you began a new session.
A perfect example of talking at cross purposes - with me being the blockhead/culprit. I dont know why I got you wrong but I did. Sorry for that.
So it turns out, that your internal "flag" (which I indeed misread as a visible indicator like in a word processor/editor in the first place) is exactly what my "lastLayout" was and is intended for.
Here on my machine the golden star now is restored in a new session, even if XY is run w/o save-settings-on-exit. With the latter case the only "minor" thing is, that the gui configuration isn't restored on XY startup and therefore matching the marked layout anymore. :mrgreen:
Just to see how it "feels" I coded an (optional) LayoutAutoRestore. But it feels rather clumsy, because XY doesn't allow any script autoload (to trigger in turn an autoload of the last layout) yet. So, it needs at least one click to make the last layout becoming applied. Not very automatic. :wink:

klownboy wrote: Now, if someone did not end a session using a predefined layout, and you (as teh scripter) decide to recognize and start up a new session with that undefined layout (one that hasn't been saved or is an unnamed layout) that would be fine. In this case, I think you were planning on calling it "Last Layout" and it would have the golden star instead of one of the defined layouts having the golden star. What I was getting at in that other post was, I'm not sure it's necessary. If someone didn't bother to save the new layout, so be it. I think it would be nice to get back to the same layout you had in the last session especially if it was a predefined layout and have it golden starred.
Seems you can explain it better than me. That's a perfect summary in non coders lingo. :appl:
So, to prevent me from confusing you and myself even more I decided to create release-0.7.1_alpha and let the script speak.

Some release notes:
- the following characters are not allowed in layout names: ] [ { } + . | : & / - ; < >
- the help file hasn't been fully updated yet.

klownboy wrote: It it wasn't a defined layout, wouldn't XY itself take care of getting you back to the same undefined layout you had in the last session?
Only if you run XY with save-settings-on-exit on. For the opposite case I'll make the "golden star recovery" configurable.


Thanks for being so helpful :) - and patient. :wink:


Cheers,
Filehero
Attachments
release-0.7.1_alpha.zip
(347.61 KiB) Downloaded 166 times

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi aurumdigitus,

pardon me, unintentionally your post escaped my notice until today.
aurumdigitus wrote:Given the minimal toolkit available to manipulate the GUI you have managed to wring an amazing amount of functionality out of it!
Thanks for the nice words. :)
aurumdigitus wrote:Is there a name for when a set of interlocking XYS files constitute the functional equivalent of one program operation?
I'm afraid I didn't get the message. Is this part of your 'bug' description. :?:
aurumdigitus wrote:To call this a bug would be an abuse of the word; so let’s use artifact instead. While struggling to understand the code had layouts.ini open in a text editor. This prevented the file being written to and hence interfered with LayoutManager’s operation.
That's totally strange. I have the ini opened in Notepad++ all the time during coding - with no lock problems at all (assumed that only one of either applications can have the focus at any time). Was it just a 'singularity' or is it standard behavior on your system?
aurumdigitus wrote:Whichever is your scripting Muse is she is powerful. :biggrin:
:biggrin: :D


Edit
aurumdigitus wrote:While struggling to understand the code ...
That's what this thread is for, too: If you have any questions, just ask away.



Thanks & cheers,
Filehero

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hi Filehero,

I hope all is well.

I loaded up your new release alpha 0.7.1 and all is well with it. The golden star is back on the last layout used when you close and reopen XYplorer. I did notice that if I make a layout attribute change to a predefined layout (e.g., removing the address bar from a predefined layout that doesn't have bar), obviously when you are in the same session the golden star will remain on that predefined layout. That's as expected until you save the layout change. When you close out XY and reopen it, the same predefined layout will have a golden star even though a change was made to that predefined layout, but again, that's also as expected. Why shouldn't it, the same condition existed before you exited. I don't know, should you even worry about the "last layout" (i.e., saving those changes made from a predefined layout)? What do you think?

Happy computing,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,

all is fine over here.
klownboy wrote: I loaded up your new release alpha 0.7.1 and all is well with it. The golden star is back on the last layout used when you close and reopen XYplorer.
Good to read, thanks for your re-checking.
klownboy wrote: I did notice that if I make a layout attribute change to a predefined layout (e.g., removing the address bar from a predefined layout that doesn't have bar), obviously when you are in the same session the golden star will remain on that predefined layout. That's as expected until you save the layout change. When you close out XY and reopen it, the same predefined layout will have a golden star even though a change was made to that predefined layout, but again, that's also as expected. Why shouldn't it, the same condition existed before you exited. I don't know, should you even worry about the "last layout" (i.e., saving those changes made from a predefined layout)? What do you think?
I'm totally undecided.

As you have summarized it perfectly, the current way (v07.1) is consistent, but leaves the handling of changes completely up to the user. Save it, or leave it.
On the other hand, why not providing some more assistance to try to make recognition/handling of changes even easier? With the user actively involved, the basic options I see (subject to technical feasibility):

1. Visual flag (current session)
In a running XY session, if you change a current layout's configuration in XY (as long as I can track it) provide a flag in the menu entry of that layout (e.g. asterisk, ....Jehova :whistle: ). Saving the changes in the running session is still up to the user.

2. Warning message (current session)
In a running XY session, if you change a current layout's configuration in XY and then pick another one without saving the changes, show a popup with a "warning" message. Of course, his could be combined with the visual flag. Saving the changes is still up to the user. (Personally, I would find this annoying)

3. Backup the last unsaved layout (new Session)
Despite of 1. and 2., in a running session, backup the last (meaning, only one at any time) changed-but-unsaved-layout in an individual ini-section. If the user forgot to save it, offer the backuped layout in a new XY session in some meaningful way, e.g. a "special" menu entry. Saving the changes in the new running session is still up to the user.

4. Golden star Reloaded (new session)
In a new XS session, if the actual layout at XY startup differs from the lastLayout (means: unsaved change) just show no golden star.


I'm fine with the current implementation (v.0.7.1), it's not a word processor where you in danger of loosing the Time's next week cover story. But I'm the coder - and just one user.
What do you think? Would one (or even others) of those aids add some real benefit in daily usage?


Cheers,
Filehero

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey Filehero,

Actually option 1 might not be a bad idea. Would the asterisk carry over to a new session - that would be getting into the realm of option 3? Instead of an asterisk to indicate a deviation from a predefined layout since you are already using a golden star (and that's kind of nice), maybe something like changing the color of the menu layout menu item to red. This would be a "flag" to the user that he/she modified a layout but not saved it as a a new one. Of course they may not know the significance of the red colored layout name without looking at the help file or note that indicates, "red: layout modification unsaved". The golden starred layout would still have the golden star as it does now. I suppose you could even have a new menu item come up: "last layout: unsaved" indicating the deviation from a saved layout. It could even be red. :biggrin: If this was the case I suppose, it would have the golden star. As a non-coder I don't know how difficult this option would be to implement.

I agree on option 2 a warning message would be over the top and annoying.

Is option 3 in reality something like a "Last Layout" menu item we discussed earlier? I suppose that wouldn't be bad either but certainly don't feel like you have to have any kind of pop-up message or anything to remind the user of an unsaved layout. Like you said, it would be in the menu for the user to act on if the user desires.

When it comes right down to it, I could certainly live with option 4 too and it's probably the easiest option to implement.

I imagine option 1 and 3 would be the most difficult for you as the coder? Sorry for being so indecisive.

Thanks for all your hard work,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,

hope you're doing well.
klownboy wrote:Actually option 1 might not be a bad idea. Would the asterisk carry over to a new session - that would be getting into the realm of option 3?
You're spot on.
O1 is just a visual hint like "you might want to save your changes before they get lost", but nothing would become saved at all in the ini. In a new XS session the "asterisk" (* is for illustration only) would be gone.
Plain_asterisk.gif
Plain_asterisk.gif (3.59 KiB) Viewed 156708 times
O3 would mean, "something" will be saved. Spontaneously I was thinking about one special ini layout section which will kind of backup those settings. More specific: the settings of the layout that has been changed most recently. In a new XY session, this layout would become an extra menu entry, just like (illustration)
LastUnsaved.gif
LastUnsaved.gif (3.67 KiB) Viewed 156708 times
Now the user would have the option to simply rename it or to make a Save As. But know comes the part that's worrying me because it can become quickly (too) confusing. What, if the user first loads another layout, then for instance hit F8? The "last unchanged" entry's layout settings would immediately become overwritten and thereby lost. Tricky, not shure wether the possible gain is worth those troubles.
klownboy wrote:Instead of an asterisk to indicate a deviation from a predefined layout since you are already using a golden star (and that's kind of nice), maybe something like changing the color of the menu layout menu item to red. This would be a "flag" to the user that he/she modified a layout but not saved it as a a new one.
I'm afraid, the "only" adjustment I can (would, of course) provide is the icon. The current SC engine does not allow for any targeted manipulation of types and colors in menues.
klownboy wrote:I suppose you could even have a new menu item come up: "last layout: unsaved" indicating the deviation from a saved layout.
That would be the only way to go for me anyway. If the "backup" ini section is found to be filled in a new XY session, this will be presented as an individual menu entry (the link to the past could be bound to the name). Everything else, e. g. "asterisk" is a change marker only in any current session, but will indicate both the "normal" layout and it's changed brother from the past wouldn't be a very straight-forward user experience, wouldn't it?
klownboy wrote:When it comes right down to it, I could certainly live with option 4 too and it's probably the easiest option to implement.
The good news: if O4 works, O1 is just peanuts on top (I hope, hehe).

I will see, what I could come up with.

Just to make sure: The current 0.7.1 is working for you, no major glitches?

Thanks again for the fruitful discussions.


Cheers,
Filehero

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: LayoutManager

Post by klownboy »

Hey Filehero,

Yes, alpha release 0.7.1 is working fine for me. I haven't stumbled into any major glitches or even a minor one.

So, it sounds like you're shooting to implement the options; 04 first (if a layout was changed from a predefined one, no golden star on reload) and 01 next or in parallel (in-session asterisk to indicate the layout has changed and is not saved). After seeing the results of these changes, consider a version of option 03, a "Last Layout - unsaved" menu item the user would see on reload. I wouldn't worry too much about someone, upon restarting XY, reloading a layout, without seeing or not saving the "Last Layout - unsaved" menu item and consequently loosing the last layout. You're going over and above the call of duty going as far as your going to remind the user of an unsaved layout. :appl:

Looking forward to the weekend. Have a good one.
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: LayoutManager

Post by Filehero »

Hi Ken,
klownboy wrote: 04 first ... and 01 next or in parallel. ...After seeing the results of these changes, consider a version of option 03, ...
Exactly. Have to think about a smart implementation first, than do it - and hope it's not getting to sluggish. :mrgreen:
klownboy wrote:Looking forward to the weekend.
I wish you a very relaxing one. This weekend I'll put my feet up. :wink:


Cheers,
Filehero

Post Reply