anjuta r4876 - in trunk: . plugins/scratchbox
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4876 - in trunk: . plugins/scratchbox
- Date: Wed, 18 Mar 2009 08:30:31 +0000 (UTC)
Author: jhs
Date: Wed Mar 18 08:30:30 2009
New Revision: 4876
URL: http://svn.gnome.org/viewvc/anjuta?rev=4876&view=rev
Log:
2009-03-18 Johannes Schmid <jhs gnome org>
Patch from Michael Trimarchi <michael evidence eu com>
* plugins/scratchbox/plugin.c (on_update_target),
(sbox2_environment_override), (ipreferences_merge):
Fix the parameter passing to the sb2 shell script, enclose them in ""
Modified:
trunk/ChangeLog
trunk/plugins/scratchbox/plugin.c
Modified: trunk/plugins/scratchbox/plugin.c
==============================================================================
--- trunk/plugins/scratchbox/plugin.c (original)
+++ trunk/plugins/scratchbox/plugin.c Wed Mar 18 08:30:30 2009
@@ -205,7 +205,7 @@
sbox_args = sbox2_commands_args[TARGET_LIST][1];
}
- g_string_append_printf(command, sbox_commands);
+ g_string_append (command, sbox_commands);
if (g_file_test (command->str, G_FILE_TEST_EXISTS) == FALSE)
{
@@ -305,14 +305,14 @@
return TRUE;
}
-void
+static void
sbox2_environment_override (IAnjutaEnvironment* environment, gchar **dir, gchar ***argvp, gchar ***envp, GError** err)
{
ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (environment);
AnjutaPreferences* prefs;
gchar **new_argv;
gchar* sb_dir;
- gsize len;
+ int i;
if (plugin->target == NULL || !strcmp(plugin->target, "host"))
return;
@@ -328,12 +328,14 @@
/* Add scratchbox login */
new_argv = g_new (gchar*, len_argv + 4);
- memcpy (new_argv + 3, *argvp, sizeof(gchar *) * (len_argv + 1));
new_argv[0] = g_strconcat (sb_dir, G_DIR_SEPARATOR_S,
sbox2_commands_args[EXECUTE_CMD][0],
NULL);
new_argv[1] = g_strconcat (sbox2_commands_args[EXECUTE_CMD][1], NULL);
new_argv[2] = g_strconcat (plugin->target, NULL);
+
+ for (i = 0; i < len_argv; i++)
+ new_argv[3 + i] = g_strconcat("\"", *(*argvp + i), "\"", NULL);
g_free (*argvp);
*argvp = new_argv;
@@ -464,7 +466,8 @@
"changed", G_CALLBACK(on_change_target),
plugin);
- plugin->target = gtk_combo_box_get_active_text (combo_target_entry);
+ plugin->target = gtk_combo_box_get_active_text (
+ GTK_COMBO_BOX(combo_target_entry));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]