Compare commits

...
Author SHA1 Message Date
jaskaran-singh-77 14c79d9fbc Make search engine configurable via app.ini
Build system / Check kernel codestyle (pull_request) Successful in 1m26s
Build system / Build (pull_request) Successful in 11m55s
2026-04-13 10:44:47 +05:30
3 changed files with 11 additions and 4 deletions

No files matched your search

+7 -1
View File
@@ -23,4 +23,10 @@ path=/usbhd0/1/kolibri.img
autoclose=0
[WebView]
proxy=http://proxy.kolibrios.org:82/?site=
proxy=http://proxy.kolibrios.org:82/?site=
search_engine=http://bing.com/search?q=
;Alternative search engines (uncomment to use):
;search_engine=http://wiby.me/?q=
;search_engine=https://html.duckduckgo.com/html/?q=
;search_engine=http://4get.ca/web?s=
+3 -3
View File
@@ -73,6 +73,7 @@ proc_info Form;
char settings_file[256];
char proxy_address[768];
char search_engine[768];
#include "settings.h"
#include "tabs.h"
@@ -367,7 +368,7 @@ void SetElementSizes()
//http://board.kolibrios.org/viewtopic.php?f=1&t=1712&start=60#p77523
StopLoading();
}
WB1.list.SetSizes(0, TOOLBAR_H+TAB_H, Form.cwidth - scroll_wv.size_x,
WB1.list.SetSizes(0, TOOLBAR_H+TAB_H, Form.cwidth - scroll_wv.size_x ,
Form.cheight - TOOLBAR_H - STATUSBAR_H - TAB_H, BASIC_LINE_H);
WB1.list.wheel_size = 7 * BASIC_LINE_H;
WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w + 1;
@@ -840,8 +841,7 @@ void EventSearchWeb()
char new_url[URL_SIZE+1];
// replace the spaces with '+' for the search query
replace_char(#editURL, ' ', '+', URL_SIZE);
//strcpy(#new_url, "https://html.duckduckgo.com/html/?q=");
strcpy(#new_url, "http://bing.com/search?q=");
strcpy(#new_url, #search_engine);
strncat(#new_url, #editURL, URL_SIZE);
OpenPage(#new_url);
}
+1
View File
@@ -6,4 +6,5 @@ void LoadIniConfig()
ini.section = "WebView";
ini.GetString("proxy", #proxy_address, sizeof(proxy_address), NULL);
ini.GetString("search_engine", #search_engine, sizeof(search_engine), "http://bing.com/search?q=");
}