aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJohnny Jacob <jjohnny@novell.com>2006-07-12 00:36:50 +0800
committerAndre Klapper <aklapper@src.gnome.org>2006-07-12 00:36:50 +0800
commitf9fe8b978a275424a41e34bb4d79c747a4907695 (patch)
treee98b5d6854eb58199bb18820088377f4db3f7d72 /mail
parentecd0e497e224ca2d545a7003e38e5234770082a9 (diff)
downloadgsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.tar
gsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.tar.gz
gsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.tar.bz2
gsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.tar.lz
gsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.tar.xz
gsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.tar.zst
gsoc2013-evolution-f9fe8b978a275424a41e34bb4d79c747a4907695.zip
** Patch by Not Zed <NotZed@Ximian.com> ** See bug #262003
2006-07-11 Johnny Jacob <jjohnny@novell.com> ** Patch by Not Zed <NotZed@Ximian.com> ** See bug #262003 * em-format-html-display.c (efhd_xpkcs7mime_validity_clicked): put the potentially long descriptions into a textbuffer so it's scrollable. svn path=/trunk/; revision=32287
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-format-html-display.c45
2 files changed, 46 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7e08713307..e0217ce6b5 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2006-07-11 Johnny Jacob <jjohnny@novell.com>
+
+ ** Patch by Not Zed <NotZed@Ximian.com>
+ ** See bug #262003
+
+ * em-format-html-display.c (efhd_xpkcs7mime_validity_clicked): put
+ the potentially long descriptions into a textbuffer so it's
+ scrollable.
+
2006-07-07 Ushveen Kaur <kushveen@novell.com>
Fixes bug #336963.
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 689461f4d2..8a0dd3caf4 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -52,6 +52,7 @@
#include <gtk/gtklabel.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkscrolledwindow.h>
+#include <gtk/gtktextview.h>
#include <gtk/gtktogglebutton.h>
#include <gtk/gtktable.h>
#include <gtk/gtkmenu.h>
@@ -1086,10 +1087,24 @@ efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject
gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
if (po->valid->sign.description) {
- w = gtk_label_new(po->valid->sign.description);
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, FALSE);
- gtk_label_set_selectable((GtkLabel *)w, TRUE);
+ GtkTextBuffer *buffer;
+
+ buffer = gtk_text_buffer_new(NULL);
+ gtk_text_buffer_set_text(buffer, po->valid->sign.description, strlen(po->valid->sign.description));
+ w = g_object_new(gtk_scrolled_window_get_type(),
+ "hscrollbar_policy", GTK_POLICY_AUTOMATIC,
+ "vscrollbar_policy", GTK_POLICY_AUTOMATIC,
+ "shadow_type", GTK_SHADOW_IN,
+ "child", g_object_new(gtk_text_view_get_type(),
+ "buffer", buffer,
+ "cursor_visible", FALSE,
+ "editable", FALSE,
+ "width_request", 500,
+ "height_request", 160,
+ NULL),
+ NULL);
+ g_object_unref(buffer);
+
gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
}
@@ -1104,10 +1119,24 @@ efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject
gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
if (po->valid->encrypt.description) {
- w = gtk_label_new(po->valid->encrypt.description);
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, FALSE);
- gtk_label_set_selectable((GtkLabel *)w, TRUE);
+ GtkTextBuffer *buffer;
+
+ buffer = gtk_text_buffer_new(NULL);
+ gtk_text_buffer_set_text(buffer, po->valid->encrypt.description, strlen(po->valid->encrypt.description));
+ w = g_object_new(gtk_scrolled_window_get_type(),
+ "hscrollbar_policy", GTK_POLICY_AUTOMATIC,
+ "vscrollbar_policy", GTK_POLICY_AUTOMATIC,
+ "shadow_type", GTK_SHADOW_IN,
+ "child", g_object_new(gtk_text_view_get_type(),
+ "buffer", buffer,
+ "cursor_visible", FALSE,
+ "editable", FALSE,
+ "width_request", 500,
+ "height_request", 160,
+ NULL),
+ NULL);
+ g_object_unref(buffer);
+
gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
}