README: add deprecation notice
[nautilus-actions.git] / src / core / fma-about.c
bloba1c026984cdaabeae2a5bff01fd180f5abd892ab
1 /*
2 * FileManager-Actions
3 * A file-manager extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
9 * FileManager-Actions is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * FileManager-Actions is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with FileManager-Actions; see the file COPYING. If not, see
21 * <http://www.gnu.org/licenses/>.
23 * Authors:
24 * Frederic Ruaudel <grumz@grumz.net>
25 * Rodrigo Moya <rodrigo@gnome-db.org>
26 * Pierre Wieser <pwieser@trychlos.org>
27 * ... and many others (see AUTHORS)
30 #ifdef HAVE_CONFIG_H
31 #include <config.h>
32 #endif
34 #include <glib/gi18n.h>
35 #include <libintl.h>
37 #include "fma-about.h"
39 static const gchar *st_icon_filename = ICON_FNAME;
42 * fma_about_display:
43 * @toplevel: the parent window.
45 * Displays the About dialog.
47 void
48 fma_about_display( GtkWindow *toplevel )
50 gchar *application_name, *copyright;
51 int i;
52 GString *license_i18n;
54 static const gchar *artists[] = {
55 "Ulisse Perusin <uli.peru@gmail.com>",
56 "DragonArtz - http://www.dragonartz.net/",
57 NULL
60 static const gchar *authors[] = {
61 "Frederic Ruaudel <grumz@grumz.net>",
62 "Rodrigo Moya <rodrigo@gnome-db.org>",
63 "Pierre Wieser <pwieser@trychlos.org>",
64 NULL
67 static const gchar *documenters[] = {
68 "Pierre Wieser <pwieser@trychlos.org>",
69 NULL
72 static gchar *license[] = {
73 N_( "FileManager-Actions Configuration Tool is free software; you can "
74 "redistribute it and/or modify it under the terms of the GNU General "
75 "Public License as published by the Free Software Foundation; either "
76 "version 2 of the License, or (at your option) any later version." ),
77 N_( "FileManager-Actions Configuration Tool is distributed in the hope that it "
78 "will be useful, but WITHOUT ANY WARRANTY; without even the implied "
79 "warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See "
80 "the GNU General Public License for more details." ),
81 N_( "You should have received a copy of the GNU General Public License along "
82 "with FileManager-Actions Configuration Tool ; if not, write to the Free "
83 "Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, "
84 "MA 02110-1301, USA." ),
85 NULL
88 application_name = fma_about_get_application_name();
89 copyright = fma_about_get_copyright( FALSE );
91 i = 0;
92 license_i18n = g_string_new( "" );
93 while( license[i] ){
94 g_string_append_printf( license_i18n, "%s\n\n", gettext( license[i] ));
95 i += 1;
98 gtk_show_about_dialog( toplevel,
99 "artists", artists,
100 "authors", authors,
101 "comments", _( "A graphical interface to create and edit your file-manager actions." ),
102 "copyright", copyright,
103 "documenters", documenters,
104 "license", license_i18n->str,
105 /* using NULL here works because the icon is taken from the
106 * main window - have to be tested when displayed in file-
107 * manager context menu */
108 "logo-icon-name", NULL,
109 "program-name", application_name,
110 "translator-credits", _( "The GNOME Translation Project <gnome-i18n@gnome.org>" ),
111 "version", PACKAGE_VERSION,
112 "website", "http://www.filemanager-actions.org",
113 "wrap-license", TRUE,
114 NULL );
116 g_free( application_name );
117 g_string_free( license_i18n, TRUE );
118 g_free( copyright );
122 * fma_about_get_application_name:
124 * Returns: the name of the application, as a newly allocated string
125 * which should be g_free() by the caller.
127 gchar *
128 fma_about_get_application_name( void )
130 /* i18n: title of the About dialog box, when seen from the file manager */
131 return( g_strdup( _( "FileManager-Actions" )));
135 * fma_about_get_icon_name:
137 * Returns: the name of the default icon for the application.
139 * This name is owned by the package, and should not be released by the caller.
141 * cf. Makefile: PACKAGE = filemanager-actions
142 * while st_icon_filename points to full path of the icon.
144 const gchar *
145 fma_about_get_icon_name( void )
147 return( st_icon_filename );
151 * fma_about_get_copyright:
152 * @console: whether the string is to be printed on a console.
154 * Returns: the copyright string, as a newly allocated string which
155 * should be g_free() by the caller.
157 gchar *
158 fma_about_get_copyright( gboolean console )
160 gchar *copyright;
161 gchar *symbol;
163 symbol = g_strdup( console ? "(C)" : "\xc2\xa9");
165 copyright = g_strdup_printf(
166 _( "Copyright %s 2005 The GNOME Foundation\n"
167 "Copyright %s 2006-2008 Frederic Ruaudel <grumz@grumz.net>\n"
168 "Copyright %s 2009-2015 Pierre Wieser <pwieser@trychlos.org>" ), symbol, symbol, symbol );
170 g_free( symbol );
172 return( copyright );