summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict/gdict-defbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-dictionary/libgdict/gdict-defbox.c')
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c
index a107b790..087c8761 100644
--- a/mate-dictionary/libgdict/gdict-defbox.c
+++ b/mate-dictionary/libgdict/gdict-defbox.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2005-2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -199,6 +200,8 @@ gdict_defbox_dispose (GObject *gobject)
priv->regular_cursor = NULL;
}
+ g_clear_pointer (&priv->word, g_free);
+
G_OBJECT_CLASS (gdict_defbox_parent_class)->dispose (gobject);
}
@@ -1560,7 +1563,7 @@ set_cursor_if_appropriate (GdictDefbox *defbox,
if (hovering != defbox->priv->is_hovering)
{
- defbox->priv->is_hovering = hovering;
+ defbox->priv->is_hovering = (hovering != FALSE);
if (defbox->priv->is_hovering)
gdk_window_set_cursor (gtk_text_view_get_window (text_view,
@@ -2057,7 +2060,7 @@ gdict_defbox_set_show_find (GdictDefbox *defbox,
if (priv->show_find == show_find)
return;
- priv->show_find = show_find;
+ priv->show_find = (show_find != FALSE);
if (priv->show_find)
{
gtk_widget_show_all (priv->find_pane);
@@ -2547,6 +2550,7 @@ gdict_defbox_lookup (GdictDefbox *defbox,
G_CALLBACK (error_cb),
defbox);
+ g_free (priv->word);
priv->word = g_strdup (word);
g_object_notify (G_OBJECT (defbox), "word");