aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/events.c
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-11-30 20:20:02 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-11-30 20:32:20 -0700
commite1bff5432860622327dc8d81b8f9ef374588c5cb (patch)
tree485e97a0fe881b25003630766656961b2109a1f2 /src/events.c
parent212ab31b4b3161995968a312546e156cafa4e8d1 (diff)
remove parseenv().
it's not documented, it doesn't do anything that @(echo $X)@ can't, and it's not very efficient (it iterates through the entire environment every time an event is sent)
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/events.c b/src/events.c
index 20e3675..3b42b3f 100644
--- a/src/events.c
+++ b/src/events.c
@@ -136,24 +136,16 @@ send_event_stdout(GString *msg) {
void
send_event(int type, const gchar *details, const gchar *custom_event) {
GString *event_message = g_string_new("");
- gchar *buf, *p_val = NULL;
-
- /* expand shell vars */
- if(details) {
- buf = g_strdup(details);
- p_val = parseenv(buf ? g_strchug(buf) : " ");
- g_free(buf);
- }
/* check for custom events */
if(custom_event) {
g_string_printf(event_message, "EVENT [%s] %s %s\n",
- uzbl.state.instance_name, custom_event, p_val);
+ uzbl.state.instance_name, custom_event, details);
}
/* check wether we support the internal event */
else if(type < LAST_EVENT) {
g_string_printf(event_message, "EVENT [%s] %s %s\n",
- uzbl.state.instance_name, event_table[type], p_val);
+ uzbl.state.instance_name, event_table[type], details);
}
if(event_message->str) {
@@ -163,7 +155,6 @@ send_event(int type, const gchar *details, const gchar *custom_event) {
g_string_free(event_message, TRUE);
}
- g_free(p_val);
}
/* Transform gdk key events to our own events */