diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-07-24 13:47:24 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-07-24 13:47:24 -0400 |
commit | 378a4098e362794b4feb3d75e40b6ada697c47e9 (patch) | |
tree | a0e7e1dd5ed6790227e0f98cf7e17021cb089277 /src/uicmd.cc | |
parent | 58d8a78e4c89ba7609cb16ba8b4462235137fd58 (diff) |
Added multiple search engines (with several 'search_url' lines in dillorc)
This patch adds the PREFS_STRINGS type to the prefsparser, which allows having
multiple different strings asociated with one dillorc option (stored in a list)
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r-- | src/uicmd.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index f257d537..0e0e4f88 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -774,14 +774,15 @@ void a_UIcmd_open_file(void *vbw) /* * Returns a newly allocated string holding a search url generated from - * a string of keywords (separarated by blanks) and prefs.search_url. + * a string of keywords (separarated by blanks) and the current search_url. * The search string is urlencoded. */ static char *UIcmd_make_search_str(const char *str) { - char *keys = a_Url_encode_hex_str(str), *c = prefs.search_url; - Dstr *ds = dStr_sized_new(128); char *search_url; + char *keys = a_Url_encode_hex_str(str), + *c = (char*)dList_nth_data(prefs.search_urls, prefs.search_url_idx); + Dstr *ds = dStr_sized_new(128); for (; *c; c++) { if (*c == '%') |