@@ -5298,25 +5298,12 @@ build_comments_string (EvDocument *document)
5298
5298
return comments ;
5299
5299
}
5300
5300
5301
+ #define ABOUT_GROUP "About"
5302
+ #define EMAILIFY (string ) (g_strdelimit ((string), "%", '@'))
5303
+
5301
5304
static void
5302
5305
ev_window_cmd_help_about (GtkAction * action , EvWindow * ev_window )
5303
5306
{
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
-
5320
5307
const char * documenters [] = {
5321
5308
"MATE Documentation Team" ,
5322
5309
"GNOME Documentation Team" ,
@@ -5337,15 +5324,34 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
5337
5324
"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n" )
5338
5325
};
5339
5326
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 ]);
5342
5351
5343
5352
#ifdef ENABLE_NLS
5344
5353
const char * * p ;
5345
5354
5346
- for (p = authors ; * p ; ++ p )
5347
- * p = _ (* p );
5348
-
5349
5355
for (p = documenters ; * p ; ++ p )
5350
5356
* p = _ (* p );
5351
5357
#endif
@@ -5371,6 +5377,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
5371
5377
"wrap-license" , TRUE,
5372
5378
NULL );
5373
5379
5380
+ g_strfreev (authors );
5374
5381
g_free (comments );
5375
5382
g_free (license_trans );
5376
5383
}
0 commit comments