Skip to content

Commit eed5511

Browse files
rbujraveit65
authored andcommitted
Read authors (updated) and documenters (updated) from eom.about gresource
1 parent 17ca341 commit eed5511

File tree

4 files changed

+38
-35
lines changed

4 files changed

+38
-35
lines changed

‎data/Makefile.am‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ EXTRA_DIST = \
3535
eom-preferences-dialog.ui \
3636
eom-ui.xml \
3737
metadata-sidebar.ui \
38+
eom.about \
3839
$(DESKTOP_IN_FILES) \
3940
$(appdata_in_files)
4041

‎data/eom.about‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[About]
2+
Authors=Akshay Gupta <kitallis%gmail.com>;Alexander Pyhalov <apyhalov%gmail.com>;Alexandre Rostovtsev <tetromino%gentoo.org>;Alexei Sorokin <sor.alexei%meowr.ru>;Arik Devens <arik%gnome.org>;Björn Weber <bjoern.weber94%t-online.de>;Boris Egorov <egorov%linux.com>;Claudio Saavedra <csaavedra%igalia.com>;Debarshi Ray <debarshir%gnome.org>;Elias Aebi <user142%hotmail.com>;Emmanuel Pacaud <emmanuel%gnome.org>;Federico Mena-Quintero <federico%gnu.org>;Felix Riemann <friemann%gnome.org>;Adam Erdman <hekel%archlinux.info>;Javier Sánchez <jsanchez%deskblue.com>;Jens Finke <jens%triq.net>;Laszlo Boros <iamsemmu%gmail.com>;Lucas Rocha <lucasr%gnome.org>;Lutz Mxc3xbcller <urc8%rz.uni-karlsruhe.de>;Marcel Dijkstra <marcel.dykstra%gmail.com>;Martin Baulig <martin%home-of-linux.org>;Martin Wimpress <martin%mate-desktop.org>;Michael Meeks <mmeeks%gnu.org>;Mike Gabriel <mike.gabriel%das-netzwerkteam.de>;Pablo Barciela <scow%riseup.net>;Paolo Borelli <pborelli%katamail.com>;Perberos <perberos%gmail.com>;Philip Van Hoof <pvanhoof%gnome.org>;Piotr Drąg <piotrdrag%gmail.com>;Russell Haley <yumpusamongus%gmail.com>;Scott Balneaves <sbalneav%mate-desktop.org>;Sorokin Alexei <sor.alexei%meowr.ru>;Steev Klimaszewski <steev%gentoo.org>;Stefano Karapetsas <stefano%karapetsas.com>;Steve Zesch <stevezesch2%gmail.com>;Tim Gerla <tim+matebugs%gerla.net>;Timm Bäder <mail%baedert.org>;Trinh Anh Ngoc <atw1990%gmail.com>;Victor Kareh <vkareh%vkareh.net>;Vlad Orlov <monsta%inbox.ru>;Wolfgang Ulbrich <mate%raveit.de>;Wu Xiaotian <yetist%gmail.com>;Yaakov Selkowitz <yselkowitz%users.sourceforge.net>;ZenWalker <scow%riseup.net>;
3+
Documenters=Eliot Landrum <eliot%landrum.cx>;Federico Mena-Quintero <federico%gnu.org>;Sun Microsystems;MATE Documentation Team;

‎src/eom-window.c‎

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
25222525
static void
25232526
eom_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-
"Perberos <[email protected]>",
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-
"Tim Gerla <[email protected]>",
2539-
"Philip Van Hoof <[email protected]>",
2540-
"Paolo Borelli <[email protected]>",
2541-
"Jens Finke <[email protected]>",
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

‎src/eom.gresource.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<file compressed="true" preprocess="xml-stripblanks">eom-preferences-dialog.ui</file>
88
<file compressed="true" preprocess="xml-stripblanks">eom-ui.xml</file>
99
<file compressed="true" preprocess="xml-stripblanks">metadata-sidebar.ui</file>
10+
<file compressed="true">eom.about</file>
1011
<file>pixmaps/thumbnail-frame.png</file>
1112
</gresource>
1213
</gresources>

0 commit comments

Comments
 (0)