Commit b795ca86 authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

First shot at a language chooser widget that uses locale archives and

2007-09-18  William Jon McCann  <mccann@jhu.edu>

	* configure.ac:
	* gui/simple-greeter/Makefile.am:
	* gui/simple-greeter/gdm-language-chooser-dialog.c:
	(gdm_language_chooser_dialog_get_current_language_name),
	(gdm_language_chooser_dialog_set_property),
	(gdm_language_chooser_dialog_get_property),
	(gdm_language_chooser_dialog_constructor),
	(gdm_language_chooser_dialog_dispose),
	(gdm_language_chooser_dialog_class_init), (on_response),
	(gdm_language_chooser_dialog_init),
	(gdm_language_chooser_dialog_finalize),
	(gdm_language_chooser_dialog_new):
	* gui/simple-greeter/gdm-language-chooser-dialog.h:
	* gui/simple-greeter/gdm-language-chooser-widget.c:
	(chooser_locale_free),
	(gdm_language_chooser_widget_get_current_language_name),
	(gdm_language_chooser_widget_set_property),
	(gdm_language_chooser_widget_get_property),
	(gdm_language_chooser_widget_constructor),
	(gdm_language_chooser_widget_dispose),
	(gdm_language_chooser_widget_class_init), (on_language_selected),
	(locale_exists), (utf8_convert), (get_lc_identification),
	(get_short_name_for_locale), (parse_short_name), (nameentcmp),
	(collect_locales_from_archive), (select_dirs),
	(collect_locales_from_directory), (collect_locales_from_aliases),
	(collect_locales), (on_row_activated), (get_translated_language),
	(get_language), (get_territory), (get_translated_territory),
	(languages_parse_start_tag), (territories_parse_start_tag),
	(languages_init), (territories_init), (add_locale_to_model),
	(populate_model), (gdm_language_chooser_widget_init),
	(gdm_language_chooser_widget_finalize),
	(gdm_language_chooser_widget_new):
	* gui/simple-greeter/gdm-language-chooser-widget.h:
	* gui/simple-greeter/langinfo.h:
	* gui/simple-greeter/libnotificationarea/Makefile.am:
	* gui/simple-greeter/locarchive.h:
	* gui/simple-greeter/test-language-chooser.c: (main):
	First shot at a language chooser widget that uses locale
	archives and iso-codes.


