Bug 259358 - Re-ordering folders via drag & drop not working anymore
Summary: Re-ordering folders via drag & drop not working anymore
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: 4.7
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 253110 275756 277767 279056 282707 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-09 18:37 UTC by Christian (Fuchs)
Modified: 2012-11-17 15:58 UTC (History)
29 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2010-12-09 18:37:21 UTC
Version:           2.0 beta1 (using KDE 4.5.85) 
OS:                Linux

When choosing to sort folders manually via drag & drop in the context menu, dragging and dropping folders in order to reorder them is not possible. You can only move folders into others, which will be reseted as soon as the folder list is refreshed. 

Reproducible: Always

Steps to Reproduce:
Select ordering folders manually via drag & drop
Try to re-order the folders via drag and drop

Actual Results:  
re-ordering is not possible

Expected Results:  
re-ordering works as in kmail1
Comment 1 Theofilos Intzoglou 2010-12-14 11:08:56 UTC
KMail Version: 2.0.89
KDE 4.5.85/Qt 4.7.1-r1 Gentoo Linux

Same here. You cannot drop anything in "KMail Folders" or between two folders in "KMail Folders". Not only can't you reorder the folders but if you drag'n'drop a folder inside another, it is doomed to stay there! :-)
Comment 2 _ 2011-02-09 05:42:17 UTC
same issues here with,

kde4-config -v
 Qt: 4.7.1
 KDE Development Platform: 4.6.00 (4.6.0)
 kde4-config: 1.0

on opensuse 11.3
Comment 3 Philipp Schmidt 2011-03-11 11:19:40 UTC
Can confirm this using Arch with KDE 4.6.1 and KDEPIM git from 2011-03-10: Behaviour is very annoying as this way I have the most unimportant folders on top and the inbox somewhere in the middle. Very annoying.
Comment 4 Philipp Schmidt 2011-04-19 10:48:52 UTC
Still present in Beta5 from Arch kde-unstable Repository.
Comment 5 Philipp Schmidt 2011-05-02 23:27:57 UTC
Status with git from May 2nd: Reordering kind of works in all levels below the first, but will not drop at the right place (e.g. you drop a folder under another, it is above said folder). First level is still unsortable.
Comment 6 krienke 2011-05-24 08:24:13 UTC
Still does not work on openSuSE 11.3 with kde 4.6.3 and kmail2 Version 2.0.96, Kontact 4.6rc1  from repositoty 
http://download.opensuse.org/repositories/KDE:/Unstable:/SC:/kdepim46/KDE_Distro_Factory_openSUSE_11.4/


kde4-config -v
Qt: 4.7.3
KDE: 4.6.3 (4.6.3) "release 4"
kde4-config: 1.0

Allthough "sort folder by drag and drop" is activated you cannot drag a folder to another place. All folders are displayed alphabetically so my inbox folder is somewhere in the middle of all folders. Dragging a folder icon results only in attempts to move/copy the folder into another one.
Comment 7 Thomas Fischer 2011-06-26 08:52:14 UTC
Bug 275756 is most likely a duplicate of this one. Can someone confirm that and change the other bug's status?

My 2 ct to this bug: It would be a small improvement if special folders like Inbox, Drafts, or Trash would be excluded from the normal sorting and always shown at the top, i.e. directly under the node representing the mail server.
Comment 8 Philipp Schmidt 2011-06-26 10:08:17 UTC
Well, just to keep this bug updated: Still present in 4.6.0.

@Thomas Fischer: Depending on the Way the IMAP server or you yourself handle folder locally that idea is not quite so good. In my case I have s folder structure like this (cause of GMX), written in the order i would like them to view:

inbox
private messages
open source stuff
remaining stuff
trash
sent items
drafts

So I would hate it to have trash etc. before any of my other content folders. It would make sense to have such an option as an option though.

