@@ -2519,45 +2519,16 @@ eom_window_cmd_help (GtkAction *action, gpointer user_data)
25192519 eom_util_show_help (NULL , GTK_WINDOW (window ));
25202520}
25212521
2522+ #define ABOUT_GROUP "About"
2523+ #define EMAILIFY (string ) (g_strdelimit ((string), "%", '@'))
2524+
25222525static void
25232526eom_window_cmd_about (GtkAction * action , gpointer user_data )
25242527{
25252528 EomWindow * window ;
25262529
25272530 g_return_if_fail (EOM_IS_WINDOW (user_data ));
25282531
2529- static const char * authors [] = {
2530- 2531- "Steve Zesch <[email protected] >" ,
2532- "Stefano Karapetsas <[email protected] >" ,
2533- "" ,
2534- "Claudio Saavedra <[email protected] > (maintainer)" ,
2535- "Felix Riemann <[email protected] > (maintainer)" ,
2536- "" ,
2537- "Lucas Rocha <[email protected] >" ,
2538- 2539- "Philip Van Hoof <[email protected] >" ,
2540- "Paolo Borelli <[email protected] >" ,
2541- 2542- "Martin Baulig <[email protected] >" ,
2543- "Arik Devens <[email protected] >" ,
2544- "Michael Meeks <[email protected] >" ,
2545- "Federico Mena-Quintero <[email protected] >" ,
2546- "Lutz M\xc3\xbcller <[email protected] >" ,
2547- NULL
2548- };
2549-
2550- static const char * documenters [] = {
2551- "Eliot Landrum <[email protected] >" ,
2552- "Federico Mena-Quintero <[email protected] >" ,
2553- "Sun GNOME Documentation Team <[email protected] >" ,
2554- NULL
2555- };
2556-
2557- const char * translators ;
2558-
2559- translators = _ ("translator-credits" );
2560-
25612532 const char * license [] = {
25622533 N_ ("This program is free software; you can redistribute it and/or modify "
25632534 "it under the terms of the GNU General Public License as published by "
@@ -2573,9 +2544,34 @@ eom_window_cmd_about (GtkAction *action, gpointer user_data)
25732544 };
25742545
25752546 char * license_trans ;
2547+ GKeyFile * key_file ;
2548+ GBytes * bytes ;
2549+ const guint8 * data ;
2550+ gsize data_len ;
2551+ GError * error = NULL ;
2552+ char * * authors , * * documenters ;
2553+ gsize n_authors = 0 , n_documenters = 0 , i ;
2554+
2555+ bytes = g_resources_lookup_data ("/org/mate/eom/ui/eom.about" , G_RESOURCE_LOOKUP_FLAGS_NONE , & error );
2556+ g_assert_no_error (error );
2557+
2558+ data = g_bytes_get_data (bytes , & data_len );
2559+ key_file = g_key_file_new ();
2560+ g_key_file_load_from_data (key_file , (const char * ) data , data_len , 0 , & error );
2561+ g_assert_no_error (error );
2562+
2563+ authors = g_key_file_get_string_list (key_file , ABOUT_GROUP , "Authors" , & n_authors , NULL );
2564+ documenters = g_key_file_get_string_list (key_file , ABOUT_GROUP , "Documenters" , & n_documenters , NULL );
2565+
2566+ g_key_file_free (key_file );
2567+ g_bytes_unref (bytes );
2568+
2569+ for (i = 0 ; i < n_authors ; ++ i )
2570+ authors [i ] = EMAILIFY (authors [i ]);
2571+ for (i = 0 ; i < n_documenters ; ++ i )
2572+ documenters [i ] = EMAILIFY (documenters [i ]);
25762573
2577- license_trans = g_strconcat (_ (license [0 ]), "\n" , _ (license [1 ]), "\n" ,
2578- _ (license [2 ]), "\n" , NULL );
2574+ license_trans = g_strconcat (_ (license [0 ]), "\n" , _ (license [1 ]), "\n" , _ (license [2 ]), "\n" , NULL );
25792575
25802576 window = EOM_WINDOW (user_data );
25812577
@@ -2589,13 +2585,15 @@ eom_window_cmd_about (GtkAction *action, gpointer user_data)
25892585 "comments" ,_ ("The MATE image viewer." ),
25902586 "authors" , authors ,
25912587 "documenters" , documenters ,
2592- "translator-credits" , translators ,
2588+ "translator-credits" , _ ( "translator-credits" ) ,
25932589 "website" , "http://www.mate-desktop.org/" ,
25942590 "logo-icon-name" , "eom" ,
25952591 "wrap-license" , TRUE,
25962592 "license" , license_trans ,
25972593 NULL );
25982594
2595+ g_strfreev (authors );
2596+ g_strfreev (documenters );
25992597 g_free (license_trans );
26002598}
26012599
0 commit comments