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



Author: mccann
Date: Thu Mar 13 20:33:02 2008
New Revision: 6015
URL: http://svn.gnome.org/viewvc/gdm?rev=6015&view=rev

Log:
2008-03-13  William Jon McCann  <jmccann redhat com>

	* gui/simple-greeter/gdm-greeter-panel.c:
	(is_a11y_button_disabled), (gdm_greeter_panel_init):
	* gui/simple-greeter/test-greeter-panel.c: (main):
	Try centering language and session chooser widgets on panel.



Modified:
   trunk/ChangeLog
   trunk/gui/simple-greeter/gdm-greeter-panel.c
   trunk/gui/simple-greeter/test-greeter-panel.c

Modified: trunk/gui/simple-greeter/gdm-greeter-panel.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-panel.c	(original)
+++ trunk/gui/simple-greeter/gdm-greeter-panel.c	Thu Mar 13 20:33:02 2008
@@ -53,6 +53,8 @@
         GtkWidget              *a11y_button;
         GtkWidget              *a11y_dialog;
         GtkWidget              *hbox;
+        GtkWidget              *alignment;
+        GtkWidget              *option_hbox;
         GtkWidget              *hostname_label;
         GtkWidget              *clock;
         GtkWidget              *language_option_widget;
@@ -483,6 +485,8 @@
                 g_error_free (error);
         }
         g_object_unref (client);
+
+        return disabled;
 }
 
 static void
@@ -490,6 +494,7 @@
 {
         NaTray    *tray;
         GtkWidget *image;
+        GtkWidget *spacer;
 
         panel->priv = GDM_GREETER_PANEL_GET_PRIVATE (panel);
 
@@ -525,17 +530,29 @@
                 gtk_box_pack_start (GTK_BOX (panel->priv->hbox), panel->priv->a11y_button, FALSE, FALSE, 0);
         }
 
+        panel->priv->alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+        gtk_box_pack_start (GTK_BOX (panel->priv->hbox), panel->priv->alignment, TRUE, TRUE, 0);
+        gtk_widget_show (panel->priv->alignment);
+
+        panel->priv->option_hbox = gtk_hbox_new (FALSE, 12);
+        gtk_widget_show (panel->priv->option_hbox);
+        gtk_container_add (GTK_CONTAINER (panel->priv->alignment), panel->priv->option_hbox);
+
+        spacer = gtk_label_new ("");
+        gtk_box_pack_start (GTK_BOX (panel->priv->option_hbox), spacer, TRUE, TRUE, 6);
+        gtk_widget_show (spacer);
+
         panel->priv->language_option_widget = gdm_language_option_widget_new ();
         g_signal_connect (G_OBJECT (panel->priv->language_option_widget),
                           "language-activated",
                           G_CALLBACK (on_language_activated), panel);
-        gtk_box_pack_start (GTK_BOX (panel->priv->hbox), panel->priv->language_option_widget, FALSE, FALSE, 6);
+        gtk_box_pack_start (GTK_BOX (panel->priv->option_hbox), panel->priv->language_option_widget, FALSE, FALSE, 6);
 
         panel->priv->session_option_widget = gdm_session_option_widget_new ();
         g_signal_connect (G_OBJECT (panel->priv->session_option_widget),
                           "session-activated",
                           G_CALLBACK (on_session_activated), panel);
-        gtk_box_pack_start (GTK_BOX (panel->priv->hbox), panel->priv->session_option_widget, FALSE, FALSE, 6);
+        gtk_box_pack_start (GTK_BOX (panel->priv->option_hbox), panel->priv->session_option_widget, FALSE, FALSE, 6);
 
         /* FIXME: we should only show hostname on panel when connected
            to a remote host */
@@ -547,7 +564,7 @@
 
         panel->priv->clock = gdm_clock_widget_new ();
         gtk_box_pack_end (GTK_BOX (panel->priv->hbox),
-                          GTK_WIDGET (panel->priv->clock), FALSE, FALSE, 6);
+                            GTK_WIDGET (panel->priv->clock), FALSE, FALSE, 6);
         gtk_widget_show (panel->priv->clock);
 
         tray = na_tray_new_for_screen (gtk_window_get_screen (GTK_WINDOW (panel)),

Modified: trunk/gui/simple-greeter/test-greeter-panel.c
==============================================================================
--- trunk/gui/simple-greeter/test-greeter-panel.c	(original)
+++ trunk/gui/simple-greeter/test-greeter-panel.c	Thu Mar 13 20:33:02 2008
@@ -46,6 +46,8 @@
         gtk_init (&argc, &argv);
 
         panel = gdm_greeter_panel_new ();
+        gdm_greeter_panel_show_user_options (GDM_GREETER_PANEL (panel));
+
         gtk_widget_show (panel);
 
         gtk_main ();



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