aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/uzbl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uzbl-core.c')
-rw-r--r--src/uzbl-core.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index 5c4f3b7..b233f8b 100644
--- a/src/uzbl-core.c
+++ b/src/uzbl-core.c
@@ -619,21 +619,17 @@ run_parsed_command(const CommandInfo *c, GArray *a, GString *result) {
if(strcmp("set", c->key) &&
strcmp("event", c->key) &&
strcmp("request", c->key)) {
- // FIXME, build string inside send_event
- GString *param = g_string_new("");
- const gchar *p;
- guint i = 0;
- while ((p = argv_idx(a, i++)))
- g_string_append_printf(param, " '%s'", p);
-
- /* might be destructive on array a */
- c->function(uzbl.gui.web_view, a, result);
- send_event(COMMAND_EXECUTED, NULL,
+ Event *event = format_event (COMMAND_EXECUTED, NULL,
TYPE_NAME, c->key,
- TYPE_FORMATTEDSTR, param->str,
+ TYPE_STR_ARRAY, a,
NULL);
- g_string_free(param, TRUE);
+
+ /* might be destructive on array a */
+ c->function(uzbl.gui.web_view, a, result);
+
+ send_formatted_event (event);
+ event_free (event);
}
else
c->function(uzbl.gui.web_view, a, result);