enhance KRecentFilesAction with a ui action to remove entries

Parker Coates parker.coates at gmail.com
Sun Mar 8 20:28:58 GMT 2009


On Sat, Mar 7, 2009 at 13:24, Christoph Pfister
<christophpfister at gmail.com> wrote:
> Patch and screenshot attached - comments welcome (don't know how the
> k-c-d development model works, but I don't mind you / me commiting it
> if it's ok).

It's not a feature I see myself ever needing or using, but it doesn't
really clutter the interface too much, as the action is hidden in the
submenu. If applications have started implementing this on their own,
then it probably makes sense to make it available everywhere. I do
have some nitpicks, though.

I am somewhat concerned with the text chosen for the action. I see
there being the possibility that the word "remove" could be
interpreted as "delete" in this context. I'm also not sure the word
"entries" has any real meaning to your average user. I don't
necessarily have a better suggestion, though. Perhaps "Clear recent
files list"?

Another small detail is the method names "clearActionEnabled()" and
"setClearActionEnabled()". Generally, in the context of actions the
word "enabled" indicates that an item is clickable and not greyed out,
but here it indicates only visibility, which I could see leading to
confusion. "clearActionVisible()" and "setClearActionVisibility()"
might make more sense, but I'd wait for others to weigh in there.

I also don't love that the clear action is still shown when the list
in empty. Shouldn't we be able to add a check to "addUrl()" to detect
if we're adding the first entry to the list and insert the clear
action then? Likewise add a check to "setClearActionEnabled()" to only
add the clear action if the list isn't empty and a check to removeUrl
to hide the clear action when the list is empty.

Parker




More information about the kde-core-devel mailing list