The other bug you mention is definitely a duplicate, maybe one of the bugsquad can mark it accordingly (And maybe finally mark this bug as confirmed or something...), however I left a comment just in case.
Comment 9 Mark 2011-06-26 11:12:04 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Mark 2011-06-26 11:13:52 UTC
*** Bug 275756 has been marked as a duplicate of this bug. ***
Comment 11 FiNeX 2011-07-27 21:12:43 UTC
*** Bug 253110 has been marked as a duplicate of this bug. ***
Comment 12 Michał 2011-08-01 14:50:07 UTC
*** Bug 277767 has been marked as a duplicate of this bug. ***
Comment 13 Christophe Marin 2011-09-24 19:57:24 UTC
*** Bug 279056 has been marked as a duplicate of this bug. ***
Comment 14 Christophe Marin 2011-09-24 19:57:45 UTC
*** Bug 282707 has been marked as a duplicate of this bug. ***
Comment 15 Bruno Friedmann 2011-10-17 07:21:01 UTC
What I don't understand is why the code use for Local Folder (which work) can't be apply to imap resources ? 

Look at screenshots in https://bugs.kde.org/show_bug.cgi?id=282707
Comment 16 Ralph Moenchmeyer 2011-10-17 13:01:51 UTC
(In reply to comment #15)
> What I don't understand is why the code use for Local Folder (which work) can't
> be apply to imap resources ? 
> 
> Look at screenshots in https://bugs.kde.org/show_bug.cgi?id=282707

I cannot confirm  (KDE 4.7.2, Opensuse 11.4, x86_64) that any of the drag and drop behavior required to do a reordering of folders would work within the local folder (see https://bugs.kde.org/show_bug.cgi?id=279056). 

It is just that the initial ordering sequence of subfolders in the local folder is different from what we get from IMAP resources. But a user specific reordering does unfortunately not work in the local folder, either.
Comment 17 Will Stephenson 2011-10-17 19:51:19 UTC
Confirmed with 4.7.2
Comment 18 piedro 2011-10-18 09:09:42 UTC
very annoying bug, same here 4.7.2
Comment 19 Marc Schiffbauer 2011-10-26 21:01:29 UTC
Please vote for the bug. Its really annoying...

Confirmed on current 4.7 branch
Comment 20 Laurent Montel 2011-10-28 10:36:11 UTC
Fixed reload config for manual order
(fixed in 4.7.4/master)
Comment 21 Marc Schiffbauer 2011-10-28 11:14:23 UTC
(In reply to comment #20)
> Fixed reload config for manual order
> (fixed in 4.7.4/master)

I guess you are still working on it? Then thanks for the update. I just compiled current 4.7 branch again, but the issue is still there.

To me it seems that the problem is:

It is not possible to drag a folder and then drop it between two other folders to rearrange it.
You just can move folders into other folders.

Now what happened to me while testing a minute ago is: I wanted to rearrange the INBOX and accidentally dropped it into the Drafts folder. When kmail tried to sync this change (IMAP) the server will have refused that change because moving a root folder into one of its children is not really a good idea ;)

Now kmail (or akonadi?) lost all locally cached mails and just has started to redownload everything... this will last some hours now.
Comment 22 Laurent Montel 2011-10-28 11:19:50 UTC
I can reorder folder by dnd.
but not all is perfect yet.
Comment 23 Bruno Friedmann 2011-10-29 11:54:19 UTC
What about getting the normal order we have in local folders when accessing IMAP folders. So important are placed first like Inbox,Trash,Sent,Junk,Draft ? 

Is it fixed too ? 

Next question, is there a backport to actual 4.7.2 branch ? So it can be apply as a fix to released distribution ?
Comment 24 Marc Schiffbauer 2011-10-30 23:14:26 UTC
(In reply to comment #22)
> I can reorder folder by dnd.
> but not all is perfect yet.

Sorry, I can't. Maybe I am too stupid. How should this work? I can move folders by dnd but I cannot reorder them. My tries to do so always result in folders being moved...
Comment 25 Andreas Pietzowski 2011-11-08 20:51:59 UTC
Still present in 4.7.3. All folders are just sorted alphabetically. Although special folders. I expect inbox on top and not after tons of folders stating alphabetically lower. Would be nice to see this fixed soon.

BTW: Developers, which mail client do you use in your daily life that you didn't recognize or solved this annoying issue in kmail since 4.7.2? :-)
Comment 26 Branislav Klocok 2011-11-09 09:10:25 UTC
Can confirm. Still there in 4.7.3 on on opensuse 11.4. Very very annoying.
Comment 27 Ralph Moenchmeyer 2011-12-13 15:13:25 UTC
(In reply to comment #20)
> Fixed reload config for manual order
> (fixed in 4.7.4/master)

I just installed KDE 4.7.4 within Opensuse 12.1.
The problem with reordering folders by dnd still exists. No change since 4.7.2.
Comment 28 Marc Schiffbauer 2011-12-13 15:56:04 UTC
Its also still present in 4.8.90 (Beta 2)

I vote for changing automatic ordering, so that the special folders are always on top (At least Inbox, Sent, Drafts and Trash)
Comment 29 Bruno Friedmann 2011-12-14 16:11:35 UTC
Marc you forget also Junk :D
Comment 30 piedro 2011-12-15 00:04:43 UTC
I updated to 4.7.4 within Kubuntu 11.10. No difference at all. No method to customly order folders (btw: still no way to customize favorite folders also!). I don't see where anything changed, so how comes someone claiming it's changed in 4.7.4? plz comment or correct your statement. thx. p.
Comment 31 Peter Lewis 2012-01-29 09:23:59 UTC
Confirmed - this regression is present in 4.8.0. Thanks.
Comment 32 Francesco Verdoja 2012-02-11 17:04:46 UTC
KMail 4.8.0 and the bug is still there.
Comment 33 Florian 2012-02-14 10:38:23 UTC
Confirmed on Kubuntu Oneiric using Kmail 4.7.3

This is so annoying... :-/ I really used to be a big fan of Kmail, but this is a pain in the place where the sun doesn't shine...
Comment 34 Marc Schiffbauer 2012-02-14 12:22:33 UTC
What worries me a bit is that, there is absolutely no reaction from the devs. Maybe this bug is out of focus? Or there is too much to do. Or a lack of time...

Ping $devs. Any news on that issue?

Is this PITA too complicated to fix? Would really be cool to have this fixed soon, because it would really greatly improve user experience of kmail.

Thanks
-Marc
Comment 35 Laurent Montel 2012-02-15 20:48:17 UTC
Git commit 5e01733877c54bae7ab6a55569c668b6bc51b5e5 by Montel Laurent.
Committed on 15/02/2012 at 21:47.
Pushed by mlaurent into branch 'master'.

Start to fix Bug 259358 - Re-ordering folders via drag & drop not working anymore

M  +1    -5    mailcommon/entitycollectionorderproxymodel.cpp

http://commits.kde.org/kdepim/5e01733877c54bae7ab6a55569c668b6bc51b5e5
Comment 36 Laurent Montel 2012-02-15 20:49:01 UTC
Git commit fc34101c8a56178c3648e6d327db487d12035c1e by Montel Laurent.
Committed on 15/02/2012 at 21:47.
Pushed by mlaurent into branch 'KDE/4.8'.

Start to fix Bug 259358 - Re-ordering folders via drag & drop not working anymore
(cherry picked from commit 5e01733877c54bae7ab6a55569c668b6bc51b5e5)

M  +1    -5    mailcommon/entitycollectionorderproxymodel.cpp

http://commits.kde.org/kdepim/fc34101c8a56178c3648e6d327db487d12035c1e
Comment 37 Laurent Montel 2012-02-15 21:54:20 UTC
Git commit cfe5c509d9fae948cbe5367e2cfcdf6096c41cad by Montel Laurent.
Committed on 15/02/2012 at 22:52.
Pushed by mlaurent into branch 'master'.

Fix Bug 259358 - Re-ordering folders via drag & drop not working anymore

Order was not good because we looked at "row" but it's not the real order
The real order is defined by lessThan

=> create a temporary QMap to order list and create real order.

FIXED-IN: 4.8.1

M  +17   -4    akonadi/entityorderproxymodel.cpp

http://commits.kde.org/kdepimlibs/cfe5c509d9fae948cbe5367e2cfcdf6096c41cad
Comment 38 Laurent Montel 2012-02-15 21:55:18 UTC
Git commit 04cf99e0d5cab9b8953f1070bc32d33f9f0aea7e by Montel Laurent.
Committed on 15/02/2012 at 22:52.
Pushed by mlaurent into branch 'KDE/4.8'.

Fix Bug 259358 - Re-ordering folders via drag & drop not working anymore

Order was not good because we looked at "row" but it's not the real order
The real order is defined by lessThan

=> create a temporary QMap to order list and create real order.

FIXED-IN: 4.8.1
(cherry picked from commit cfe5c509d9fae948cbe5367e2cfcdf6096c41cad)

M  +17   -4    akonadi/entityorderproxymodel.cpp

http://commits.kde.org/kdepimlibs/04cf99e0d5cab9b8953f1070bc32d33f9f0aea7e
Comment 39 Marc Schiffbauer 2012-02-15 23:44:15 UTC
Hi Laurent,

thanks for looking after that bug. I just tested your new patch. Maybe I am too stupid, but I am not able to reorder Folders in Kmail via Drag and Drop. How is that supposed to work?

I right-clicked the Header of the Folder List-Widget and set to "manual order by drag and drop" at the bottom of the menu, ok.

But how to do it? If I drag a folder I can move that folder to somewhere instead of reordering it in the List? I tried holding down Alt-/Shift-/Ctrl-Key while dragging but for that the usual file-DnD actions are in place: Move/Link/Copy etc (How will you do a Link of a Folder in IMAP BTW?)

And another issue (That might be woth another bugreport): Why don't you simply have a default folder order where the special folders come first and then any subfolders in the account. I think that way most people will not need the "manual order"-thingy anymore...

Thanks
-Marc
Comment 40 Laurent Montel 2012-02-16 08:15:23 UTC
when you move it between two folder you reorde it.
But it's right there is still dnd menu I will look at to remove it
(but it works)

Default order is automatic order Why add an other order ?
Comment 41 Silver Salonen 2012-02-16 09:22:32 UTC
At least in 4.8.0 the special folders already are ordered before the other folders. At least in my KMail.
Comment 42 Laurent Montel 2012-02-16 09:25:57 UTC
yes it was fixed in 4.8.0 and I fixed a problem with inbox when inbox was translated in 4.8.1.
So default order is ok now.

Manual order is perhaps not perfect yet.
Comment 43 Marc Schiffbauer 2012-02-16 10:52:06 UTC
(In reply to comment #40)
> when you move it between two folder you reorde it.

That seems not to be possible here. I am trying really hard, but there seems to be no "Space" between to folders...

> But it's right there is still dnd menu I will look at to remove it
> (but it works)
> 
> Default order is automatic order Why add an other order ?

Well, maybe thats only true for local folders? I only use IMAP-Accounts and here the order is just alphabetically and the special folders are not treated differently and moved to the top.
And its really annoying to have e.g. the INBOX somewhere betweeen all the other folders.

Thanks
-Marc
Comment 44 Marc Schiffbauer 2012-02-16 10:54:00 UTC
Additional note: I just noticed that I am able to reorder folders only for the local folders that I never use here.

For IMAP there is no chance to do it.
Comment 45 Marc Schiffbauer 2012-02-16 10:57:47 UTC
Sorry for the noise: Automatic order for IMAP-Folders IS correct now, sorry!

While playing with it the ordering in IMAP accounts was correct after re-applying the auto-order, so it seems I had to switch to manual order and back to auto-order to make kmail do it right now...

So what is left, is that no DragNDrop is possible for IMAP-Folders.
Comment 46 Laurent Montel 2012-02-16 11:29:16 UTC
It works fine here dnd + imap.
Comment 47 Laurent Montel 2012-02-16 11:32:47 UTC
Git commit 4eedb3855c3fee5491cf52e52f6edee026d27272 by Montel Laurent.
Committed on 16/02/2012 at 12:31.
Pushed by mlaurent into branch 'master'.

Fix dnd menu when we move collection between two item.

=> don't show it when we use automatic sorting.
show just move when we use manual sorting.

M  +24   -2    akonadi/dragdropmanager.cpp
M  +8    -0    akonadi/dragdropmanager_p.h
M  +18   -0    akonadi/entitytreeview.cpp
M  +16   -0    akonadi/entitytreeview.h

http://commits.kde.org/kdepimlibs/4eedb3855c3fee5491cf52e52f6edee026d27272
Comment 48 Laurent Montel 2012-02-16 11:33:22 UTC
Git commit 5fa884a837b936900a96c2b6f4281fdd104787a0 by Montel Laurent.
Committed on 16/02/2012 at 12:31.
Pushed by mlaurent into branch 'KDE/4.8'.

Fix dnd menu when we move collection between two item.

=> don't show it when we use automatic sorting.
show just move when we use manual sorting.
(cherry picked from commit 4eedb3855c3fee5491cf52e52f6edee026d27272)

M  +24   -2    akonadi/dragdropmanager.cpp
M  +8    -0    akonadi/dragdropmanager_p.h
M  +18   -0    akonadi/entitytreeview.cpp
M  +16   -0    akonadi/entitytreeview.h

http://commits.kde.org/kdepimlibs/5fa884a837b936900a96c2b6f4281fdd104787a0
Comment 49 Laurent Montel 2012-02-16 11:34:43 UTC
Git commit 0dccd8479e1857859f6db48a90672caccbab9476 by Montel Laurent.
Committed on 16/02/2012 at 12:34.
Pushed by mlaurent into branch 'master'.

Fix dnd menu when we move collection between two item.

=> don't show it when we use automatic sorting.
show just move when we use manual sorting.

M  +1    -0    mailcommon/foldertreewidget.cpp

http://commits.kde.org/kdepim/0dccd8479e1857859f6db48a90672caccbab9476
Comment 50 Laurent Montel 2012-02-16 11:35:20 UTC
Git commit 708b77f03c4e3a3f024df47c5397a8a9b61c678b by Montel Laurent.
Committed on 16/02/2012 at 12:34.
Pushed by mlaurent into branch 'KDE/4.8'.

Fix dnd menu when we move collection between two item.

=> don't show it when we use automatic sorting.
show just move when we use manual sorting.
(cherry picked from commit 0dccd8479e1857859f6db48a90672caccbab9476)

M  +1    -0    mailcommon/foldertreewidget.cpp

http://commits.kde.org/kdepim/708b77f03c4e3a3f024df47c5397a8a9b61c678b
Comment 51 Laurent Montel 2012-02-16 11:35:57 UTC
Menu DND fixed now.
Update your kdepimlibs/kdepim.

For me it's ok now
Comment 52 Marc Schiffbauer 2012-02-16 13:51:01 UTC
Hi Laurent,

I rebuilt kdepimlibs and kdepim. In IMAP reordering of folders does not work for me. At least with top-level folders. What indeed works is to reorder subfolders within a toplevel-folderin, but it is for example not possible to move the INBOX folder to the first position of the folder list.

-Marc
Comment 53 km 2012-11-17 15:58:12 UTC
KDE 4.9.3 - reordering top-level folders works for me, as well as standard subfolders, but reordering subfolders of [Gmail] folder doesn't work.