Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

add open_node entry in context menu #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michimartini
Copy link

This commit adds a menu entry to open the node under the cursor by invoking xdg-open via system() . Feel free to reject this for the sake of purity. I find this behaviour useful. I am not sure whether i increased the segfaultiness of fsv with this hack or not - my C-skills are a bit rusty.

struct NodeInfo *node_info;
char strbuf[1024];
char strbuf1[1024];
int retval;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable

Comment on lines +1478 to +1482
strcpy(strbuf,"xdg-open ");
node_info = get_node_info(node);
strcat (strbuf, node_info->prefix);
strcat (strbuf, "/");
strcat (strbuf, node_info->name);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
strcpy(strbuf,"xdg-open ");
node_info = get_node_info(node);
strcat (strbuf, node_info->prefix);
strcat (strbuf, "/");
strcat (strbuf, node_info->name);
node_info = get_node_info(node);
snprintf(strbuf, sizeof(strbuf), "xdg-open %s/%s", node_info->prefix, node_info->name);

{
struct NodeInfo *node_info;
char strbuf[1024];
char strbuf1[1024];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants