[Panel-devel] Patch: sort taskbar entries by position in kmenu
Fred Schaettgen
kde.sch at ttgen.net
Wed Jun 8 00:43:06 CEST 2005
Hi all,
AFAIK kicker in trunk sorted taskbar items by application name a while ago.
According to Stefan Nikolaus the tasks were sorted strictly by name until
some other changes broke it. Currently new items are appended to the end of
the task list unless there is another instance of the same application
running already. In that case the new taskbar item is added next to the
existing item of the same window.
I don't know if the behavior was really changed by accident or if it was
intentional. Anyway, what I tried is to sort taskbar items in the order in
which they appear in the kmenu. The idea is that we don't just group _equal_
applications, but also _similar_ applications.
Pros:
++ The ordering of applications is always the same - after a restored session
or after closing and restarting an application (like strict sorting by name),
so it might be easier to find after a while.
++ Similar applications go to similar places. Devel tools left, utilities
right, internet stuff left of multimedia stuff etc.
My theory is that this reduces the brain load factor a little compared to
sort-by-application. With sorting by name and all-k-apps, kedit would be on
the left, kwrite on the right.
ok, that was the short list ;)
Cons:
-- Needs to read the kmenu entries. Currently I do this once when the first
taskbar item is added. Adds a penalty of ~63ms on my system with debugging
output disabled. We don't need to do this regularly, because we don't want to
track the kmenu ordering, we just want a good ordering scheme.
-- Finding applications in the kmenu doesn't work reliable.
Most KDE apps work, gimp doesn't, inkscape does for instance. I am just
comparing the desktop entry name and filename with the application name. When
this breaks, the application name will be used as sort key instead of the
kmenu path.
That's not all that bad, since it is still deterministic in that case, but
gimp won't be next to other graphics tools then.
-- More flicker, because a new item is inserted between others and because the
startup notification tends to stay a blink of an eye too long.
This isn't a big issue when we add new items always on the right, but it's the
same for the sort-by-name approach. Side note: kicker in trunk puts the
startup notification always to the right, even if the application is inserted
in the middle later.
-- Sorting order cannot be deduced from name.
With sort-by-name that's possible, but it also doesn't work very well because
few programs display their actual application name in the title so that it's
actually visible in the small taskbar button.
-- Ordering is not by startup time anymore.
With the append-to-right approach, recently started applications can be found
more easily, while it doesn't really help much for the long running
applications, which are usually the majority.
so what do you think? good? bad? irrelevant?
Fred
--
Fred Schaettgen
kde.sch at ttgen.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: taskbar_sort_by_menupos-schaettgen-20050607.diff
Type: text/x-diff
Size: 5993 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20050608/6df4a5a5/taskbar_sort_by_menupos-schaettgen-20050607.bin
More information about the Panel-devel
mailing list