MapWnd save/restore popup visibility consistently
Moderator: Committer
MapWnd save/restore popup visibility consistently
I was puzzled by the fact that some popups visibility was not restored when toggling on and off for production, research and design windows. Is that intentional ?
The attached patch makes the behaviour consistent in the 3 cases : hide all popups upon showing the fullscreen window, and show all that were opened on close.
The attached patch makes the behaviour consistent in the 3 cases : hide all popups upon showing the fullscreen window, and show all that were opened on close.
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!
Let's unleash the dyson forest powa!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MapWnd save/restore popup visibility consistently
None of the SitRepPanel, ObjectListWnd, or SidePanel are derived from MapWndPopup, so hiding popups doesn't hide them.
Re: MapWnd save/restore popup visibility consistently
OK I understand why the patch is wrong, but what about the rationale for it :
When I toggle research (or production, or design) on then off, the objects and sitrep panels get closed (or hidden) without my consent, whereas the empires and messages stay opened, that's the inconsistency I was trying to fix, is it intentional ?
And what about the hunk that added showallpopups() to hidedesign(), was that forgotten or as designed ?
When I toggle research (or production, or design) on then off, the objects and sitrep panels get closed (or hidden) without my consent, whereas the empires and messages stay opened, that's the inconsistency I was trying to fix, is it intentional ?
And what about the hunk that added showallpopups() to hidedesign(), was that forgotten or as designed ?
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!
Let's unleash the dyson forest powa!
Re: MapWnd save/restore popup visibility consistently
Up until very recently, empire and messages stayed open all the time and there was no toggle for them, whereas sitrep and objects had a toggle since the beginning.
I would love it if sitrep stayed open when you go into a different window, but if that were to happen I think you'd also need a 'home' or 'top' option within the panel.
I would love it if sitrep stayed open when you go into a different window, but if that were to happen I think you'd also need a 'home' or 'top' option within the panel.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MapWnd save/restore popup visibility consistently
I think the purpose of HideAppPopups and ShowAllPopups was to accomplish what you want, but most of the "popup" windows are't derived from MapWndPopup, so don't work with this feature.vincele wrote:When I toggle research (or production, or design) on then off, the objects and sitrep panels get closed (or hidden) without my consent, whereas the empires and messages stay opened, that's the inconsistency I was trying to fix, is it intentional ?
Presumably it's OK... Should work the same as any other full screen window (research, sort of production)...And what about the hunk that added showallpopups() to hidedesign(), was that forgotten or as designed ?
Re: MapWnd save/restore popup visibility consistently
Would that be the best route for action ? I can give this a try...Geoff the Medio wrote:I think the purpose of HideAppPopups and ShowAllPopups was to accomplish what you want, but most of the "popup" windows aren't derived from MapWndPopup, so don't work with this feature.vincele wrote:When I toggle research (or production, or design) on then off, the objects and sitrep panels get closed (or hidden) without my consent, whereas the empires and messages stay opened, that's the inconsistency I was trying to fix, is it intentional ?
Do you want me to resend just this hunk separated, or you do it yourself ?Presumably it's OK... Should work the same as any other full screen window (research, sort of production)...And what about the hunk that added showallpopups() to hidedesign(), was that forgotten or as designed ?
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!
Let's unleash the dyson forest powa!
Re: MapWnd save/restore popup visibility consistently
Yes, I think I remember this being different in the past.MatGB wrote:Up until very recently, empire and messages stayed open all the time and there was no toggle for them, whereas sitrep and objects had a toggle since the beginning.
BTW, what people think of the 2 others in this row-of-toggle-buttons that are not quite toggles: the menu and the graphs/pedia buttons. I would like them to all behave in the same way: on-off toggles. Would that be OK ?
A side effect of my patch is that sitrep (and object) stay opened (or closed) when you get back from design, prod or research. The patch did it the wrong way, but the result is what I wanted, and I find it pleasant not to need to reopen them myself.MatGB wrote:I would love it if sitrep stayed open when you go into a different window, but if that were to happen I think you'd also need a 'home' or 'top' option within the panel.
I don't understand your top or home options, care to elaborate a bit ?
Thanks
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!
Let's unleash the dyson forest powa!
Re: MapWnd save/restore popup visibility consistently
Within sitrep, you can have a very long list, and sometimes an important thing happens near the bottom and it prompts you to go do something in production or similar.
Your fix means when you come out of production you're still at the bottom of the long list. That's very good except...
Scrolling back up again can be annoying, I have for a long time without really thinking about it simply opened and closed prodwnd to get to the top of the sitrep list again.
Does opening/closing sitrep itself take you back to the top? (basically, I'm a big fan of the keyboard 'home' button, so much so I've remapped my CAPSLOCK to be a home button, which is slightly annoying scripting but...)
Your fix means when you come out of production you're still at the bottom of the long list. That's very good except...
Scrolling back up again can be annoying, I have for a long time without really thinking about it simply opened and closed prodwnd to get to the top of the sitrep list again.
Does opening/closing sitrep itself take you back to the top? (basically, I'm a big fan of the keyboard 'home' button, so much so I've remapped my CAPSLOCK to be a home button, which is slightly annoying scripting but...)
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MapWnd save/restore popup visibility consistently
After a few seconds of testing, yes. That's actually the sort of thing I'd have made a point of trying to prevent from happening, had I thought about it and been so inclined.MatGB wrote:Does opening/closing sitrep itself take you back to the top?
Re: MapWnd save/restore popup visibility consistently
My inclination, too, would be for opening and closing to NOT reset the scroll to the top. If I swap over to the production window or something and come back, I'm much more likely to want to continue reviewing from where I was, not have to rescroll back to that point. That's much more common for me that wanting to quickly get back to the top (except at the start of a new turn, and presumably that would always reset scroll to the top, I suppose any change of which turns info is presented should do that).Geoff the Medio wrote:After a few seconds of testing, yes. That's actually the sort of thing I'd have made a point of trying to prevent from happening, had I thought about it and been so inclined.MatGB wrote:Does opening/closing sitrep itself take you back to the top?
In order to accommodate a fast zoom to top or bottom I suppose our scrollbars (or probably a subclass) could have a little zoom button area at the top and bottom for going immediately to that end.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: MapWnd save/restore popup visibility consistently
To be clear, I want it to stay where it is if I go in/out of prodwind, but I have the (bad) habit of doing that to get back to the top, when I should just toggle sitrep on/off (don't ask me where it came from, no clue, pointless).
What I want is for it to, normally, stay where it is on open/close or to go somewhere else and come back, but it also needs an easy top/bottom link, the scrollbar button idea would be fine, as would top/bottom next to back/next/last buttons, I care not as long as it's there.
What I want is for it to, normally, stay where it is on open/close or to go somewhere else and come back, but it also needs an easy top/bottom link, the scrollbar button idea would be fine, as would top/bottom next to back/next/last buttons, I care not as long as it's there.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MapWnd save/restore popup visibility consistently
Is dragging the scrollbar to the top particularly difficult for this list? It seems odd to need a special button just in this case... (or at all, really... scrollbars work?)
Re: MapWnd save/restore popup visibility consistently
Maybe a key mapping <HOME> and <END> key presses would be good or even enough, but I'm coming with a lot of CLI background.Geoff the Medio wrote:Is dragging the scrollbar to the top particularly difficult for this list? It seems odd to need a special button just in this case... (or at all, really... scrollbars work?)
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!
Let's unleash the dyson forest powa!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MapWnd save/restore popup visibility consistently
Trouble with that is that it would only work for the current focus window, but there's not much indication in the UI what window has focus, except in cases like an edit control where there's a blinking caret.vincele wrote:Maybe a key mapping <HOME> and <END> key presses...
Re: MapWnd save/restore popup visibility consistently
Dragging scrollbars across significant portions of a large document is something that I have seen strain an underpowered system to the point of near inoperability. That said, I think that other things in FO would likely break before the Sitrep window ever reached such size, so I expect you are right that such buttons for the sitrep window are probably unneeded. Just to check, Matt, do you ever observe any real problems with dragging the sitrep scrollbar; is there a particular reason you dislike dragging it to the top?Geoff the Medio wrote:Is dragging the scrollbar to the top particularly difficult for this list? It seems odd to need a special button just in this case... (or at all, really... scrollbars work?)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0