[gdm: 6/70] Don't truncate long pam messages



commit ce98eb85a16da6fd3f27f5dd01581c8ef64f3cb5
Author: Ray Strode <halfline src gnome org>
Date:   Wed Jan 14 22:59:34 2009 +0000

    Don't truncate long pam messages
    
    At some point I made the greeter login window set it's size
    requisition to it's size allocation to prevent it from shrinking
    horizontally as the window hierarchy changed.
    
    That change actually prevents the window from growing horizontally also.
    
    This commit reworks things from within the size-request handler so
    it can always grow but never shrink.
    
    svn path=/trunk/; revision=6661
---
 ChangeLog                                     |   20 ++++++++++++++++++++
 gui/simple-greeter/gdm-greeter-login-window.c |    8 ++++----
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3894bd0..0e96531 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2009-01-14  Ray Strode <rstrode redhat com>
+
+	Don't truncate long pam messages
+
+	At some point I made the greeter login window set it's
+	size requisition to it's size allocation to prevent it
+	from shrinking horizontally as the window hierarchy
+	changed.
+
+	That change actually prevents the window from growing
+	horizontally also.
+
+	This commit reworks things from within the size-request
+	handler so it can always grow but never shrink.
+
+	* gui/simple-greeter/gdm-greeter-login-window.c
+	(switch_mode): don't set size_request anymore
+	(gdm_greeter_login_window_size_request): handle
+	size constraints here.
+
 2009-01-11  William Jon McCann  <jmccann redhat com>
 
 	* gui/user-switch-applet/applet.c (gdm_applet_data_free),
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index a3e1411..b5329f3 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -543,7 +543,6 @@ switch_mode (GdmGreeterLoginWindow *login_window,
 
         switch (number) {
         case MODE_SELECTION:
-                gtk_widget_set_size_request (GTK_WIDGET (login_window), -1, -1);
                 set_log_in_button_mode (login_window, LOGIN_BUTTON_HIDDEN);
 
                 show_widget (login_window, "cancel-button", FALSE);
@@ -568,9 +567,6 @@ switch_mode (GdmGreeterLoginWindow *login_window,
                 default_name = NULL;
                 break;
         case MODE_AUTHENTICATION:
-                gtk_widget_set_size_request (GTK_WIDGET (login_window),
-                                             GTK_WIDGET (login_window)->allocation.width,
-                                             -1);
                 show_widget (login_window, "cancel-button", TRUE);
                 show_widget (login_window, "shutdown-button", FALSE);
                 show_widget (login_window, "restart-button", FALSE);
@@ -1678,6 +1674,10 @@ gdm_greeter_login_window_size_request (GtkWidget      *widget,
          */
         requisition->width = MAX (requisition->width, .33 * screen_w);
         requisition->height = MIN (requisition->height, .80 * screen_h);
+
+       /* Don't ever shrink window width
+        */
+       requisition->width = MAX (requisition->width, widget->allocation.width);
 }
 
 static void



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