summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-02-18 17:17:41 +0100
committerraveit65 <[email protected]>2019-02-18 20:19:53 +0100
commita67e572e17b4c81793e6b4f37cedcb3a1e2a4efe (patch)
tree5b7087695df463dbd7d0ded26821f824a8c334f8
parent9a4748bbe065d58e2e70c3810e6d864739dbf54b (diff)
downloadatril-a67e572e17b4c81793e6b4f37cedcb3a1e2a4efe.tar.bz2
atril-a67e572e17b4c81793e6b4f37cedcb3a1e2a4efe.tar.xz
Read authors (updated) from atril.about gresource
-rw-r--r--shell/Makefile.am1
-rw-r--r--shell/atril.about2
-rw-r--r--shell/atril.gresource.xml1
-rw-r--r--shell/ev-window.c49
4 files changed, 32 insertions, 21 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 829137b3..881cd860 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -152,6 +152,7 @@ atrild_LDADD= \
endif
EXTRA_DIST = \
+ atril.about \
atril.css \
atril-ui.xml \
atril-toolbar.xml \
diff --git a/shell/atril.about b/shell/atril.about
new file mode 100644
index 00000000..f2a1380f
--- /dev/null
+++ b/shell/atril.about
@@ -0,0 +1,2 @@
+[About]
+Authors=Adam Erdman <hekel%archlinux.info>;Alejandro Piñeiro <apinheiro%igalia.com>;Alexander Ovchinnikov <sanek23994%gmail.com>;Alexander van der Meij <alexandervdm%gliese.me>;Alexei Sorokin <sor.alexei%meowr.ru>;Andrey Gursky <andrey.gursky%e-mail.ua>;Antia Puentes <apuentes%igalia.com>;Avishkar Gupta <rootavish%gmail.com>;Balló György <ballogyor%gmail.com>;Baurzhan Muftakhidinov <baurthefirst%gmail.com>;Brent Hull <bhull2010%live.com>;Bryan Clark <clarkbw%gnome.org>;Carlos Garcia Campos <carlosgc%gnome.org>;Christian Persch <chpe%gnome.org>;Clement Lefebvre <clement.lefebvre%linuxmint.com>;Colomban Wendling <cwendling%hypra.fr>;Cormac Walsh <cormac.walsh%protonmail.com>;Cosimo Cecchi <cosimoc%gnome.org>;Daniel Glöckner <daniel-gl%gmx.net>;Eli Schwartz <eschwartz%archlinux.org>;Gabriel Cormier-Affleck <bl0ckedusersoft%gmail.com>;Geert Braekmans <brakarov%outlook.com>;Germán Poo-Caamaño <gpoo%gnome.org>;Giovanni Campagna <gcampagna%src.gnome.org>;Giselle Machado <giselle.mnr%gmail.com>;Hib Eris <hib%hiberis.nl>;Jason Crain <jason%aquaticape.us>;Joanmarie Diggs <jdiggs%igalia.com>;Jonathan Blandford <jrb%gnome.org>;JosephMcc <mccullarjoseph%gmail.com>;José Aliste <jaliste%gnome.org>;Justin Willmert <justin%jdjlab.com>;Lars Mueller <cobinja%yahoo.de>;Lubos Koudelka <koudelka.lubos%email.cz>;Marcel Dijkstra <marcel.dykstra%gmail.com>;Marco Pesenti Gritti <marco%gnome.org>;Marcus Comstedt <marcus%mc.pp.se>;Marek Kasik <mkasik%redhat.com>;Martin Kretzschmar <m_kretzschmar%gmx.net>;Martin Wimpress <martin%mate-desktop.org>;Matthew Petroff <matthew%mpetroff.net>;Matvey Soloviev <msoloviev%cs.cornell.edu>;Michał Bień <michal1.bien%gmail.com>;Mickael Albertus <mickael.albertus%gmail.com>;Nelson Benitez Leon <nbenitezl%gmail.com>;Nickolay V. Shmyrev <nshmyrev%yandex.ru>;Owen W. Taylor <otaylor%fishsoup.net>;Oz N Tiram <nahumoz%gmail.com>;Pablo Barciela <scow%riseup.net>;Perberos <perberos%gmail.com>;Peter Moser <pitiz29a%gmail.com>;Piotr Drąg <piotrdrag%gmail.com>;Robert Buj <robert.buj%gmail.com>;Sander Sweers <infirit%gmail.com>;Steev Klimaszewski <steev%gentoo.org>;Stefano Karapetsas <stefano%karapetsas.com>;Steve Zesch <stevezesch2%gmail.com>;Tobias Mueller <muelli%cryptobitch.de>;Vlad Orlov <monsta%inbox.ru>;William Jon McCann <jmccann%redhat.com>;Wolfgang Ulbrich <mate%raveit.de>;Wouter Bolsterlee <wbolster%gnome.org>;Wu Xiaotian <yetist%gmail.com>;Xiao-Long Chen <chenxiaolong%cxl.epac.to>;ZenWalker <scow%riseup.net>;
diff --git a/shell/atril.gresource.xml b/shell/atril.gresource.xml
index 952c7de1..0a241ead 100644
--- a/shell/atril.gresource.xml
+++ b/shell/atril.gresource.xml
@@ -20,6 +20,7 @@
<file alias="ui/atril.xml" compressed="true" preprocess="xml-stripblanks">atril-ui.xml</file>
<file alias="ui/toolbar.xml" compressed="true" preprocess="xml-stripblanks">atril-toolbar.xml</file>
<file alias="ui/atril.css" compressed="true">atril.css</file>
+ <file compressed="true">atril.about</file>
</gresource>
</gresources>
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 95678310..828cc9e9 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -5298,25 +5298,12 @@ build_comments_string (EvDocument *document)
return comments;
}
+#define ABOUT_GROUP "About"
+#define EMAILIFY(string) (g_strdelimit ((string), "%", '@'))
+
static void
ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
{
- const char *authors[] = {
- "Martin Kretzschmar <[email protected]>",
- "Jonathan Blandford <[email protected]>",
- "Marco Pesenti Gritti <[email protected]>",
- "Nickolay V. Shmyrev <[email protected]>",
- "Bryan Clark <[email protected]>",
- "Carlos Garcia Campos <[email protected]>",
- "Wouter Bolsterlee <[email protected]>",
- "Christian Persch <chpe" "\100" "gnome.org>",
- "Perberos <[email protected]>",
- "Stefano Karapetsas <[email protected]>",
- "Steve Zesch <[email protected]>",
- "Avishkar Gupta <[email protected]>",
- NULL
- };
-
const char *documenters[] = {
"MATE Documentation Team",
"GNOME Documentation Team",
@@ -5337,15 +5324,34 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n")
};
- char *license_trans;
- char *comments;
+ char *license_trans, *comments;
+ GKeyFile *key_file;
+ GBytes *bytes;
+ const guint8 *data;
+ gsize data_len;
+ GError *error = NULL;
+ char **authors;
+ gsize n_authors = 0, i;
+
+ bytes = g_resources_lookup_data ("/org/mate/atril/shell/atril.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);
+
+ g_key_file_free (key_file);
+ g_bytes_unref (bytes);
+
+ for (i = 0; i < n_authors; ++i)
+ authors[i] = EMAILIFY (authors[i]);
#ifdef ENABLE_NLS
const char **p;
- for (p = authors; *p; ++p)
- *p = _(*p);
-
for (p = documenters; *p; ++p)
*p = _(*p);
#endif
@@ -5371,6 +5377,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
"wrap-license", TRUE,
NULL);
+ g_strfreev (authors);
g_free (comments);
g_free (license_trans);
}