<div>You're welcome ;)<br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user"><div>Cheers,<br></div><div>Gaël<br></div><div></div></div></div><div><br></div><div class="protonmail_quote">
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br>
On Saturday, September 4th, 2021 at 4:04 PM, Sylvain Viart <sylvain@opensource-expert.com> wrote:<br>
<blockquote class="protonmail_quote" type="cite">
<div class="moz-cite-prefix">Thank you Gaël,<br>
<br>
I managed to add the two keybinding I was thinking about!<br>
<br>
now DEL key removes an item dynamically from the history, by
visually selecting it in the menu.<br>
I also added S key (lower case) to Swap / Secure an Item.<br>
<br>
S was in conflict with Accelerator for History dialog box. 😉<br>
Now history open by H.<br>
It's mainly for testing, because I didn't want to bind two
distinct keys that almost execute the same code. (DRY code)<br>
<br>
<a href="https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/merge_requests/1/diffs#9ccec1d9c5b9b6500f958458cfe0b9d1a4ad557e_650_729" target="_blank" rel="noreferrer nofollow noopener">https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/merge_requests/1/diffs#9ccec1d9c5b9b6500f958458cfe0b9d1a4ad557e_650_729</a><br>
<br>
Thanks for your help, excellent!<br>
<br>
I own you a fresh beer! 😉<br>
<br>
Regards,<br>
Sylvain.<br>
<br>
On 03/09/2021 10:49, Gaël Bonithon wrote:<br>
</div>
<blockquote type="cite">
<div>You can just connect `my_keypress_function()` when the menu
is shown (GtkWidget's "show" signal), then, when a key is
pressed, you look at which key it is, which menu item is active,
and act (or not) accordingly.<br>
</div>
<div><br>
</div>
<div>No need to bother with what you say in the first part, it
should work by itself in this case.<br>
</div>
<div><br>
</div>
<div>Don't forget to disconnect `my_keypress_function()` when the
menu disappears though (GtkMenuShell's "selection-done"
signal should be fine).<br>
</div>
<div><br>
</div>
<div class="protonmail_signature_block">
<div class="protonmail_signature_block-user">
<div>Cheers,<br>
</div>
<div>Gaël<br>
</div>
</div>
</div>
<div><br>
</div>
<div class="protonmail_quote"> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br>
On Thursday, September 2nd, 2021 at 6:20 AM, Sylvain Viart
<a href="mailto:sylvain@opensource-expert.com" rel="noreferrer nofollow noopener"><sylvain@opensource-expert.com></a> wrote:<br>
<blockquote type="cite" class="protonmail_quote"> Hi,<br>
<br>
I would like to add 2 new key binding in clipman menu, in
order to swap Secure Item as Clear Text, and also to delete
any them directly from menu hitting del key.<br>
<br>
<br>
I lack gtk knowledge, what I found is that:<br>
[...]<br>
</blockquote>
</div>
</blockquote>
<br>
<pre cols="72">--
Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France</pre>
</blockquote><br>
</div>