Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Read authors (updated) and documenters (updated) from eom.about greso…
…urce
  • Loading branch information
rbuj authored and raveit65 committed Feb 18, 2019
1 parent 17ca341 commit eed5511
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 35 deletions.
1 change: 1 addition & 0 deletions data/Makefile.am
Expand Up @@ -35,6 +35,7 @@ EXTRA_DIST = \
eom-preferences-dialog.ui \
eom-ui.xml \
metadata-sidebar.ui \
eom.about \
$(DESKTOP_IN_FILES) \
$(appdata_in_files)

Expand Down
3 changes: 3 additions & 0 deletions data/eom.about
@@ -0,0 +1,3 @@
[About]
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>;
Documenters=Eliot Landrum <eliot%landrum.cx>;Federico Mena-Quintero <federico%gnu.org>;Sun Microsystems;MATE Documentation Team;
68 changes: 33 additions & 35 deletions src/eom-window.c
Expand Up @@ -2519,45 +2519,16 @@ eom_window_cmd_help (GtkAction *action, gpointer user_data)
eom_util_show_help (NULL, GTK_WINDOW (window));
}

#define ABOUT_GROUP "About"
#define EMAILIFY(string) (g_strdelimit ((string), "%", '@'))

static void
eom_window_cmd_about (GtkAction *action, gpointer user_data)
{
EomWindow *window;

g_return_if_fail (EOM_IS_WINDOW (user_data));

static const char *authors[] = {
"Perberos <perberos@gmail.com>",
"Steve Zesch <stevezesch2@gmail.com>",
"Stefano Karapetsas <stefano@karapetsas.com>",
"",
"Claudio Saavedra <csaavedra@igalia.com> (maintainer)",
"Felix Riemann <friemann@gnome.org> (maintainer)",
"",
"Lucas Rocha <lucasr@gnome.org>",
"Tim Gerla <tim+matebugs@gerla.net>",
"Philip Van Hoof <pvanhoof@gnome.org>",
"Paolo Borelli <pborelli@katamail.com>",
"Jens Finke <jens@triq.net>",
"Martin Baulig <martin@home-of-linux.org>",
"Arik Devens <arik@gnome.org>",
"Michael Meeks <mmeeks@gnu.org>",
"Federico Mena-Quintero <federico@gnu.org>",
"Lutz M\xc3\xbcller <urc8@rz.uni-karlsruhe.de>",
NULL
};

static const char *documenters[] = {
"Eliot Landrum <eliot@landrum.cx>",
"Federico Mena-Quintero <federico@gnu.org>",
"Sun GNOME Documentation Team <gdocteam@sun.com>",
NULL
};

const char *translators;

translators = _("translator-credits");

const char *license[] = {
N_("This program is free software; you can redistribute it and/or modify "
"it under the terms of the GNU General Public License as published by "
Expand All @@ -2573,9 +2544,34 @@ eom_window_cmd_about (GtkAction *action, gpointer user_data)
};

char *license_trans;
GKeyFile *key_file;
GBytes *bytes;
const guint8 *data;
gsize data_len;
GError *error = NULL;
char **authors, **documenters;
gsize n_authors = 0, n_documenters = 0 , i;

bytes = g_resources_lookup_data ("/org/mate/eom/ui/eom.about", G_RESOURCE_LOOKUP_FLAGS_NONE, &error);
g_assert_no_error (error);

data = g_bytes_get_data (bytes, &data_len);
key_file = g_key_file_new ();
g_key_file_load_from_data (key_file, (const char *) data, data_len, 0, &error);
g_assert_no_error (error);

authors = g_key_file_get_string_list (key_file, ABOUT_GROUP, "Authors", &n_authors, NULL);
documenters = g_key_file_get_string_list (key_file, ABOUT_GROUP, "Documenters", &n_documenters, NULL);

g_key_file_free (key_file);
g_bytes_unref (bytes);

for (i = 0; i < n_authors; ++i)
authors[i] = EMAILIFY (authors[i]);
for (i = 0; i < n_documenters; ++i)
documenters[i] = EMAILIFY (documenters[i]);

license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n",
_(license[2]), "\n", NULL);
license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n", _(license[2]), "\n", NULL);

window = EOM_WINDOW (user_data);

Expand All @@ -2589,13 +2585,15 @@ eom_window_cmd_about (GtkAction *action, gpointer user_data)
"comments",_("The MATE image viewer."),
"authors", authors,
"documenters", documenters,
"translator-credits", translators,
"translator-credits", _("translator-credits"),
"website", "http://www.mate-desktop.org/",
"logo-icon-name", "eom",
"wrap-license", TRUE,
"license", license_trans,
NULL);

g_strfreev (authors);
g_strfreev (documenters);
g_free (license_trans);
}

Expand Down
1 change: 1 addition & 0 deletions src/eom.gresource.xml
Expand Up @@ -7,6 +7,7 @@
<file compressed="true" preprocess="xml-stripblanks">eom-preferences-dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">eom-ui.xml</file>
<file compressed="true" preprocess="xml-stripblanks">metadata-sidebar.ui</file>
<file compressed="true">eom.about</file>
<file>pixmaps/thumbnail-frame.png</file>
</gresource>
</gresources>
Expand Down

0 comments on commit eed5511

Please sign in to comment.