Gregor Petrin
2010-12-16 12:30:08 UTC
Hi,
Today I tried to fix a 'bug' that has been bothering me in Krusader for some
time, although in the process I discovered this might not actually be a bug
so I would appreciate anybody's input.
In the spirit of Total Commander's bookmarks, I used ampersands to define
hotkeys to activate certain bookmarks or folders. So a bookmark with the
name "K&rusader" would be accessible by pressing Ctrl+D,R. But then if I
have a bookmark folder called "Referen&ce" positioned before the Krusader
bookmark, pressing R will open the Reference folder and both R and C in that
word will be underlined. My desired behavior would be for R to only activate
Krusader and C only activate Reference.
So I checked out Krusader from SVN and went exploring. I must also add that
I am a complete KDE noob (source code-wise) and that I have been primarily
working with Java and C# for the last 5 or so years. Ahem :) Anyway, I
discovered that the ampersand-as-shortcut concept isn't defined anywhere
explicitly and the fact that it worked at all might be due to me poorly
simulating an internal KMenu behaviour. However, if I uncomment lines 41 &
42 from KrBookmarkButton.cpp (they call KMenu's setKeyboardShortcutsEnabled
and setKeyboardShortcutsExecute methods with argument true), then the
bookmarks menu does indeed operate the way I would like it to, at the
expense of 'automatic' shortcuts defined by the first letter of a bookmark's
title.
Does anybody else use the ampersand-defines-shortcut method? Is it actually
a hack or desired behaviour?
I can think of several ways to fix this:
- fix KMenu to not use shortcuts that are already taken? (haven't looked
through KMenu source code yet)
- disable automatic shortcuts or make them a configurable option (like
mentioned above, removing two lines acomplishes this)
- fix KMenu in krusader by manually & smartly setting ampersands on all
entries without an ampersand
Of course, I may be alone in wanting this functionality and the correct
answer is just 'leave it alone, fool!' :) Please let me know if I am clear
enough in the description of the problem, and please give me your opinions
on the matter.
Regards,
Gregor
Today I tried to fix a 'bug' that has been bothering me in Krusader for some
time, although in the process I discovered this might not actually be a bug
so I would appreciate anybody's input.
In the spirit of Total Commander's bookmarks, I used ampersands to define
hotkeys to activate certain bookmarks or folders. So a bookmark with the
name "K&rusader" would be accessible by pressing Ctrl+D,R. But then if I
have a bookmark folder called "Referen&ce" positioned before the Krusader
bookmark, pressing R will open the Reference folder and both R and C in that
word will be underlined. My desired behavior would be for R to only activate
Krusader and C only activate Reference.
So I checked out Krusader from SVN and went exploring. I must also add that
I am a complete KDE noob (source code-wise) and that I have been primarily
working with Java and C# for the last 5 or so years. Ahem :) Anyway, I
discovered that the ampersand-as-shortcut concept isn't defined anywhere
explicitly and the fact that it worked at all might be due to me poorly
simulating an internal KMenu behaviour. However, if I uncomment lines 41 &
42 from KrBookmarkButton.cpp (they call KMenu's setKeyboardShortcutsEnabled
and setKeyboardShortcutsExecute methods with argument true), then the
bookmarks menu does indeed operate the way I would like it to, at the
expense of 'automatic' shortcuts defined by the first letter of a bookmark's
title.
Does anybody else use the ampersand-defines-shortcut method? Is it actually
a hack or desired behaviour?
I can think of several ways to fix this:
- fix KMenu to not use shortcuts that are already taken? (haven't looked
through KMenu source code yet)
- disable automatic shortcuts or make them a configurable option (like
mentioned above, removing two lines acomplishes this)
- fix KMenu in krusader by manually & smartly setting ampersands on all
entries without an ampersand
Of course, I may be alone in wanting this functionality and the correct
answer is just 'leave it alone, fool!' :) Please let me know if I am clear
enough in the description of the problem, and please give me your opinions
on the matter.
Regards,
Gregor
--
You received this message because you are subscribed to the Google Groups "krusader-devel" group.
To post to this group, send email to krusader-devel-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to krusader-devel+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/krusader-devel?hl=en.
You received this message because you are subscribed to the Google Groups "krusader-devel" group.
To post to this group, send email to krusader-devel-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to krusader-devel+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/krusader-devel?hl=en.