diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2008-05-16 19:05:02 +0000 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-05-16 19:05:02 +0000 |
commit | c68a99bfd432786d24d31ffb952cd29ebd67d83a (patch) | |
tree | faf12ac4bcc9800ed4cf023299b3a1501ce181fa | |
parent | 6051672740155b75c1335fa0a5c18a8acb3590c2 (diff) | |
download | evolution-data-server-c68a99bfd432786d24d31ffb952cd29ebd67d83a.tar.gz |
** Fixes bug #532286
2008-05-16 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #532286
* libedataserverui/e-passwords.c (update_capslock_state),
(ep_ask_password):
Fix some whitespace issues, and make the Caps Lock label smaller.
svn path=/trunk/; revision=8798
-rw-r--r-- | libedataserverui/ChangeLog | 7 | ||||
-rw-r--r-- | libedataserverui/e-passwords.c | 47 |
2 files changed, 34 insertions, 20 deletions
diff --git a/libedataserverui/ChangeLog b/libedataserverui/ChangeLog index c1872a31c..fd5fd442e 100644 --- a/libedataserverui/ChangeLog +++ b/libedataserverui/ChangeLog @@ -1,3 +1,10 @@ +2008-05-16 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes bug #532286 + + * e-passwords.c (update_capslock_state), (ep_ask_password): + Fix some whitespace issues, and make the Caps Lock label smaller. + 2008-05-05 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #325882 diff --git a/libedataserverui/e-passwords.c b/libedataserverui/e-passwords.c index 093112c1d..a9242e2d4 100644 --- a/libedataserverui/e-passwords.c +++ b/libedataserverui/e-passwords.c @@ -958,13 +958,16 @@ static gboolean update_capslock_state (gpointer widget, gpointer event, GtkWidget *label) { GdkModifierType mask = 0; + gchar *markup = NULL; gdk_window_get_pointer (NULL, NULL, NULL, &mask); - if (mask & GDK_LOCK_MASK) - gtk_widget_show (label); - else - gtk_widget_hide (label); + /* The space acts as a vertical placeholder. */ + markup = g_markup_printf_escaped ( + "<small>%s</small>", (mask & GDK_LOCK_MASK) ? + _("You have the Caps Lock key on.") : " "); + gtk_label_set_markup (GTK_LABEL (label), markup); + g_free (markup); return FALSE; } @@ -972,7 +975,7 @@ update_capslock_state (gpointer widget, gpointer event, GtkWidget *label) static void ep_ask_password (EPassMsg *msg) { - GtkWidget *widget, *capslock_box; + GtkWidget *widget; GtkWidget *container; gint type = msg->flags & E_PASSWORDS_REMEMBER_MASK; guint noreply = msg->noreply; @@ -1006,8 +1009,9 @@ ep_ask_password (EPassMsg *msg) /* Table */ container = gtk_table_new (2, 3, FALSE); gtk_table_set_col_spacings (GTK_TABLE (container), 12); - gtk_table_set_row_spacings (GTK_TABLE (container), 12); - gtk_table_set_row_spacing (GTK_TABLE (container), 1, 6); + gtk_table_set_row_spacings (GTK_TABLE (container), 6); + gtk_table_set_row_spacing (GTK_TABLE (container), 0, 12); + gtk_table_set_row_spacing (GTK_TABLE (container), 1, 0); gtk_widget_show (container); gtk_box_pack_start ( @@ -1033,7 +1037,7 @@ ep_ask_password (EPassMsg *msg) gtk_table_attach ( GTK_TABLE (container), widget, - 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); /* Password Entry */ widget = gtk_entry_new (); @@ -1057,20 +1061,23 @@ ep_ask_password (EPassMsg *msg) gtk_table_attach ( GTK_TABLE (container), widget, - 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - - capslock_box = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (capslock_box), gtk_label_new (""), FALSE, FALSE, 0); - widget = gtk_label_new (_("You have the Caps Lock key on.")); - gtk_box_pack_start (GTK_BOX (capslock_box), widget, TRUE, TRUE, 0); - gtk_widget_show_all (capslock_box); - gtk_table_attach ( - GTK_TABLE (container), capslock_box, - 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); - g_signal_connect (password_dialog, "key-release-event", G_CALLBACK (update_capslock_state), widget); - g_signal_connect (password_dialog, "focus-in-event", G_CALLBACK (update_capslock_state), widget); + /* Caps Lock Label */ + widget = gtk_label_new (NULL); update_capslock_state (NULL, NULL, widget); + gtk_widget_show (widget); + + gtk_table_attach ( + GTK_TABLE (container), widget, + 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0); + + g_signal_connect ( + password_dialog, "key-release-event", + G_CALLBACK (update_capslock_state), widget); + g_signal_connect ( + password_dialog, "focus-in-event", + G_CALLBACK (update_capslock_state), widget); /* static password, shouldn't be remembered between sessions, but will be remembered within the session beyond our control */ |