@@ -5298,25 +5298,12 @@ build_comments_string (EvDocument *document)
52985298 return comments ;
52995299}
53005300
5301+ #define ABOUT_GROUP "About"
5302+ #define EMAILIFY (string ) (g_strdelimit ((string), "%", '@'))
5303+
53015304static void
53025305ev_window_cmd_help_about (GtkAction * action , EvWindow * ev_window )
53035306{
5304- const char * authors [] = {
5305- "Martin Kretzschmar <m_kretzschmar@gmx.net>" ,
5306- "Jonathan Blandford <jrb@gnome.org>" ,
5307- "Marco Pesenti Gritti <marco@gnome.org>" ,
5308- "Nickolay V. Shmyrev <nshmyrev@yandex.ru>" ,
5309- "Bryan Clark <clarkbw@gnome.org>" ,
5310- "Carlos Garcia Campos <carlosgc@gnome.org>" ,
5311- "Wouter Bolsterlee <wbolster@gnome.org>" ,
5312- "Christian Persch <chpe" "\100" "gnome.org>" ,
5313- "Perberos <perberos@gmail.com>" ,
5314- "Stefano Karapetsas <stefano@karapetsas.com>" ,
5315- "Steve Zesch <stevezesch2@gmail.com>" ,
5316- "Avishkar Gupta <avishkar.gupta.delhi@gmail.com>" ,
5317- NULL
5318- };
5319-
53205307 const char * documenters [] = {
53215308 "MATE Documentation Team" ,
53225309 "GNOME Documentation Team" ,
@@ -5337,15 +5324,34 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
53375324 "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n" )
53385325 };
53395326
5340- char * license_trans ;
5341- char * comments ;
5327+ char * license_trans , * comments ;
5328+ GKeyFile * key_file ;
5329+ GBytes * bytes ;
5330+ const guint8 * data ;
5331+ gsize data_len ;
5332+ GError * error = NULL ;
5333+ char * * authors ;
5334+ gsize n_authors = 0 , i ;
5335+
5336+ bytes = g_resources_lookup_data ("/org/mate/atril/shell/atril.about" , G_RESOURCE_LOOKUP_FLAGS_NONE , & error );
5337+ g_assert_no_error (error );
5338+
5339+ data = g_bytes_get_data (bytes , & data_len );
5340+ key_file = g_key_file_new ();
5341+ g_key_file_load_from_data (key_file , (const char * ) data , data_len , 0 , & error );
5342+ g_assert_no_error (error );
5343+
5344+ authors = g_key_file_get_string_list (key_file , ABOUT_GROUP , "Authors" , & n_authors , NULL );
5345+
5346+ g_key_file_free (key_file );
5347+ g_bytes_unref (bytes );
5348+
5349+ for (i = 0 ; i < n_authors ; ++ i )
5350+ authors [i ] = EMAILIFY (authors [i ]);
53425351
53435352#ifdef ENABLE_NLS
53445353 const char * * p ;
53455354
5346- for (p = authors ; * p ; ++ p )
5347- * p = _ (* p );
5348-
53495355 for (p = documenters ; * p ; ++ p )
53505356 * p = _ (* p );
53515357#endif
@@ -5371,6 +5377,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
53715377 "wrap-license" , TRUE,
53725378 NULL );
53735379
5380+ g_strfreev (authors );
53745381 g_free (comments );
53755382 g_free (license_trans );
53765383}
0 commit comments