diff options
Diffstat (limited to 'mate-dictionary/libgdict/gdict-defbox.c')
-rw-r--r-- | mate-dictionary/libgdict/gdict-defbox.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c index 49a35e9a..087c8761 100644 --- a/mate-dictionary/libgdict/gdict-defbox.c +++ b/mate-dictionary/libgdict/gdict-defbox.c @@ -1,20 +1,20 @@ -/* gdict-defbox.c - display widget for dictionary definitions +/* Copyright (C) 2005-2006 Emmanuele Bassi <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Emmanuele Bassi <[email protected]> + * This file is part of MATE Utils. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * MATE Utils is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. * - * This library is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * You should have received a copy of the GNU General Public License + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ /** @@ -30,7 +30,7 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include <config.h> #endif #include <stdio.h> @@ -200,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); } @@ -1561,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, @@ -2058,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); @@ -2548,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"); |