Patch for "Open Terminal Here" keyboard shortcut

Nick Schermer nickschermer at gmail.com
Mon Nov 7 11:53:13 CET 2011


On Mon, Nov 7, 2011 at 11:37 AM, Yves-Alexis Perez <corsac at debian.org> wrote:
> On lun., 2011-11-07 at 03:34 +0100, Jannis Pohlmann wrote:
>> I've pushed this to the jannis/file-menu-custom-actions branch:
>>
>>
>> http://git.xfce.org/xfce/thunar/commit/?h=jannis/file-menu-custom-actions&id=36dea6078ac20c1285342ff1d7d09a212e183f5b
>>
>> The keyboard shortcut part of this change turns out to be more
>> complicated than I first thought. It's working but as soon as the
>> order of menu items provided by plugins changes, shortcuts may be
>> switched (e.g. F4 assigned to "open in terminal" may suddenly be
>> assigned to "open in ristretto"). I'll see if I can find a way to fix
>> that.
>
> Can't people just set a gtk accelerator for that?

I'd store an id in the xml file that is set during creation and use
that GtkAction's name. Possible id's are printf("%ld%d", timenow(),
staticcounter++) or max_id + 1.

This needs to be made clear to other menu providers as well (like vcs
plugin), but that's the cleanest solution imho.

Nick


More information about the Xfce4-dev mailing list