diff options
author | David Zeuthen <davidz@redhat.com> | 2009-02-27 21:03:47 +0000 |
---|---|---|
committer | David Zeuthen <davidz@src.gnome.org> | 2009-02-27 21:03:47 +0000 |
commit | bb883db7760581e47b1544681bcc84df5708edc9 (patch) | |
tree | 92fabd45d6547e98a8c7fc1e7124ffd958f83fcb /gtk | |
parent | f6eb9d426931d751488f5c62c488bc89843d91f8 (diff) | |
download | gdk-pixbuf-bb883db7760581e47b1544681bcc84df5708edc9.tar.gz |
Bug 573383 – GtkMountOperation fixes for ask_password()
2009-02-27 David Zeuthen <davidz@redhat.com>
Bug 573383 – GtkMountOperation fixes for ask_password()
* gtk/gtkmountoperation.c (gtk_mount_operation_ask_password):
Split the message from GMountOperation into primary/secondary like
we also do in gtk_mount_operation_ask_question()
svn path=/trunk/; revision=22415
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkmountoperation.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index b4802edd8..66563eeec 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -434,6 +434,7 @@ gtk_mount_operation_ask_password (GMountOperation *mount_op, GtkWidget *message_label; gboolean can_anonymous; guint rows; + const gchar *secondary; operation = GTK_MOUNT_OPERATION (mount_op); priv = operation->priv; @@ -482,11 +483,33 @@ gtk_mount_operation_ask_password (GMountOperation *mount_op, main_vbox = gtk_vbox_new (FALSE, 18); gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0); - message_label = gtk_label_new (message); - gtk_misc_set_alignment (GTK_MISC (message_label), 0.0, 0.5); - gtk_label_set_line_wrap (GTK_LABEL (message_label), TRUE); - gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (message_label), - FALSE, FALSE, 0); + secondary = strstr (message, "\n"); + if (secondary != NULL) + { + gchar *s; + gchar *primary; + + primary = g_strndup (message, secondary - message + 1); + s = g_strdup_printf ("<big><b>%s</b></big>%s", primary, secondary); + + message_label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (message_label), s); + gtk_misc_set_alignment (GTK_MISC (message_label), 0.0, 0.5); + gtk_label_set_line_wrap (GTK_LABEL (message_label), TRUE); + gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (message_label), + FALSE, TRUE, 0); + + g_free (s); + g_free (primary); + } + else + { + message_label = gtk_label_new (message); + gtk_misc_set_alignment (GTK_MISC (message_label), 0.0, 0.5); + gtk_label_set_line_wrap (GTK_LABEL (message_label), TRUE); + gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (message_label), + FALSE, FALSE, 0); + } vbox = gtk_vbox_new (FALSE, 6); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0); |