diff options
Diffstat (limited to 'logview/src/logview-main.c')
-rw-r--r-- | logview/src/logview-main.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/logview/src/logview-main.c b/logview/src/logview-main.c index 7eb43b06..93c7e590 100644 --- a/logview/src/logview-main.c +++ b/logview/src/logview-main.c @@ -1,25 +1,27 @@ /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ -/* logview-main.c - logview main - * - * Copyright (C) 2005 Vincent Noel <[email protected]> +/* Copyright (C) 2005 Vincent Noel <[email protected]> * Copyright (C) 2008 Cosimo Cecchi <[email protected]> + * Copyright (C) 2012-2021 MATE Developers + * + * This file is part of MATE Utils. * - * 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. + * 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 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/>. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdlib.h> @@ -43,8 +45,9 @@ app_quit_cb (LogviewApp *app, static void logview_show_version_and_quit (void) { - g_print ("%s - Version %s\n" - "Copyright (C) 2004-2008 Vincent Noel, Cosimo Cecchi and others.\n", + g_print (_("%s - Version %s\n" + "Copyright (C) 2004-2008 Vincent Noel, Cosimo Cecchi and others.\n" + "Copyright (C) 2011-2021 MATE developers.\n"), g_get_application_name (), VERSION); @@ -61,11 +64,13 @@ create_option_context (void) logview_show_version_and_quit, N_("Show the application's version"), NULL }, { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &log_files, NULL, N_("[LOGFILE...]") }, - { NULL }, + { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }, }; context = g_option_context_new (_(" - Browse and monitor logs")); +#ifdef ENABLE_NLS g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_set_ignore_unknown_options (context, TRUE); g_option_context_add_group (context, gtk_get_option_group (TRUE)); @@ -80,9 +85,11 @@ main (int argc, char *argv[]) GOptionContext *context; LogviewApp *app; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ context = create_option_context (); |