This is an automated email from the git hooks/post-receive script. isaacschemm pushed a commit to branch master in repository panel-plugins/xfce4-verve-plugin.
commit d9cd1a7d757643792d6d18a99ad7b3f6809b73b8 Author: Isaac Schemm <[email protected]> Date: Tue Mar 17 20:32:52 2015 -0500 Implement and enable option to run executable commands through the shell ($SHELL -i -c) - enabled by default --- panel-plugin/verve-plugin.c | 2 +- panel-plugin/verve.c | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/panel-plugin/verve-plugin.c b/panel-plugin/verve-plugin.c index ac97706..c6447bf 100644 --- a/panel-plugin/verve-plugin.c +++ b/panel-plugin/verve-plugin.c @@ -1263,7 +1263,7 @@ verve_plugin_properties (XfcePanelPlugin *plugin, alignment = gtk_alignment_new (1, 1, 1, 1); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 24, 0); gtk_box_pack_start (GTK_BOX (command_types_vbox), alignment, FALSE, TRUE, 0); - //gtk_widget_show (alignment); - not implemented yet + gtk_widget_show (alignment); command_type_use_shell = gtk_check_button_new_with_label(_("Run command with $SHELL -i -c\n(enables alias and variable expansion)")); gtk_container_add (GTK_CONTAINER (alignment), command_type_use_shell); diff --git a/panel-plugin/verve.c b/panel-plugin/verve.c index 38cff7d..7bc60a8 100644 --- a/panel-plugin/verve.c +++ b/panel-plugin/verve.c @@ -194,11 +194,26 @@ verve_execute (const gchar *input, } else { - /* Run command using the xfterm4 wrapper if the terminal flag was set */ - if (G_UNLIKELY (terminal)) - command = g_strconcat ("exo-open --launch TerminalEmulator '", input, "'", NULL); + if (launch_params.use_shell) + { + /* Find current shell */ + char *shell = getenv("SHELL"); + if (shell == NULL) shell = "/bin/sh"; + + /* Run command using the xfterm4 wrapper if the terminal flag was set */ + if (G_UNLIKELY (terminal)) + command = g_strconcat ("exo-open --launch TerminalEmulator '", shell, " -i -c ", input, "'", NULL); + else + command = g_strconcat (shell, " -i -c ", input, NULL); + } else - command = g_strdup (input); + { + /* Run command using the xfterm4 wrapper if the terminal flag was set */ + if (G_UNLIKELY (terminal)) + command = g_strconcat ("exo-open --launch TerminalEmulator '", input, "'", NULL); + else + command = g_strdup (input); + } } /* Try to execute the exo-open command */ -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
