[Github-comments] [geany/geany] How to send the actual "file" also with a "contextual action" (#2775)
Andrés Zotelo
notifications at xxxxx
Fri Apr 2 15:37:17 UTC 2021
Hi, thanxs for your guide, I have modified and works fine, here the snippet( in callbacks.c/on_context_action1_activate() ) :
- - - - - - - - - - - -
- - - - - - - - - - - -
/* substitute the wildcard %s and run the command if it is non empty */
if (G_LIKELY(!EMPTY(command)))
{
gchar *command_line = g_strdup(command);
utils_str_replace_all(&command_line, "%s", word);
// file name added as %f
utils_str_replace_all(&command_line, "%f", doc->file_name);
if (!spawn_async(NULL, command_line, NULL, NULL, NULL, &error))
{
- - - - - - - - - - - -
- - - - - - - - - - - -
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/2775#discussioncomment-562713
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210402/a9400974/attachment.htm>
More information about the Github-comments
mailing list