summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/mate-calc.about2
-rw-r--r--src/math-window.c36
-rw-r--r--src/org.mate.calculator.gresource.xml1
4 files changed, 33 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b6690a1..df5fccd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -190,6 +190,7 @@ EXTRA_DIST = \
buttons-basic.ui \
buttons-financial.ui \
buttons-programming.ui \
+ mate-calc.about \
mp-enums.c.template \
mp-enums.h.template \
org.mate.calculator.gresource.xml \
diff --git a/src/mate-calc.about b/src/mate-calc.about
new file mode 100644
index 0000000..ba1664a
--- /dev/null
+++ b/src/mate-calc.about
@@ -0,0 +1,2 @@
+[About]
+Authors=Abel McClendon <hcmmac%hosscomm.com>;Adam Erdman <hekel%archlinux.info>;Alexander von Gluck IV <kallisti5%unixzen.com>;Alexei Sorokin <sor.alexei%meowr.ru>;Allan Nordhøy <epost%anotheragency.no>;Christopher Fujino <christopherfujino%gmail.com>;Clement Lefebvre <clement.lefebvre%linuxmint.com>;Friedel Wolff <friedel%translate.org.za>;JP Cimalando <jp-dev%inbox.ru>;Klaus Niederkrüger <kniederk%umpa.ens-lyon.fr>;Laszlo Boros <iamsemmu%gmail.com>;Laurent Napias <tamplan%free.fr>;Marcel Dijkstra <marcel.dykstra%gmail.com>;Mark Thomas <markbt%efaref.net>;Martin Wimpress <martin%mate-desktop.org>;Michael Terry <michael.terry%canonical.com>;Mike Gabriel <mike.gabriel%das-netzwerkteam.de>;Nikolay Martynov <mar.kolya%gmail.com>;Pablo Barciela <scow%riseup.net>;Perberos <perberos%gmail.com>;Piotr Drąg <piotrdrag%gmail.com>;Rich Burridge <rich.burridge%sun.com>;Robert Ancell <robert.ancell%gmail.com>;Robert Buj <robert.buj%gmail.com>;Sander Sweers <infirit%gmail.com>;Scott Balneaves <sbalneav%mate-desktop.org>;Sorokin Alexei <sor.alexei%meowr.ru>;Stefan Tauner <stefan.tauner%gmx.at>;Stefano Karapetsas <stefano%karapetsas.com>;Stephen Krauth <sk42%stephenk.com>;Steve Zesch <stevezesch2%gmail.com>;Victor Kareh <vkareh%vkareh.net>;Vlad Orlov <monsta%inbox.ru>;Wolfgang Ulbrich <mate%raveit.de>;Wu Xiaotian <yetist%gmail.com>;
diff --git a/src/math-window.c b/src/math-window.c
index ca31f4e..9030893 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -221,15 +221,11 @@ static void help_cb(GtkWidget *widget, MathWindow *window)
}
}
+#define ABOUT_GROUP "About"
+#define EMAILIFY(string) (g_strdelimit ((string), "%", '@'))
+
static void about_cb(GtkWidget* widget, MathWindow* window)
{
- const char* authors[] = {
- "Rich Burridge <[email protected]>",
- "Robert Ancell <[email protected]>",
- "Klaus Niederkrüger <[email protected]>",
- NULL
- };
-
const char* documenters[] = {
N_("Sun Microsystems"),
N_("MATE Documentation Team"),
@@ -252,6 +248,31 @@ static void about_cb(GtkWidget* widget, MathWindow* window)
};
char *license_trans = g_strjoin ("\n\n", _(license[0]), _(license[1]), _(license[2]), NULL);
+
+ 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/calculator/ui/mate-calc.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]);
+
const char **p;
for (p = documenters; *p; ++p)
@@ -274,6 +295,7 @@ static void about_cb(GtkWidget* widget, MathWindow* window)
"logo-icon-name", "accessories-calculator",
NULL);
+ g_strfreev (authors);
g_free (license_trans);
}
diff --git a/src/org.mate.calculator.gresource.xml b/src/org.mate.calculator.gresource.xml
index c31c1ba..6766402 100644
--- a/src/org.mate.calculator.gresource.xml
+++ b/src/org.mate.calculator.gresource.xml
@@ -21,6 +21,7 @@
<file compressed="true" preprocess="xml-stripblanks">buttons-basic.ui</file>
<file compressed="true" preprocess="xml-stripblanks">buttons-financial.ui</file>
<file compressed="true" preprocess="xml-stripblanks">buttons-programming.ui</file>
+ <file compressed="true">mate-calc.about</file>
<file compressed="true" preprocess="xml-stripblanks">preferences.ui</file>
</gresource>
</gresources>