Commit c95e8b22 authored by Bastien Nocera's avatar Bastien Nocera
Browse files

common: Add list-languages test application

Would just list the supported languages, and makes it easier
to debug the absence of a language.

See https://bugzilla.gnome.org/show_bug.cgi?id=656338
parent ea686a23
......@@ -2,6 +2,7 @@
cappletname = common
noinst_LTLIBRARIES = liblanguage.la libshortcuts.la
noinst_PROGRAMS = list-languages
AM_CPPFLAGS = \
$(PANEL_CFLAGS) \
......@@ -35,4 +36,8 @@ libshortcuts_la_LIBADD = \
libshortcuts_la_LDFLAGS = $(PANEL_LDFLAGS)
list_languages_SOURCES = list-languages.c
list_languages_LDADD = liblanguage.la
list_languages_CFLAGS = $(LIBLANGUAGE_CFLAGS)
-include $(top_srcdir)/git.mk
#include <glib.h>
#include <glib-object.h>
#include "gdm-languages.h"
int main (int argc, char **argv)
{
char **langs;
guint i;
g_type_init ();
langs = gdm_get_all_language_names ();
if (langs == NULL) {
g_warning ("No languages found");
return 1;
}
for (i = 0; langs[i] != NULL; i++)
g_print ("%s == %s\n", langs[i], gdm_get_language_from_name (langs[i], NULL));
g_strfreev (langs);
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment