<table><tr><td style="">ahmadsamir updated this revision to Diff 61336.<br />ahmadsamir retitled this revision from "When loading a session always restore the open recent list" to "When loading a session always load the "open recent" list".<br />ahmadsamir edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-smdnz5hyj6vzc7q/">(Show Details)</a><br />ahmadsamir edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-w6mlhhymgzsp6ln/">(Show Details)</a><br />ahmadsamir added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21876">View Revision</a></tr></table><br /><div><div><p>Reworked diff.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Previously the code in</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">KateMainWindow: move</span> load<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Session only called KateMainWindow::readProperties</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">ing/saving "open recent" files list to separate</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">if "restore window configuration" was true, but readProperties has</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">functions to enable loading that list when loading a session regardless</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">nothing, AFAICS, to do with the window configuration. This also fixes</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">of the "save window configuration" setting.<br />
<br />
Note that there was no strict need to move the code that saved the list</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">a bug where kate didn't load the open recent files entries if</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">outside of KateMainWindow::saveProperties(), but this way the code is less</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">"restore window </span>conf<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">iguration" was set to false</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">using</span>.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;">- Open <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">a </span>kate wi<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">ndow and load a</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">th a new/anonymous</span> session<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"><br />
- Make sur</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">, and disabl</span>e "restore window configuration"<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> is enabled on the session<br />
  config page</span><br />
- Open some files <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">so that there are some entries in File -> Open Recent</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">to populate the "open recent" menu, then close kate</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- Save the session,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- Open kate again with a new/anon.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">then close and reopen it,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">session;</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">the entries in O</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">check if the "o</span>pen <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">R</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">r</span>ecent<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">" menu</span><br />
  <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">should be displayed as expected</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">has been populated  with the previously opened files</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- Disable "restore window configuration",</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- Load a different session in</span> the<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">n save the session,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> same window;</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">close it</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">check if the "open recent" menu</span><br />
  <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">then reopen it, note that the Open Recent menu is disabled/grayed<br />
- Apply the patch then try again, and Open Recent entries should be restored<br />
  as expect</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">has been populated with the files list from that session<br />
<br />
- Repeat the same steps but with "restore window configuration" enabl</span>ed</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R40 Kate</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D21876?vs=60001&id=61336">https://phabricator.kde.org/D21876?vs=60001&id=61336</a></div></div><br /><div><strong>BRANCH</strong><div><div>session-window-config (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21876">https://phabricator.kde.org/D21876</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kate/katemainwindow.cpp<br />
kate/katemainwindow.h<br />
kate/session/katesessionmanager.cpp</div></div></div><br /><div><strong>To: </strong>ahmadsamir, Kate, cullmann, dhaumann<br /><strong>Cc: </strong>cfeck, kwrite-devel, domson, michaelh, ngraham, demsking, cullmann, sars, dhaumann<br /></div>