diff options
author | portix <none@none> | 2013-02-12 00:39:19 +0100 |
---|---|---|
committer | portix <none@none> | 2013-02-12 00:39:19 +0100 |
commit | 07f7882f265059305667d7eba3ca3959202f8e16 (patch) | |
tree | c3342210086cbab703b92e0b5989b8cbf535e878 /src/dwb.c | |
parent | f15fd379c27390d2b1a1227bebfd025985d41264 (diff) | |
download | dwb-07f7882f265059305667d7eba3ca3959202f8e16.zip |
Set script path readonly when binding userscripts
Diffstat (limited to 'src/dwb.c')
-rw-r--r-- | src/dwb.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2428,7 +2428,7 @@ dwb_load_uri(GList *gl, const char *arg) if ( (script = dwb_test_userscript(tmpuri)) ) { - Arg a = { .arg = script }; + Arg a = { .p = script }; dwb_execute_user_script(NULL, &a); g_free(script); goto clean; @@ -3181,7 +3181,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, { .p = 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, .ro = true }, EP_NONE, {NULL} }; *fmap = fm; map->map = fmap; dwb.misc.userscripts = g_list_prepend(dwb.misc.userscripts, n); @@ -4460,7 +4460,7 @@ dwb_parse_command_line(const char *line) dwb_change_mode(NORMAL_MODE, true); dwb.state.nummod = nummod; - if (token[1] && ! m->map->arg.ro) + if (token[1]) { g_strstrip(token[1]); m->map->arg.arg = token[1]; |