<table><tr><td style="">dvratil created this revision.<br />dvratil added a project: KDE PIM.
</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/D4791" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This is an experiment that I hacked together to see how it would work and feel to have folders separated to per-account tabs. The code still needs work, but I'd like to know your opinions on this first before I sink more time into the feature.</p>
<p>The idea is that instead of having a single tree of all folders, you have per-account tabs on the side and each tab only shows folders from given account.</p>
<p><a href="https://phabricator.kde.org/F2610200" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">F2610200: kmail-new-accounts-1.png</a></p>
<p>I think this could make the folder view a bit easier to use if you have lots and lots of folders and multiple accounts (like we all do :-)). The patch is written in a way that the feature can very easily be turned off, because this separation does not make much sense if you only have Local Folders plus maybe one IMAP account or if all your folders fit onto your screen.</p>
<p>I have some more ideas that are not implemented yet, I would like to know your opinions on them too</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">better indication of unread email count (blue bold number next to the account name instead of the current plain text)</li>
<li class="remarkup-list-item">per-account colors - each account would have its own color and the tab and the view background would have the same color and the color would be used everywhere else in KMail when there's a Folder selection combobox or something like that to make it easy to quickly identify which account the folder belongs to. This is inspired by recent KDevelop feature where each project has a different color and then each file tab has the color based on which project the file belongs to to make it easier to navigate between files: <a href="https://phabricator.kde.org/F2610234" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">F2610234: kdev-colors.png</a></li>
<li class="remarkup-list-item">Right-clicking the tab would show a context menu with following actions:<ul class="remarkup-list">
<li class="remarkup-list-item">Synchronize all folders</li>
<li class="remarkup-list-item">Account configuration (opens respective resource configuration dialog)</li>
<li class="remarkup-list-item">Remove account (??)</li>
<li class="remarkup-list-item">Customize (set custom icon, color etc.)</li>
</ul></li>
<li class="remarkup-list-item">Drag&drop to reorder the accounts (replacing Settings -> Configure KMail -> Accounts -> Customize account order)</li>
<li class="remarkup-list-item">possibility to set a shortcut for each tab to quickly toggle between them</li>
<li class="remarkup-list-item">your idea comes here :-)</li>
</ul>
<p>If you want to test the patch, you also need to apply the following patch to kmail.git to enable the feature:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="diff" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">diff --git a/src/kmmainwidget.cpp b/src/kmmainwidget.cpp</span>
<span style="color: #000080">index c9b06d1..f4446f6 100644</span>
<span style="color: #a00000">--- a/src/kmmainwidget.cpp</span>
<span style="color: #00a000">+++ b/src/kmmainwidget.cpp</span>
<span style="color: #800080">@@ -987,4 +987,5 @@ void KMMainWidget::createWidgets()</span>
opt |= FolderTreeWidget::UseLineEditForFiltering;
opt |= FolderTreeWidget::ShowCollectionStatisticAnimation;
opt |= FolderTreeWidget::DontKeyFilter;
<span style="color: #00a000">+ opt |= FolderTreeWidget::UseAccountTabs;</span>
mFolderTreeWidget = new FolderTreeWidget(this, mGUIClient, opt);</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R92 PIM: Common Mail Support</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4791" rel="noreferrer">https://phabricator.kde.org/D4791</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/folder/accounttabbar.cpp<br />
src/folder/accounttabbar_p.h<br />
src/folder/foldertreewidget.cpp<br />
src/folder/foldertreewidget.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>dvratil, mlaurent, bjoernbalazs<br /><strong>Cc: </strong>KDE PIM, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>