gdm r6136 - in trunk: . gui/simple-greeter



Author: halfline
Date: Tue Apr  8 15:12:51 2008
New Revision: 6136
URL: http://svn.gnome.org/viewvc/gdm?rev=6136&view=rev

Log:
2008-04-07 Ray Strode <rstrode redhat com>

	* gui/simple-greeter/gdm-language-chooser-dialog.c
	(gdm_language_chooser_dialog_size_request),
	(gdm_language_chooser_dialog_realize),
	(gdm_language_chooser_dialog_class_init),
	(gdm_language_chooser_dialog_init):
	Make the language dialog look a little nicer initially.
	We won't be able to do better until we fix the scrollable
	widget to report it's minimum height in size_request
	unless a property is set to report it's maximum height
	(or until we make the language-chooser not depend on
	 the scrollable widget)


Modified:
   trunk/ChangeLog
   trunk/gui/simple-greeter/gdm-language-chooser-dialog.c

Modified: trunk/gui/simple-greeter/gdm-language-chooser-dialog.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-language-chooser-dialog.c	(original)
+++ trunk/gui/simple-greeter/gdm-language-chooser-dialog.c	Tue Apr  8 15:12:51 2008
@@ -86,7 +86,7 @@
         screen_w = gdk_screen_get_width (gtk_widget_get_screen (widget));
         screen_h = gdk_screen_get_height (gtk_widget_get_screen (widget));
 
-        gtk_widget_size_request (GTK_BIN (widget)->child, &child_requisition);
+        gtk_widget_get_child_requisition (GTK_BIN (widget)->child, &child_requisition);
         *requisition = child_requisition;
 
         requisition->width += 2 * GTK_CONTAINER (widget)->border_width;
@@ -110,6 +110,18 @@
 }
 
 static void
+gdm_language_chooser_dialog_realize (GtkWidget *widget)
+{
+        GdmLanguageChooserDialog *chooser_dialog;
+
+        chooser_dialog = GDM_LANGUAGE_CHOOSER_DIALOG (widget);
+
+        gtk_widget_show (chooser_dialog->priv->chooser_widget);
+
+        GTK_WIDGET_CLASS (gdm_language_chooser_dialog_parent_class)->realize (widget);
+}
+
+static void
 gdm_language_chooser_dialog_class_init (GdmLanguageChooserDialogClass *klass)
 {
         GObjectClass   *object_class = G_OBJECT_CLASS (klass);
@@ -120,6 +132,7 @@
 
         object_class->finalize = gdm_language_chooser_dialog_finalize;
         widget_class->size_request = gdm_language_chooser_dialog_size_request;
+        widget_class->realize = gdm_language_chooser_dialog_realize;
 #ifdef I_COULD_GO_BACK_IN_TIME_AND_MAKE_RESPONSE_RUN_FIRST
         dialog_class->response = gdm_language_chooser_dialog_response;
 #endif
@@ -149,7 +162,6 @@
         dialog->priv->chooser_widget = gdm_language_chooser_widget_new ();
         gdm_chooser_widget_set_hide_inactive_items (GDM_CHOOSER_WIDGET (dialog->priv->chooser_widget),
                                                     FALSE);
-        gtk_widget_show (dialog->priv->chooser_widget);
 
 #ifndef I_COULD_GO_BACK_IN_TIME_AND_MAKE_RESPONSE_RUN_FIRST
         g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (gdm_language_chooser_dialog_response), NULL);
@@ -170,6 +182,8 @@
         gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
         gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
         gtk_container_set_border_width (GTK_CONTAINER (dialog->priv->chooser_widget), 5);
+        gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ALWAYS);
+        gtk_window_set_default_size (GTK_WINDOW (dialog), 512, 440);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]