Can we* prettyplease do something about the KUrlNavigator?

Thomas Lübking thomas.luebking at web.de
Fri Jun 19 19:30:53 BST 2009


Am Friday 19 June 2009 schrieb Matthew Woehlke:
> > The (real) lineedit will stay until it looses the focus.
> > As you'd still have to click twice to enter a specific position within
> > the line (as it is ratm) one could use the ctrl modifier as kind of
> > "brain i/o extension" but that's still rather hidden and would remain a
> > "pro" feature then...
>
> How would that work? It seems like it would be hard to get it working
> well, but could be a solution.
The switch would happen on the mousepress event.

- If you click on some "empty" space in the (visually lineediting) 
KUrlNavigator, it re-enters the lineedit mode.

- Also regardles the position if you have some modifier (in doubt: ctrl) down.

- If cou click a crumb (already indicated by hovering) it remains in the 
breadcrumb mode and simply handles the click (change path or open popup).

I'd see two remaining questions/issues:
1.
what to do if the widget looses the focus because the window lost it's active 
state?
a) drop focus and return to breadcrumb mode
b) keep focus. when the window is reactivated (w/o instant focus change 
because of clicking a strong focus widget) the lineedit mode auto-reactivates.

to me b) sounds more natural.
the user won't be able to return to the breadcrumb mode by just leaving the 
window - but while this might be a little issue on the first run it has great 
advantages later on (e.g.: edit the path, alt+tab konsole to copy a path out, 
alt+tab back, ctrl+v and you're done... i think that's you use case, yesno?)

2.
how to handle the initial cursor position?
a) present line as it has been before (on init: 1st char starts on pixel 0) 
and move the caret to the clicked pixel
b) move the caret to the appropriate position in the text path (i.e. 
translated from the breadcrumb position that differs due to a possibly 
incomplete path and the triangle delimiters) and ensure it's visible

again, i'm in favor of b), but one could probably argue a lot on this one.

> The problem is there is no way to know if the next change I will want to
> type, or use breadcrumb mode.
In order to type or do anything useful on a lineedit, you must first pass it 
the focus.
Therefore we just assume you want to use the breadcrumbs unless you actively 
focus the widget (like you currently do by clicking some empty space and 
always have to use your keyboard anywhere)

See? No brain required ;-P

Thomas




More information about the kde-core-devel mailing list