summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict
diff options
context:
space:
mode:
Diffstat (limited to 'mate-dictionary/libgdict')
-rw-r--r--mate-dictionary/libgdict/gdict-client-context.c22
-rw-r--r--mate-dictionary/libgdict/gdict-client-context.h1
-rw-r--r--mate-dictionary/libgdict/gdict-context-private.h1
-rw-r--r--mate-dictionary/libgdict/gdict-context.c16
-rw-r--r--mate-dictionary/libgdict/gdict-context.h1
-rw-r--r--mate-dictionary/libgdict/gdict-database-chooser.c2
-rw-r--r--mate-dictionary/libgdict/gdict-database-chooser.h1
-rw-r--r--mate-dictionary/libgdict/gdict-debug.h1
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.c8
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.h1
-rw-r--r--mate-dictionary/libgdict/gdict-private.h1
-rw-r--r--mate-dictionary/libgdict/gdict-source-chooser.c1
-rw-r--r--mate-dictionary/libgdict/gdict-source-chooser.h1
-rw-r--r--mate-dictionary/libgdict/gdict-source-loader.c4
-rw-r--r--mate-dictionary/libgdict/gdict-source-loader.h1
-rw-r--r--mate-dictionary/libgdict/gdict-source.c7
-rw-r--r--mate-dictionary/libgdict/gdict-source.h1
-rw-r--r--mate-dictionary/libgdict/gdict-speller.c2
-rw-r--r--mate-dictionary/libgdict/gdict-speller.h1
-rw-r--r--mate-dictionary/libgdict/gdict-strategy-chooser.c1
-rw-r--r--mate-dictionary/libgdict/gdict-strategy-chooser.h1
-rw-r--r--mate-dictionary/libgdict/gdict-utils.c5
-rw-r--r--mate-dictionary/libgdict/gdict-utils.h1
-rw-r--r--mate-dictionary/libgdict/gdict-version.h.in1
-rw-r--r--mate-dictionary/libgdict/gdict.h1
25 files changed, 44 insertions, 39 deletions
diff --git a/mate-dictionary/libgdict/gdict-client-context.c b/mate-dictionary/libgdict/gdict-client-context.c
index f3bb317e..8bc9cbcd 100644
--- a/mate-dictionary/libgdict/gdict-client-context.c
+++ b/mate-dictionary/libgdict/gdict-client-context.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -238,8 +239,6 @@ static void gdict_client_context_real_disconnected (GdictClientContext *con
static GdictCommand *gdict_command_new (GdictCommandType cmd_type);
static void gdict_command_free (GdictCommand *cmd);
-
-
GQuark
gdict_client_context_error_quark (void)
{
@@ -408,8 +407,7 @@ gdict_client_context_set_property (GObject *object,
switch (prop_id)
{
case PROP_HOSTNAME:
- if (priv->hostname)
- g_free (priv->hostname);
+ g_free (priv->hostname);
priv->hostname = g_strdup (g_value_get_string (value));
gdict_client_context_clear_hostinfo (GDICT_CLIENT_CONTEXT (object));
break;
@@ -417,12 +415,11 @@ gdict_client_context_set_property (GObject *object,
priv->port = g_value_get_uint (value);
break;
case PROP_CLIENT_NAME:
- if (priv->client_name)
- g_free (priv->client_name);
+ g_free (priv->client_name);
priv->client_name = g_strdup (g_value_get_string (value));
break;
case GDICT_CONTEXT_PROP_LOCAL_ONLY:
- priv->local_only = g_value_get_boolean (value);
+ priv->local_only = (g_value_get_boolean (value) != FALSE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -470,8 +467,7 @@ gdict_client_context_finalize (GObject *object)
/* force disconnection */
gdict_client_context_force_disconnect (context);
- if (priv->command)
- gdict_command_free (priv->command);
+ gdict_command_free (priv->command);
if (priv->commands_queue)
{
@@ -480,11 +476,8 @@ gdict_client_context_finalize (GObject *object)
priv->commands_queue = NULL;
}
- if (priv->client_name)
- g_free (priv->client_name);
-
- if (priv->hostname)
- g_free (priv->hostname);
+ g_free (priv->client_name);
+ g_free (priv->hostname);
#ifdef ENABLE_IPV6
if (priv->host6info)
@@ -1901,7 +1894,6 @@ gdict_client_context_connect (GdictClientContext *context,
#endif
((struct sockaddr_in *) &priv->sockaddr)->sin_port = g_htons (priv->port);
-
#ifdef ENABLE_IPV6
if (priv->sockaddr.ss_family == AF_INET6)
{
diff --git a/mate-dictionary/libgdict/gdict-client-context.h b/mate-dictionary/libgdict/gdict-client-context.h
index d13e61e4..ef750c82 100644
--- a/mate-dictionary/libgdict/gdict-client-context.h
+++ b/mate-dictionary/libgdict/gdict-client-context.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-context-private.h b/mate-dictionary/libgdict/gdict-context-private.h
index cddea12c..a29b237b 100644
--- a/mate-dictionary/libgdict/gdict-context-private.h
+++ b/mate-dictionary/libgdict/gdict-context-private.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-context.c b/mate-dictionary/libgdict/gdict-context.c
index 0ed3e067..7dab4525 100644
--- a/mate-dictionary/libgdict/gdict-context.c
+++ b/mate-dictionary/libgdict/gdict-context.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -48,10 +49,8 @@
#include "gdict-context-private.h"
#include "gdict-private.h"
-
static void gdict_context_class_init (gpointer g_iface, void *user_data);
-
GType
gdict_context_get_type (void)
{
@@ -67,6 +66,10 @@ gdict_context_get_type (void)
(GClassInitFunc) gdict_context_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
+ 0, /* instance_size */
+ 0, /* n_preallocs */
+ NULL, /* instance_init */
+ NULL /* value_table */
};
context_type = g_type_register_static (G_TYPE_INTERFACE,
@@ -78,7 +81,6 @@ gdict_context_get_type (void)
return context_type;
}
-
static void
gdict_context_class_init (gpointer g_iface, void *user_data)
{
@@ -412,8 +414,6 @@ gdict_context_define_word (GdictContext *context,
error);
}
-
-
/*****************
* GdictDatabase *
*****************/
@@ -522,8 +522,6 @@ gdict_database_get_full_name (GdictDatabase *db)
return db->full_name;
}
-
-
/*****************
* GdictStrategy *
*****************/
@@ -630,8 +628,6 @@ gdict_strategy_get_description (GdictStrategy *strat)
return strat->description;
}
-
-
/**************
* GdictMatch *
**************/
@@ -737,8 +733,6 @@ gdict_match_get_database (GdictMatch *match)
return match->database;
}
-
-
/*******************
* GdictDefinition *
*******************/
diff --git a/mate-dictionary/libgdict/gdict-context.h b/mate-dictionary/libgdict/gdict-context.h
index 9e31a2cc..098a7a2f 100644
--- a/mate-dictionary/libgdict/gdict-context.h
+++ b/mate-dictionary/libgdict/gdict-context.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-database-chooser.c b/mate-dictionary/libgdict/gdict-database-chooser.c
index 01986f16..704d0927 100644
--- a/mate-dictionary/libgdict/gdict-database-chooser.c
+++ b/mate-dictionary/libgdict/gdict-database-chooser.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -109,7 +110,6 @@ G_DEFINE_TYPE_WITH_PRIVATE (GdictDatabaseChooser,
gdict_database_chooser,
GTK_TYPE_BOX);
-
static void
set_gdict_context (GdictDatabaseChooser *chooser,
GdictContext *context)
diff --git a/mate-dictionary/libgdict/gdict-database-chooser.h b/mate-dictionary/libgdict/gdict-database-chooser.h
index eb139b9d..552e032d 100644
--- a/mate-dictionary/libgdict/gdict-database-chooser.h
+++ b/mate-dictionary/libgdict/gdict-database-chooser.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-debug.h b/mate-dictionary/libgdict/gdict-debug.h
index 04de4105..899e5e54 100644
--- a/mate-dictionary/libgdict/gdict-debug.h
+++ b/mate-dictionary/libgdict/gdict-debug.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
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");
diff --git a/mate-dictionary/libgdict/gdict-defbox.h b/mate-dictionary/libgdict/gdict-defbox.h
index ce7f8147..7e58a368 100644
--- a/mate-dictionary/libgdict/gdict-defbox.h
+++ b/mate-dictionary/libgdict/gdict-defbox.h
@@ -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.
*
diff --git a/mate-dictionary/libgdict/gdict-private.h b/mate-dictionary/libgdict/gdict-private.h
index e23b2e50..930e7264 100644
--- a/mate-dictionary/libgdict/gdict-private.h
+++ b/mate-dictionary/libgdict/gdict-private.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-source-chooser.c b/mate-dictionary/libgdict/gdict-source-chooser.c
index 38571ada..021245fa 100644
--- a/mate-dictionary/libgdict/gdict-source-chooser.c
+++ b/mate-dictionary/libgdict/gdict-source-chooser.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2007 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-source-chooser.h b/mate-dictionary/libgdict/gdict-source-chooser.h
index a9c132ab..0e83f8d0 100644
--- a/mate-dictionary/libgdict/gdict-source-chooser.h
+++ b/mate-dictionary/libgdict/gdict-source-chooser.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2007 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-source-loader.c b/mate-dictionary/libgdict/gdict-source-loader.c
index af9097d3..7a5c3aa1 100644
--- a/mate-dictionary/libgdict/gdict-source-loader.c
+++ b/mate-dictionary/libgdict/gdict-source-loader.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -74,11 +75,8 @@ enum
static guint loader_signals[LAST_SIGNAL] = { 0 };
-
-
G_DEFINE_TYPE_WITH_PRIVATE (GdictSourceLoader, gdict_source_loader, G_TYPE_OBJECT);
-
static void
gdict_source_loader_finalize (GObject *object)
{
diff --git a/mate-dictionary/libgdict/gdict-source-loader.h b/mate-dictionary/libgdict/gdict-source-loader.h
index f346e504..f1183d3c 100644
--- a/mate-dictionary/libgdict/gdict-source-loader.h
+++ b/mate-dictionary/libgdict/gdict-source-loader.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-source.c b/mate-dictionary/libgdict/gdict-source.c
index 9fe0fe56..e2c58494 100644
--- a/mate-dictionary/libgdict/gdict-source.c
+++ b/mate-dictionary/libgdict/gdict-source.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -110,11 +111,8 @@ gdict_source_error_quark (void)
return quark;
}
-
G_DEFINE_TYPE_WITH_PRIVATE (GdictSource, gdict_source, G_TYPE_OBJECT);
-
-
static void
gdict_source_set_property (GObject *object,
guint prop_id,
@@ -397,8 +395,7 @@ gdict_source_create_context (GdictSource *source,
context = gdict_client_context_new (hostname, port);
- if (hostname)
- g_free (hostname);
+ g_free (hostname);
}
break;
default:
diff --git a/mate-dictionary/libgdict/gdict-source.h b/mate-dictionary/libgdict/gdict-source.h
index 290889a0..45e9b2d0 100644
--- a/mate-dictionary/libgdict/gdict-source.h
+++ b/mate-dictionary/libgdict/gdict-source.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-speller.c b/mate-dictionary/libgdict/gdict-speller.c
index 301ac533..7392096a 100644
--- a/mate-dictionary/libgdict/gdict-speller.c
+++ b/mate-dictionary/libgdict/gdict-speller.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -180,7 +181,6 @@ gdict_speller_finalize (GObject *gobject)
G_OBJECT_CLASS (gdict_speller_parent_class)->finalize (gobject);
}
-
static void
gdict_speller_set_property (GObject *gobject,
guint prop_id,
diff --git a/mate-dictionary/libgdict/gdict-speller.h b/mate-dictionary/libgdict/gdict-speller.h
index 0c730ea5..97411a50 100644
--- a/mate-dictionary/libgdict/gdict-speller.h
+++ b/mate-dictionary/libgdict/gdict-speller.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-strategy-chooser.c b/mate-dictionary/libgdict/gdict-strategy-chooser.c
index b0b2db81..10cad42a 100644
--- a/mate-dictionary/libgdict/gdict-strategy-chooser.c
+++ b/mate-dictionary/libgdict/gdict-strategy-chooser.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-strategy-chooser.h b/mate-dictionary/libgdict/gdict-strategy-chooser.h
index 8c070417..22eaec5c 100644
--- a/mate-dictionary/libgdict/gdict-strategy-chooser.h
+++ b/mate-dictionary/libgdict/gdict-strategy-chooser.h
@@ -1,5 +1,6 @@
/* This file is part of MATE Utils.
* Copyright (C) 2006 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* 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
diff --git a/mate-dictionary/libgdict/gdict-utils.c b/mate-dictionary/libgdict/gdict-utils.c
index 1e6447ed..00d051ef 100644
--- a/mate-dictionary/libgdict/gdict-utils.c
+++ b/mate-dictionary/libgdict/gdict-utils.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
@@ -97,7 +98,7 @@ static GOptionEntry gdict_args[] = {
{ "gdict-no-debug", 0, 0, G_OPTION_ARG_CALLBACK, gdict_arg_no_debug_cb,
N_("GDict debugging flags to unset"), N_("FLAGS") },
#endif /* GDICT_ENABLE_DEBUG */
- { NULL, },
+ { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL },
};
static gboolean
@@ -156,7 +157,9 @@ gdict_get_option_group (void)
g_option_group_set_parse_hooks (group, pre_parse_hook, post_parse_hook);
g_option_group_add_entries (group, gdict_args);
+#ifdef ENABLE_NLS
g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
return group;
}
diff --git a/mate-dictionary/libgdict/gdict-utils.h b/mate-dictionary/libgdict/gdict-utils.h
index b196e512..51623aa4 100644
--- a/mate-dictionary/libgdict/gdict-utils.h
+++ b/mate-dictionary/libgdict/gdict-utils.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict-version.h.in b/mate-dictionary/libgdict/gdict-version.h.in
index b3d1354b..38aabb73 100644
--- a/mate-dictionary/libgdict/gdict-version.h.in
+++ b/mate-dictionary/libgdict/gdict-version.h.in
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Paolo Borelli
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*
diff --git a/mate-dictionary/libgdict/gdict.h b/mate-dictionary/libgdict/gdict.h
index 4b94bd4b..2be79979 100644
--- a/mate-dictionary/libgdict/gdict.h
+++ b/mate-dictionary/libgdict/gdict.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2005 Emmanuele Bassi <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This file is part of MATE Utils.
*