gdm r6070 - in trunk: . gui/simple-greeter
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6070 - in trunk: . gui/simple-greeter
- Date: Wed, 26 Mar 2008 04:38:24 +0000 (GMT)
Author: halfline
Date: Wed Mar 26 04:38:24 2008
New Revision: 6070
URL: http://svn.gnome.org/viewvc/gdm?rev=6070&view=rev
Log:
2008-03-25 Ray Strode <rstrode redhat com>
* gui/simple-greeter/gdm-language-chooser-widget.c
(GdmLanguageChooserWidgetPrivate),
(gdm_language_chooser_widget_realize),
(gdm_language_chooser_class_init):
populate the language list when the widget is realized
instead of when it is first created
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-language-chooser-widget.c
Modified: trunk/gui/simple-greeter/gdm-language-chooser-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-language-chooser-widget.c (original)
+++ trunk/gui/simple-greeter/gdm-language-chooser-widget.c Wed Mar 26 04:38:24 2008
@@ -42,7 +42,7 @@
struct GdmLanguageChooserWidgetPrivate
{
- gpointer dummy;
+ guint languages_added : 1;
};
static void gdm_language_chooser_widget_class_init (GdmLanguageChooserWidgetClass *klass);
@@ -145,6 +145,21 @@
}
static void
+gdm_language_chooser_widget_realize (GtkWidget *widget)
+{
+ GdmLanguageChooserWidget *chooser;
+
+ chooser = GDM_LANGUAGE_CHOOSER_WIDGET (widget);
+
+ GTK_WIDGET_CLASS (gdm_language_chooser_widget_parent_class)->realize (widget);
+
+ if (!chooser->priv->languages_added) {
+ add_available_languages (chooser);
+ chooser->priv->languages_added = TRUE;
+ }
+}
+
+static void
gdm_language_chooser_widget_class_init (GdmLanguageChooserWidgetClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -152,6 +167,7 @@
object_class->dispose = gdm_language_chooser_widget_dispose;
object_class->finalize = gdm_language_chooser_widget_finalize;
+ widget_class->realize = gdm_language_chooser_widget_realize;
g_type_class_add_private (klass, sizeof (GdmLanguageChooserWidgetPrivate));
}
@@ -163,8 +179,6 @@
gdm_chooser_widget_set_separator_position (GDM_CHOOSER_WIDGET (widget),
GDM_CHOOSER_WIDGET_POSITION_TOP);
-
- add_available_languages (widget);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]