[Xfce4-commits] [apps/xfce4-dict] 02/04: Only show web search link if we have a valid URL and in dict mode
noreply at xfce.org
noreply at xfce.org
Mon Nov 19 01:05:39 CET 2018
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-dict.
commit 18c8cf17d6f4025b61c769c70aecf8f714bf02a3
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Nov 18 21:04:12 2018 -0300
Only show web search link if we have a valid URL and in dict mode
---
lib/dictd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/dictd.c b/lib/dictd.c
index 6c4aa80..5d7c588 100644
--- a/lib/dictd.c
+++ b/lib/dictd.c
@@ -373,6 +373,9 @@ static void clear_query_buffer(DictData *dd)
static void append_web_search_link(DictData *dd, gboolean prepend_whitespace)
{
+ if (dd->web_url == NULL || dd->mode_in_use != DICTMODE_DICT)
+ return;
+
gchar *label = _(dict_prefs_get_web_url_label(dd));
gchar *text = g_strdup_printf(
/* for translators: the first wildcard is the search term, the second wildcard
@@ -455,8 +458,7 @@ static gboolean process_server_response(DictData *dd)
/* if we had no luck searching a word, maybe we have a typo so try searching with
* spell check and offer a Web search*/
- if (NZV(dd->web_url))
- append_web_search_link (dd, TRUE);
+ append_web_search_link (dd, TRUE);
if (NZV(dd->spell_bin))
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list