diff options
author | portix <none@none> | 2013-02-11 19:27:28 +0100 |
---|---|---|
committer | portix <none@none> | 2013-02-11 19:27:28 +0100 |
commit | b07701ff69e59382e4e4196640b09a26fb130e61 (patch) | |
tree | 7fbc3c8a647781df5f915e1ebcab80a908046813 /src/dwb.c | |
parent | 267f396fa11dd7348cee20fceef116f78d537174 (diff) | |
download | dwb-b07701ff69e59382e4e4196640b09a26fb130e61.zip |
Fixing wrong argument in dwb_execute_user_script, broke after refactoring
Diffstat (limited to 'src/dwb.c')
-rw-r--r-- | src/dwb.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -3005,7 +3005,7 @@ dwb_execute_user_script(KeyMap *km, Arg *a) char *fifo; snprintf(nummod, sizeof(nummod), "%d", NUMMOD); - char *argv[] = { a->arg, (char*)webkit_web_view_get_uri(CURRENT_WEBVIEW()), (char *)webkit_web_view_get_title(CURRENT_WEBVIEW()), (char *)dwb.misc.profile, nummod, a->p, NULL } ; + char *argv[] = { a->p, (char*)webkit_web_view_get_uri(CURRENT_WEBVIEW()), (char *)webkit_web_view_get_title(CURRENT_WEBVIEW()), (char *)dwb.misc.profile, nummod, NULL } ; const char *uri = webkit_web_view_get_uri(CURRENT_WEBVIEW()); if (uri != NULL) @@ -3018,8 +3018,8 @@ dwb_execute_user_script(KeyMap *km, Arg *a) list = g_slist_append(list, dwb_navigation_new("DWB_PROFILE", dwb.misc.profile)); list = g_slist_append(list, dwb_navigation_new("DWB_NUMMOD", nummod)); - if (a->p != NULL) - list = g_slist_append(list, dwb_navigation_new("DWB_ARGUMENT", a->p)); + if (a->arg != NULL) + list = g_slist_append(list, dwb_navigation_new("DWB_ARGUMENT", a->arg)); const char *referer = soup_get_header(dwb.state.fview, "Referer"); if (referer != NULL) @@ -3041,7 +3041,7 @@ dwb_execute_user_script(KeyMap *km, Arg *a) env->channel = g_io_channel_unix_new(env->fd); if (env->channel != NULL) { - dwb_set_normal_message(dwb.state.fview, true, "Executing script %s", a->arg); + dwb_set_normal_message(dwb.state.fview, true, "Executing script %s", a->p); env->source = g_io_add_watch(env->channel, G_IO_IN, (GIOFunc)dwb_user_script_cb, env); g_child_watch_add(pid, (GChildWatchFunc)dwb_user_script_watch, env); } @@ -3174,7 +3174,7 @@ dwb_get_scripts() map->key = ""; map->mod = 0; } - FunctionMap fm = { { n->first, n->first }, CP_DONT_SAVE | CP_COMMANDLINE | CP_USERSCRIPT, (Func)dwb_execute_user_script, NULL, POST_SM, { .arg = path }, EP_NONE, {NULL} }; + FunctionMap fm = { { n->first, n->first }, CP_DONT_SAVE | CP_COMMANDLINE | CP_USERSCRIPT, (Func)dwb_execute_user_script, NULL, POST_SM, { .p = path }, EP_NONE, {NULL} }; *fmap = fm; map->map = fmap; dwb.misc.userscripts = g_list_prepend(dwb.misc.userscripts, n); @@ -4456,7 +4456,7 @@ dwb_parse_command_line(const char *line) if (token[1] && ! m->map->arg.ro) { g_strstrip(token[1]); - m->map->arg.p = token[1]; + m->map->arg.arg = token[1]; argument = token[1]; } if (gtk_widget_has_focus(dwb.gui.entry) && (m->map->prop & CP_OVERRIDE_ENTRY)) |