{"action":"created","issue":{"url":"https://api.github.com/repos/freeorion/freeorion/issues/214","labels_url":"https://api.github.com/repos/freeorion/freeorion/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/freeorion/freeorion/issues/214/comments","events_url":"https://api.github.com/repos/freeorion/freeorion/issues/214/events","html_url":"https://github.com/freeorion/freeorion/pull/214","id":95115431,"number":214,"title":"Remember window positions.","user":{"login":"mel-odious","id":12212885,"avatar_url":"https://avatars.githubusercontent.com/u/12212885?v=3","gravatar_id":"","url":"https://api.github.com/users/mel-odious","html_url":"https://github.com/mel-odious","followers_url":"https://api.github.com/users/mel-odious/followers","following_url":"https://api.github.com/users/mel-odious/following{/other_user}","gists_url":"https://api.github.com/users/mel-odious/gists{/gist_id}","starred_url":"https://api.github.com/users/mel-odious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mel-odious/subscriptions","organizations_url":"https://api.github.com/users/mel-odious/orgs","repos_url":"https://api.github.com/users/mel-odious/repos","events_url":"https://api.github.com/users/mel-odious/events{/privacy}","received_events_url":"https://api.github.com/users/mel-odious/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/freeorion/freeorion/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-07-15T06:10:18Z","updated_at":"2015-07-16T13:10:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/freeorion/freeorion/pulls/214","html_url":"https://github.com/freeorion/freeorion/pull/214","diff_url":"https://github.com/freeorion/freeorion/pull/214.diff","patch_url":"https://github.com/freeorion/freeorion/pull/214.patch"},"body":"Allows most non-self-positioning CUIWnd subclasses to save their position/size, visibility, pinned/minimized status to the OptionsDB, which is written to config.xml and saved between executions.  To enable this for new windows, pass a config_name parameter to the CUIWnd constructor.  Only one window can have any given name at a time (logs an error and doesn't let the second window save/load the options).  No more rearranging the design window again and again!\r\n\r\nMakes windows go to the top of the z-order when activated via toolbar button.\r\n\r\nKeeps separate positions for windows in fullscreen and windowed modes and auto-repositions them in response to windowed/fullscreen changes, which helps deal with the fact that FO will only start in fullscreen mode if '-f' is specified on the command line (shouldn't it save this to the OptionsDB?)... not everyone will get around to setting that up, you might forget to start it in fullscreen mode one time, you might just want to play it in a window one time... your fullscreen layout won't be lost.\r\n\r\nAdds a button to OptionsWnd to reset all window properties.  As long as this option is checked (or if '-w' is specified) any existing or newly-created windows will use their default position and size, overwriting what's in the DB.  Useful if the UI somehow breaks badly, could also delete the \\<windows\\> section from config.xml.\r\n\r\nCommits f23541c, 77af188 and 1bf3b2b allow the top-level panels in the map view remember their state when the production/research/design windows are opened, so the sitrep panel, pedia panel, objects list etc. don't need to be re-opened every time you switch to those windows.  Haven't discussed this change on the forums but it was simple to add and relies on changes in this branch, so I put it here for people to test."},"comment":{"url":"https://api.github.com/repos/freeorion/freeorion/issues/comments/121951463","html_url":"https://github.com/freeorion/freeorion/pull/214#issuecomment-121951463","issue_url":"https://api.github.com/repos/freeorion/freeorion/issues/214","id":121951463,"user":{"login":"Vezzra","id":10279417,"avatar_url":"https://avatars.githubusercontent.com/u/10279417?v=3","gravatar_id":"","url":"https://api.github.com/users/Vezzra","html_url":"https://github.com/Vezzra","followers_url":"https://api.github.com/users/Vezzra/followers","following_url":"https://api.github.com/users/Vezzra/following{/other_user}","gists_url":"https://api.github.com/users/Vezzra/gists{/gist_id}","starred_url":"https://api.github.com/users/Vezzra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vezzra/subscriptions","organizations_url":"https://api.github.com/users/Vezzra/orgs","repos_url":"https://api.github.com/users/Vezzra/repos","events_url":"https://api.github.com/users/Vezzra/events{/privacy}","received_events_url":"https://api.github.com/users/Vezzra/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T13:10:29Z","updated_at":"2015-07-16T13:10:29Z","body":"Yep, that toggle on the UI page of the options dialog does the trick. Still not ideal, because players need to be aware that they need to do that after a app window resize instead of restarting the app. So I foresee a lot of complaints about that.\r\n\r\nNevertheless, good enough to accept that PR for 0.4.5. As it works very well otherwise (as far as my brief tests have shown), I'd say ripe for merge... opinions?"}}