diff options
author | Cem Keylan <cem@ckyln.com> | 2021-09-29 10:58:39 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2021-09-29 10:58:39 +0300 |
commit | f53e4865da54b1f9fd13b575dd0f39054614fdb6 (patch) | |
tree | dfc06838e17ed8aba0e3d3693c705d39856c39bb /browser.c | |
parent | ddf6fdafee4b4c9a9cd44c51f118a33442d6f114 (diff) | |
download | lariza-main.tar.gz |
LARIZA_SEARCH_ENGINE: add optional environment variablemain
Diffstat (limited to 'browser.c')
-rw-r--r-- | browser.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -91,6 +91,7 @@ gboolean cooperative_alone = TRUE; gboolean cooperative_instances = TRUE; int cooperative_pipe_fp = 0; gchar *download_dir = "/var/tmp"; +gchar *search_engine = SEARCH_ENGINE; gboolean enable_console_to_stdout = FALSE; gchar *fifo_suffix = "main"; gdouble global_zoom = 1.0; @@ -670,7 +671,7 @@ ensure_uri_scheme(const gchar *t) } else { if (g_str_has_prefix(f, "!/")) - f = g_strdup_printf(SEARCH_ENGINE, t + 2); + f = g_strdup_printf(search_engine, t + 2); else f = g_strdup_printf("http://%s", t); } @@ -707,6 +708,10 @@ grab_environment_configuration(void) if (e != NULL) download_dir = g_strdup(e); + e = g_getenv(__NAME_UPPERCASE__"_SEARCH_ENGINE"); + if (e != NULL) + search_engine = g_strdup(e); + e = g_getenv(__NAME_UPPERCASE__"_ENABLE_CONSOLE_TO_STDOUT"); if (e != NULL) enable_console_to_stdout = TRUE; |