svn path=/branches/mccann-gobject/; revision=5283
parent 50803f76
2007-09-18 William Jon McCann <mccann@jhu.edu>
* configure.ac:
* gui/simple-greeter/Makefile.am:
* gui/simple-greeter/gdm-language-chooser-dialog.c:
(gdm_language_chooser_dialog_get_current_language_name),
(gdm_language_chooser_dialog_set_property),
(gdm_language_chooser_dialog_get_property),
(gdm_language_chooser_dialog_constructor),
(gdm_language_chooser_dialog_dispose),
(gdm_language_chooser_dialog_class_init), (on_response),
(gdm_language_chooser_dialog_init),
(gdm_language_chooser_dialog_finalize),
(gdm_language_chooser_dialog_new):
* gui/simple-greeter/gdm-language-chooser-dialog.h:
* gui/simple-greeter/gdm-language-chooser-widget.c:
(chooser_locale_free),
(gdm_language_chooser_widget_get_current_language_name),
(gdm_language_chooser_widget_set_property),
(gdm_language_chooser_widget_get_property),
(gdm_language_chooser_widget_constructor),
(gdm_language_chooser_widget_dispose),
(gdm_language_chooser_widget_class_init), (on_language_selected),
(locale_exists), (utf8_convert), (get_lc_identification),
(get_short_name_for_locale), (parse_short_name), (nameentcmp),
(collect_locales_from_archive), (select_dirs),
(collect_locales_from_directory), (collect_locales_from_aliases),
(collect_locales), (on_row_activated), (get_translated_language),
(get_language), (get_territory), (get_translated_territory),
(languages_parse_start_tag), (territories_parse_start_tag),
(languages_init), (territories_init), (add_locale_to_model),
(populate_model), (gdm_language_chooser_widget_init),
(gdm_language_chooser_widget_finalize),
(gdm_language_chooser_widget_new):
* gui/simple-greeter/gdm-language-chooser-widget.h:
* gui/simple-greeter/langinfo.h:
* gui/simple-greeter/libnotificationarea/Makefile.am:
* gui/simple-greeter/locarchive.h:
* gui/simple-greeter/test-language-chooser.c: (main):
First shot at a language chooser widget that uses locale
archives and iso-codes.
2007-09-13 William Jon McCann <mccann@jhu.edu>
* gui/simple-greeter/Makefile.am:
......
......@@ -677,7 +677,7 @@ if test "x$XINPUT_LIBS" = x; then
done
if test "x$XINPUT_LIBS" = x; then
AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details)
fi
fi
fi
AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
if test "x$have_xinput" = xyes; then
......@@ -852,6 +852,18 @@ else
fi
AC_SUBST(DBUS_SYS_DIR)
dnl ---------------------------------------------------------------------------
dnl - ISO Codes checks
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING([whether iso-codes has iso-639 domain])
if $PKG_CONFIG --variable=domains iso-codes | grep 639 >/dev/null ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
ISO_CODES=iso-codes
#
# Define some variables to represent the directories we use.
......@@ -1307,7 +1319,6 @@ gui/Makefile
gui/modules/Makefile
gui/simple-greeter/Makefile
gui/simple-greeter/libnotificationarea/Makefile
gui/simple-greeter/libbackground/Makefile
gui/simple-chooser/Makefile
utils/Makefile
data/Makefile
......
......@@ -8,17 +8,13 @@ INCLUDES = \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libgreeter \
-I$(top_srcdir)/gui/simple-greeter/libnotificationarea \
-DAUTHDIR=\""$(authdir)"\" \
-DGDMCONFDIR=\"$(gdmconfdir)\" \
-DDATADIR=\""$(datadir)"\" \
-DGDMCONFDIR=\"$(gdmconfdir)\" \
-DDMCONFDIR=\""$(dmconfdir)"\" \
-DGDM_CONFIG_FILE=\"$(gdmconfdir)/gdm.conf\" \
-DGDMLOCALEDIR=\""$(gdmlocaledir)"\" \
-DLIBLOCALEDIR=\""$(libdir)/locale"\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGLADEDIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DSBINDIR=\""$(sbindir)"\" \
-DPIXMAPDIR=\""$(pixmapdir)"\" \
$(GUI_CFLAGS) \
$(DBUS_CFLAGS) \
$(GREETER_CFLAGS) \
......@@ -28,6 +24,7 @@ INCLUDES = \
noinst_PROGRAMS = \
test-greeter-background \
test-greeter-panel \
test-language-chooser \
$(NULL)
test_greeter_background_SOURCES = \
......@@ -52,6 +49,18 @@ test_greeter_panel_LDADD = \
$(GUI_LIBS) \
$(NULL)
test_language_chooser_SOURCES = \
test-language-chooser.c \
gdm-language-chooser-widget.h \
gdm-language-chooser-widget.c \
gdm-language-chooser-dialog.h \
gdm-language-chooser-dialog.c \
$(NULL)
test_language_chooser_LDADD = \
$(GUI_LIBS) \
$(NULL)
libexec_PROGRAMS = \
gdm-simple-greeter
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include "gdm-language-chooser-widget.h"
#include "gdm-language-chooser-dialog.h"
#define GDM_LANGUAGE_CHOOSER_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_LANGUAGE_CHOOSER_DIALOG, GdmLanguageChooserDialogPrivate))
struct GdmLanguageChooserDialogPrivate
{
GtkWidget *chooser_widget;
};
enum {
PROP_0,
};
static void gdm_language_chooser_dialog_class_init (GdmLanguageChooserDialogClass *klass);
static void gdm_language_chooser_dialog_init (GdmLanguageChooserDialog *language_chooser_dialog);
static void gdm_language_chooser_dialog_finalize (GObject *object);
G_DEFINE_TYPE (GdmLanguageChooserDialog, gdm_language_chooser_dialog, GTK_TYPE_DIALOG)
char *
gdm_language_chooser_dialog_get_current_language_name (GdmLanguageChooserDialog *dialog)
{
char *language_name;
g_return_val_if_fail (GDM_IS_LANGUAGE_CHOOSER_DIALOG (dialog), NULL);
language_name = gdm_language_chooser_widget_get_current_language_name (GDM_LANGUAGE_CHOOSER_WIDGET (dialog->priv->chooser_widget));
return language_name;
}
static void
gdm_language_chooser_dialog_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdmLanguageChooserDialog *self;
self = GDM_LANGUAGE_CHOOSER_DIALOG (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdm_language_chooser_dialog_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdmLanguageChooserDialog *self;
self = GDM_LANGUAGE_CHOOSER_DIALOG (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static GObject *
gdm_language_chooser_dialog_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
GdmLanguageChooserDialog *language_chooser_dialog;
GdmLanguageChooserDialogClass *klass;
klass = GDM_LANGUAGE_CHOOSER_DIALOG_CLASS (g_type_class_peek (GDM_TYPE_LANGUAGE_CHOOSER_DIALOG));
language_chooser_dialog = GDM_LANGUAGE_CHOOSER_DIALOG (G_OBJECT_CLASS (gdm_language_chooser_dialog_parent_class)->constructor (type,
n_construct_properties,
construct_properties));
return G_OBJECT (language_chooser_dialog);
}
static void
gdm_language_chooser_dialog_dispose (GObject *object)
{
GdmLanguageChooserDialog *language_chooser_dialog;
language_chooser_dialog = GDM_LANGUAGE_CHOOSER_DIALOG (object);
g_debug ("Disposing language_chooser_dialog");
G_OBJECT_CLASS (gdm_language_chooser_dialog_parent_class)->dispose (object);
}
static void
gdm_language_chooser_dialog_class_init (GdmLanguageChooserDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = gdm_language_chooser_dialog_get_property;
object_class->set_property = gdm_language_chooser_dialog_set_property;
object_class->constructor = gdm_language_chooser_dialog_constructor;
object_class->dispose = gdm_language_chooser_dialog_dispose;
object_class->finalize = gdm_language_chooser_dialog_finalize;
g_type_class_add_private (klass, sizeof (GdmLanguageChooserDialogPrivate));
}
static void
on_response (GdmLanguageChooserDialog *dialog,
gint response_id)
{
switch (response_id) {
default:
break;
}
}
static void
gdm_language_chooser_dialog_init (GdmLanguageChooserDialog *dialog)
{
dialog->priv = GDM_LANGUAGE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
dialog->priv->chooser_widget = gdm_language_chooser_widget_new ();
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->priv->chooser_widget);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
g_signal_connect (dialog,
"response",
G_CALLBACK (on_response),
dialog);
gtk_widget_show_all (GTK_WIDGET (dialog));
}
static void
gdm_language_chooser_dialog_finalize (GObject *object)
{
GdmLanguageChooserDialog *language_chooser_dialog;
g_return_if_fail (object != NULL);
g_return_if_fail (GDM_IS_LANGUAGE_CHOOSER_DIALOG (object));
language_chooser_dialog = GDM_LANGUAGE_CHOOSER_DIALOG (object);
g_return_if_fail (language_chooser_dialog->priv != NULL);
G_OBJECT_CLASS (gdm_language_chooser_dialog_parent_class)->finalize (object);
}
GtkWidget *
gdm_language_chooser_dialog_new (void)
{
GObject *object;
object = g_object_new (GDM_TYPE_LANGUAGE_CHOOSER_DIALOG,
NULL);
return GTK_WIDGET (object);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __GDM_LANGUAGE_CHOOSER_DIALOG_H
#define __GDM_LANGUAGE_CHOOSER_DIALOG_H
#include <glib-object.h>
#include <gtk/gtkdialog.h>
G_BEGIN_DECLS
#define GDM_TYPE_LANGUAGE_CHOOSER_DIALOG (gdm_language_chooser_dialog_get_type ())
#define GDM_LANGUAGE_CHOOSER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_LANGUAGE_CHOOSER_DIALOG, GdmLanguageChooserDialog))
#define GDM_LANGUAGE_CHOOSER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_LANGUAGE_CHOOSER_DIALOG, GdmLanguageChooserDialogClass))
#define GDM_IS_LANGUAGE_CHOOSER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_LANGUAGE_CHOOSER_DIALOG))
#define GDM_IS_LANGUAGE_CHOOSER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_LANGUAGE_CHOOSER_DIALOG))
#define GDM_LANGUAGE_CHOOSER_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_LANGUAGE_CHOOSER_DIALOG, GdmLanguageChooserDialogClass))
typedef struct GdmLanguageChooserDialogPrivate GdmLanguageChooserDialogPrivate;
typedef struct
{
GtkDialog parent;
GdmLanguageChooserDialogPrivate *priv;
} GdmLanguageChooserDialog;
typedef struct
{
GtkDialogClass parent_class;
} GdmLanguageChooserDialogClass;
GType gdm_language_chooser_dialog_get_type (void);
GtkWidget * gdm_language_chooser_dialog_new (void);
char * gdm_language_chooser_dialog_get_current_language_name (GdmLanguageChooserDialog *dialog);
G_END_DECLS
#endif /* __GDM_LANGUAGE_CHOOSER_DIALOG_H */
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __GDM_LANGUAGE_CHOOSER_WIDGET_H
#define __GDM_LANGUAGE_CHOOSER_WIDGET_H
#include <glib-object.h>
#include <gtk/gtkvbox.h>
G_BEGIN_DECLS
#define GDM_TYPE_LANGUAGE_CHOOSER_WIDGET (gdm_language_chooser_widget_get_type ())
#define GDM_LANGUAGE_CHOOSER_WIDGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_LANGUAGE_CHOOSER_WIDGET, GdmLanguageChooserWidget))
#define GDM_LANGUAGE_CHOOSER_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_LANGUAGE_CHOOSER_WIDGET, GdmLanguageChooserWidgetClass))
#define GDM_IS_LANGUAGE_CHOOSER_WIDGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_LANGUAGE_CHOOSER_WIDGET))
#define GDM_IS_LANGUAGE_CHOOSER_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_LANGUAGE_CHOOSER_WIDGET))
#define GDM_LANGUAGE_CHOOSER_WIDGET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_LANGUAGE_CHOOSER_WIDGET, GdmLanguageChooserWidgetClass))
typedef struct GdmLanguageChooserWidgetPrivate GdmLanguageChooserWidgetPrivate;
typedef struct
{
GtkVBox parent;
GdmLanguageChooserWidgetPrivate *priv;
} GdmLanguageChooserWidget;
typedef struct
{
GtkVBoxClass parent_class;
/* signals */
void (* language_activated) (GdmLanguageChooserWidget *widget);
} GdmLanguageChooserWidgetClass;
GType gdm_language_chooser_widget_get_type (void);
GtkWidget * gdm_language_chooser_widget_new (void);
char * gdm_language_chooser_widget_get_current_language_name (GdmLanguageChooserWidget *widget);
G_END_DECLS
#endif /* __GDM_LANGUAGE_CHOOSER_WIDGET_H */
This diff is collapsed.
......@@ -39,7 +39,7 @@ libnotificationarea_la_LIBADD = \
$(GUI_LIBS) \
$(NULL)
libnotification_area_la_LDFLAGS = \
libnotificationarea_la_LDFLAGS = \
-export-dynamic \
$(NULL)
......
/* Definitions for locale archive handling.
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _LOCARCHIVE_H
#define _LOCARCHIVE_H 1
#include <stdint.h>
#define AR_MAGIC 0xde020109
struct locarhead
{
uint32_t magic;
/* Serial number. */
uint32_t serial;
/* Name hash table. */
uint32_t namehash_offset;
uint32_t namehash_used;
uint32_t namehash_size;
/* String table. */
uint32_t string_offset;
uint32_t string_used;
uint32_t string_size;
/* Table with locale records. */
uint32_t locrectab_offset;
uint32_t locrectab_used;
uint32_t locrectab_size;
/* MD5 sum hash table. */
uint32_t sumhash_offset;
uint32_t sumhash_used;
uint32_t sumhash_size;
};
struct namehashent
{
/* Hash value of the name. */
uint32_t hashval;
/* Offset of the name in the string table. */
uint32_t name_offset;
/* Offset of the locale record. */
uint32_t locrec_offset;
};
struct sumhashent
{
/* MD5 sum. */
char sum[16];
/* Offset of the file in the archive. */
uint32_t file_offset;
};
struct locrecent
{
uint32_t refs; /* # of namehashent records that point here */
struct
{
uint32_t offset;
uint32_t len;
} record[__LC_LAST];
};
struct locarhandle
{
int fd;
void *addr;
size_t len;
};
/* In memory data for the locales with their checksums. */
typedef struct locale_category_data
{
off_t size;
void *addr;
char sum[16];
} locale_data_t[__LC_LAST];
#endif /* locarchive.h */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdlib.h>
#include <libintl.h>
#include <locale.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gdm-language-chooser-dialog.h"
int
main (int argc, char *argv[])
{
GtkWidget *dialog;
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
setlocale (LC_ALL, "");
gtk_init (&argc, &argv);
dialog = gdm_language_chooser_dialog_new ();
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
char *name;
name = gdm_language_chooser_dialog_get_current_language_name (GDM_LANGUAGE_CHOOSER_DIALOG (dialog));
g_message ("Language: %s", name);
g_free (name);
}
gtk_widget_destroy (dialog);
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