summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-app.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-dictionary/src/gdict-app.c')
-rw-r--r--mate-dictionary/src/gdict-app.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/mate-dictionary/src/gdict-app.c b/mate-dictionary/src/gdict-app.c
index fe5e5b32..6c5f228f 100644
--- a/mate-dictionary/src/gdict-app.c
+++ b/mate-dictionary/src/gdict-app.c
@@ -1,27 +1,24 @@
-/* gdict-app.c - main application class
+/* Copyright (C) 2005 Emmanuele Bassi
+ * Copyright (C) 2012-2021 MATE Developers
*
- * This file is part of MATE Dictionary
+ * This file is part of MATE Utils.
*
- * Copyright (C) 2005 Emmanuele Bassi
+ * 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 program 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 program 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
- * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include <stdio.h>
@@ -40,17 +37,13 @@
static GdictApp *singleton = NULL;
-
struct _GdictAppClass
{
GObjectClass parent_class;
};
-
-
G_DEFINE_TYPE (GdictApp, gdict_app, G_TYPE_OBJECT);
-
static void
gdict_app_finalize (GObject *object)
{
@@ -334,7 +327,7 @@ gdict_init (int *argc, char ***argv)
N_("Database to use"), N_("db") },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &lookup_words,
N_("Words to look up"), N_("word") },
- { NULL },
+ { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL },
};
g_assert (singleton == NULL);
@@ -345,7 +338,9 @@ gdict_init (int *argc, char ***argv)
/* create the new option context */
context = g_option_context_new (_(" - Look up words in dictionaries"));
+#ifdef ENABLE_NLS
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
g_option_context_add_main_entries (context, gdict_app_goptions, GETTEXT_PACKAGE);
g_option_context_add_group (context, gdict_get_option_group ());
g_option_context_add_group (context, gtk_get_option_group (TRUE));
@@ -360,6 +355,7 @@ gdict_init (int *argc, char ***argv)
exit (1);
}
+ g_option_context_free (context);
g_set_application_name (_("Dictionary"));
gtk_window_set_default_icon_name ("accessories-dictionary");