From 22c10b01ea96a73599896f66b0600c8a60f426e2 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 27 Apr 2009 20:08:12 +0200 Subject: g_spawn_command_line_async returns boolean, so logic is inversed --- uzbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index de00c5f..91c2cff 100644 --- a/uzbl.c +++ b/uzbl.c @@ -233,7 +233,7 @@ run_command(const char *command, const char *args) { gboolean result; g_string_printf (to_execute, "%s '%s' '%i' '%i' '%s' %s", command, config_file, (int) getpid() , (int) xwin, "/tmp/uzbl_25165827", args); result = g_spawn_command_line_async (to_execute->str, NULL); - printf("Called %s. Result: %s\n", to_execute->str, (result ? "FALSE" : "TRUE" )); + printf("Called %s. Result: %s\n", to_execute->str, (result ? "TRUE" : "FALSE" )); return result; } -- cgit v1.2.3 From 45f8d682c4072fde518710ad97c2e6a0b9fa48e4 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 27 Apr 2009 20:26:51 +0200 Subject: fix for some commands dont have extra args --- uzbl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 91c2cff..665ad23 100644 --- a/uzbl.c +++ b/uzbl.c @@ -231,7 +231,10 @@ run_command(const char *command, const char *args) { //command [args] GString* to_execute = g_string_new (""); gboolean result; - g_string_printf (to_execute, "%s '%s' '%i' '%i' '%s' %s", command, config_file, (int) getpid() , (int) xwin, "/tmp/uzbl_25165827", args); + g_string_printf (to_execute, "%s '%s' '%i' '%i' '%s'", command, config_file, (int) getpid() , (int) xwin, fifopath); + if(args) { + g_string_append_printf (to_execute, " %s", args); + } result = g_spawn_command_line_async (to_execute->str, NULL); printf("Called %s. Result: %s\n", to_execute->str, (result ? "TRUE" : "FALSE" )); return result; -- cgit v1.2.3 From d39469adbc85ff82e876cdcb58559d1f54de9fb3 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 27 Apr 2009 20:38:29 +0200 Subject: fixes for calling commands --- uzbl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 665ad23..85b7cd4 100644 --- a/uzbl.c +++ b/uzbl.c @@ -244,10 +244,10 @@ static void parse_command(const char *cmd) { unsigned int i; Command *c = NULL; - char buffer[200]; + char buffer[512]; strcpy(buffer,cmd); char * command_name = strtok (buffer, " "); - char * command_param = strtok (NULL, " ,"); + gchar * command_param = strtok (NULL, " ,"); Command *c_tmp = NULL; for (i = 0; i < LENGTH (commands); i++) { -- cgit v1.2.3