Bug 273052

Summary: kicker: [LayoutInformation] not stored / wrong order of symbols on session restore
Product: [Unmaintained] plasma4 Reporter: Thomas Eschenbacher <Thomas.Eschenbacher>
Component: containment-panelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: martin_haas
Priority: NOR    
Version First Reported In: 4.6.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Eschenbacher 2011-05-11 18:00:21 UTC
Version:           4.6 (using KDE 4.6.2) 
OS:                Linux



Reproducible: Always

Steps to Reproduce:
- add some widgets to the kicker applet, e.g. in this order:
  K menu / device notifier / kcalc / firefox / thunderbird
- log out
- log in again

Actual Results:  
the order of some widgets (application icons) is messed up. In my case I get:
K menu / firefox / device notifier / kcalc / thunderbird

and I have to reorder them every time manually :-(

Expected Results:  
The order in which I put the widgets should be stored and survive a logout/login.

This annoyance exists since the earlies KDE-4.x versions I had. Since KDE-4.6 at least the widgets which are at the right side of the pager keep their position, which is an improvement against the versions before.

The order which KDE "decides" to use seems to be stable, if I log out/in multiple times no further changes occur.

How can I help debugging this?
Is this "order" of widgets stored in some config file under ~/.kde4/share/config ?
Comment 1 Thomas Eschenbacher 2011-05-29 07:56:00 UTC
Something seems to go wrong when writing the config file. Here what I found out:

1. cd ~/.kde/share/config

2. open plasma-desktop-appletsrc and search for a symbols (programs) that are placed right. In my example, I found that all symbols have a corresponding section called "[Containments][3][Applets]".

3. back in the console:

cat ./plasma-desktop-appletsrc | grep "\[Containments\]\[3\]\[Applets\]" -A 1 | grep "Order=" -B 1

4. Watch out for a "hole" in the numbering. In my case the "Order=" went like this: 0,1,2,3,4,6,7,8,... => number 5 was missing!

5. edit plasma-desktop-appletsrc again and search for the program that is misplaced. In my example I found this section:

[Containments][3][Applets][309][Configuration]
Url=file:///usr/share/applications/firefox.desktop

6. add a corresponding "LayoutInformation" subsection for it (this was missing!)

[Containments][3][Applets][309][LayoutInformation]
Order=5
     ^^___ the "5" is what I found out in step 4, see above

7. now it works :-)
Comment 2 Myriam Schweingruber 2012-05-27 11:30:39 UTC
Is this still valid for KDE 4.8.3 or trunk?
Comment 3 Thomas Eschenbacher 2012-05-29 16:14:04 UTC
On my own account this didn't happen anymore, as I fixed the corresponding config file on my own.

I upgraded to 4.8.3 and tried with a test account now, but it is not 100% the same behavior. I added some programs programs to the kicker, reordered them, logged out, logged in - and the order has changed. Then I tried again twice, but the order of the programs I added didn't change anymore. 

The only thing that now happens is that there are two "launchers" in the kicker bar that I can remove, but at the next login they come back again...
Comment 4 Myriam Schweingruber 2012-05-29 22:39:15 UTC
The two launchers might be a different bug, could you report this separately, please? 
I close this as working now, please feel free to reopen if the same behavior appears again with the wrong order.
Comment 5 Martin Haas 2016-10-27 08:00:09 UTC
Many thanks Thomas for posting this fix! 

Works for me too (KDE 4.14.8)