aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-08-09 17:03:30 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-08-09 17:03:30 +0800
commit7814007d3b3728fa0b91acdf28bae25e16f5c8a3 (patch)
treebb4ab98e78a7f8f9395d3218793619d4c331f09b /mail
parent25538fafd052091699c9b53d4fa216270a43ec10 (diff)
downloadgsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.tar
gsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.tar.gz
gsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.tar.bz2
gsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.tar.lz
gsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.tar.xz
gsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.tar.zst
gsoc2013-evolution-7814007d3b3728fa0b91acdf28bae25e16f5c8a3.zip
Fix for bug #348565
svn path=/trunk/; revision=32507
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-format-html-display.c13
2 files changed, 16 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e9d992a2d4..72458075f8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2006-08-09 Srinivasa Ragavan <sragavan@novell.com>
+ ** Fix for bug #348565
+
+ * em-format-html-display.c (efhd_bar_resize) (efhd_add_bar): Check
+ the bar size, before setting the width. The width goes to zero,
+ when switching from classic to vertical view and vice versa.
+
+2006-08-09 Srinivasa Ragavan <sragavan@novell.com>
+
** Fix for bug #350411 #350476
* em-mailer-prefs.c (notify_sound_changed): When prefs comes up,
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index cb184e8692..6dbaa0a96c 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -2216,8 +2216,10 @@ efhd_bar_resize(GtkWidget *w, GtkAllocation *event, EMFormatHTML *efh)
gtk_widget_size_request (efhd->priv->attachment_bar, &req);
width = ((GtkWidget *) efh->html)->allocation.width - 16;
- /* Update the width of the bar */
- e_attachment_bar_set_width(E_ATTACHMENT_BAR(efhd->priv->attachment_bar), width);
+
+ /* Update the width of the bar when the width is greater than 1*/
+ if (width > 0)
+ e_attachment_bar_set_width(E_ATTACHMENT_BAR(efhd->priv->attachment_bar), width);
}
static gboolean
@@ -2247,7 +2249,7 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh;
struct _EMFormatHTMLDisplayPrivate *priv = efhd->priv;
GtkWidget *hbox1, *hbox2, *hbox3, *vbox, *txt, *image, *save, *scroll;
- int width, height;
+ int width, height, bar_width;
priv->attachment_bar = e_attachment_bar_new(NULL);
scroll = gtk_scrolled_window_new (NULL, NULL);
@@ -2288,9 +2290,10 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
/* FIXME: What if the text is more?. Should we reduce the text with appending ...?
* or resize the bar? How to figure out that, it needs more space? */
+ bar_width = ((GtkWidget *)efh->html)->parent->allocation.width - /* FIXME */16;
gtk_widget_set_size_request (priv->attachment_bar,
- ((GtkWidget *)efh->html)->parent->allocation.width - /* FIXME */16,
- 84 /* FIXME: Default show only one row, Dont hardcode size*/);
+ bar_width > 0 ? bar_width : 0,
+ 84 /* FIXME: Default show only one row, Dont hardcode size*/);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start ((GtkBox *)vbox, hbox2, FALSE, FALSE, 2);