Skip to content
Permalink
Browse files

Read authors (updated) from pluma.about file

  • Loading branch information...
rbuj authored and raveit65 committed Feb 18, 2019
1 parent e27a451 commit a56d506ff56f79bbea0bbaf8861dc48d7cf77f79
Showing with 33 additions and 14 deletions.
  1. +7 −0 pluma/Makefile.am
  2. +23 −13 pluma/pluma-commands-help.c
  3. +1 −1 pluma/pluma-dirs.c
  4. +2 −0 pluma/pluma.about
@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \
$(INTROSPECTION_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DPLUMA_DATADIR=\""$(datadir)/pluma"\" \
-DLIBDIR=\""$(libdir)"\"

pluma_SOURCES = \
@@ -172,13 +173,19 @@ pluma-marshal.c: pluma-marshal.list $(GLIB_GENMARSHAL)
$(AM_V_GEN) echo "#include \"pluma-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=pluma_marshal >> $@

aboutdir = $(datadir)/pluma/
about_DATA = \
pluma.about \
$(NULL)

uidir = $(datadir)/pluma/ui/
ui_DATA = \
pluma-ui.xml \
pluma-print-preferences.ui

EXTRA_DIST = \
$(ui_DATA) \
$(about_DATA) \
pluma-enum-types.h.template \
pluma-enum-types.c.template \
pluma-marshal.list \
@@ -35,6 +35,7 @@
#include <config.h>
#endif

#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>

@@ -50,21 +51,11 @@ void _pluma_cmd_help_contents(GtkAction* action, PlumaWindow* window)
pluma_help_display(GTK_WINDOW(window), NULL, NULL);
}

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

void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
{
static const gchar* const authors[] = {
"Paolo Maggi <paolo@gnome.org>",
"Paolo Borelli <pborelli@katamail.com>",
"Steve Fr\303\251cinaux <steve@istique.net>",
"Jesse van den Kieboom <jessevdk@gnome.org>",
"Ignacio Casal Quinteiro <icq@gnome.org>",
"James Willcox <jwillcox@gnome.org>",
"Chema Celorio",
"Federico Mena Quintero <federico@novell.com>",
"Perberos <perberos@gmail.com>",
NULL
};

static const gchar* documenters[] = {
N_("MATE Documentation Team"),
N_("GNOME Documentation Team"),
@@ -90,10 +81,28 @@ void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
};

gchar *license_trans;
GKeyFile *key_file;
GError *error = NULL;
char **authors;
gsize n_authors = 0, i;
static const gchar **p;

pluma_debug (DEBUG_COMMANDS);

key_file = g_key_file_new ();
if (!g_key_file_load_from_file (key_file, PLUMA_DATADIR G_DIR_SEPARATOR_S "pluma.about", 0, &error)) {
g_warning ("Couldn't load about data: %s\n", error->message);
g_error_free (error);
g_key_file_free (key_file);
return;
}

authors = g_key_file_get_string_list (key_file, ABOUT_GROUP, "Authors", &n_authors, NULL);
g_key_file_free (key_file);

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

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

for (p = documenters; *p; ++p)
@@ -119,5 +128,6 @@ void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
"website", "http://mate-desktop.org",
NULL);

g_strfreev (authors);
g_free (license_trans);
}
@@ -69,7 +69,7 @@ gchar* pluma_dirs_get_user_accels_file(void)

gchar* pluma_dirs_get_pluma_data_dir(void)
{
return g_build_filename(DATADIR, "pluma", NULL);
return g_build_filename(PLUMA_DATADIR, NULL);
}

gchar* pluma_dirs_get_pluma_locale_dir(void)
@@ -0,0 +1,2 @@
[About]
Authors=Adam Erdman <hekel%archlinux.info>;Alexander van der Meij <alexandervdm%gliese.me>;Alexander von Gluck IV <kallisti5%unixzen.com>;Andrew Fowlie <andrew.j.fowlie%qq.com>;Balló György <ballogyor%gmail.com>;Björn Esser <besser82%fedoraproject.org>;Clement Lefebvre <clement.lefebvre%linuxmint.com>;Daggerbot <daggerbot%gmail.com>;Gabriel Cormier-Affleck <bl0ckedusersoft%gmail.com>;Ignacio Casal Quinteiro <icq%gnome.org>;John Church <sleeveroller%gmail.com>;Marcel Dijkstra <marcel.dykstra%gmail.com>;Martin Wimpress <martin%mate-desktop.org>;OBATA Akio <obache%users.noreply.github.com>;Pablo Barciela <scow%riseup.net>;Paolo Borelli <pborelli%gnome.org>;Patrick Monnerat <pm%datasphere.ch>;Perberos <perberos%gmail.com>;Piotr Drąg <piotrdrag%gmail.com>;Robert Buj <robert.buj%gmail.com>;Ryan Q <ryan.q%linux.com>;Sander Sweers <infirit%gmail.com>;Sorokin Alexei <sor.alexei%meowr.ru>;Stefano Karapetsas <stefano%karapetsas.com>;Steve Zesch <stevezesch2%gmail.com>;Sébastien Wilmet <wilmet%gnome.org>;V.Barkov <neverscaired%gmail.com>;Vadim Barkov <vbrkov%gmail.com>;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>;

0 comments on commit a56d506

Please sign in to comment.
You can’t perform that action at this time.