3535 #include <config.h>
3636#endif
3737
38+ #include <glib.h>
3839#include <glib/gi18n.h>
3940#include <gtk/gtk.h>
4041
@@ -50,21 +51,11 @@ void _pluma_cmd_help_contents(GtkAction* action, PlumaWindow* window)
5051 pluma_help_display (GTK_WINDOW (window ), NULL , NULL );
5152}
5253
54+ #define ABOUT_GROUP "About"
55+ #define EMAILIFY (string ) (g_strdelimit ((string), "%", '@'))
56+
5357void _pluma_cmd_help_about (GtkAction * action , PlumaWindow * window )
5458{
55- static const gchar * const authors [] = {
56- "Paolo Maggi <paolo@gnome.org>" ,
57- "Paolo Borelli <pborelli@katamail.com>" ,
58- "Steve Fr\303\251cinaux <steve@istique.net>" ,
59- "Jesse van den Kieboom <jessevdk@gnome.org>" ,
60- "Ignacio Casal Quinteiro <icq@gnome.org>" ,
61- "James Willcox <jwillcox@gnome.org>" ,
62- "Chema Celorio" ,
63- "Federico Mena Quintero <federico@novell.com>" ,
64- "Perberos <perberos@gmail.com>" ,
65- NULL
66- };
67-
6859 static const gchar * documenters [] = {
6960 N_ ("MATE Documentation Team" ),
7061 N_ ("GNOME Documentation Team" ),
@@ -90,10 +81,28 @@ void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
9081 };
9182
9283 gchar * license_trans ;
84+ GKeyFile * key_file ;
85+ GError * error = NULL ;
86+ char * * authors ;
87+ gsize n_authors = 0 , i ;
9388 static const gchar * * p ;
9489
9590 pluma_debug (DEBUG_COMMANDS );
9691
92+ key_file = g_key_file_new ();
93+ if (!g_key_file_load_from_file (key_file , PLUMA_DATADIR G_DIR_SEPARATOR_S "pluma.about" , 0 , & error )) {
94+ g_warning ("Couldn't load about data: %s\n" , error -> message );
95+ g_error_free (error );
96+ g_key_file_free (key_file );
97+ return ;
98+ }
99+
100+ authors = g_key_file_get_string_list (key_file , ABOUT_GROUP , "Authors" , & n_authors , NULL );
101+ g_key_file_free (key_file );
102+
103+ for (i = 0 ; i < n_authors ; ++ i )
104+ authors [i ] = EMAILIFY (authors [i ]);
105+
97106 license_trans = g_strjoin ("\n\n" , _ (license [0 ]), _ (license [1 ]), _ (license [2 ]), NULL );
98107
99108 for (p = documenters ; * p ; ++ p )
@@ -119,5 +128,6 @@ void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
119128 "website" , "http://mate-desktop.org" ,
120129 NULL );
121130
131+ g_strfreev (authors );
122132 g_free (license_trans );
123133}
0 commit comments