aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@src.gnome.org>2005-11-17 12:29:31 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2005-11-17 12:29:31 +0800
commitec7081a5db22f7c8766d824e4852910b714d1028 (patch)
tree5d752e5e824246677664376278853821f5a1bbae /widgets
parent9884d03d842f2e4e7b0886b9f2a0586050de3fac (diff)
downloadgsoc2013-evolution-ec7081a5db22f7c8766d824e4852910b714d1028.tar.gz
gsoc2013-evolution-ec7081a5db22f7c8766d824e4852910b714d1028.tar.zst
gsoc2013-evolution-ec7081a5db22f7c8766d824e4852910b714d1028.zip
Fix a division-by-zero error crasher
svn path=/trunk/; revision=30630
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog5
-rw-r--r--widgets/misc/e-attachment-bar.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index d2e2b007c3..3e431df074 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-17 Harish Krishnaswamy <kharish@novell.com>
+
+ * e-attachment-bar.c: (update), (e_attachment_bar_set_width):
+ Fix a division-by-zero error crasher.
+
2005-11-15 Srinivasa Ragavan <sragavan@novell.com>
* e-attachment-bar.[ch] (e_attachment_bar_get_all_attachments): Added
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 5de718f914..15d8331e5b 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -415,6 +415,7 @@ update (EAttachmentBar *bar)
calculate_height_width(bar, &width, &height);
per_col = bar_width / width;
+ per_col = per_col ? per_col : 1;
rows = (bar->priv->num_attachments + per_col -1 )/ per_col;
gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, rows * height);
}
@@ -505,6 +506,7 @@ e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width)
calculate_height_width(bar, &width, &height);
per_col = bar_width / width;
+ per_col = per_col ? per_col : 1;
rows = (bar->priv->num_attachments + per_col - 1) / per_col;
gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, rows * height);
}
'insertions'>+21 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-0/+1 * Add missing dependency when Nautilus extension disabled is.avl2009-07-101-1/+3 * Update to 2.26.3.avl2009-07-014-17/+33 * Update to 2.26.2.kwm2009-05-202-4/+4 * Presenting GNOME 2.26.1 for FreeBSD.kwm2009-04-243-5/+14 * Presenting GNOME 2.26 for FreeBSD. Seemarcus2009-04-103-16/+30 * Update to 2.24.3.marcus2009-01-142-4/+4 * Presenting GNOME 2.24 for FreeBSD.marcus2009-01-103-10/+43 * Update to 2.22.4.mezz2008-07-022-5/+4 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * Update to 2.22.3.marcus2008-05-283-5/+5 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-1/+1 * Update to 2.22.2.mezz2008-04-092-4/+4 * Update to 2.22.1ahze2008-04-082-5/+4 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-243-11/+21 * Update to 2.20.3.mezz2008-01-082-4/+4 * Update to 2.20.2.marcus2007-12-122-5/+5 * Presenting GNOME 2.20.1 and all related works for FreeBSD. The officialmarcus2007-10-253-35/+52 * Update to 2.18.4.marcus2007-07-032-4/+4 * Update to 2.18.3.mezz2007-05-293-5/+7 * - Welcome X.org 7.2 \o/.flz2007-05-202-38/+1 * Update to 2.18.2ahze2007-04-173-4/+7 * Update to 2.18.1.marcus2007-04-112-4/+4 * Presenting GNOME 2.18 for FreeBSD. GNOME 2.18 is a departure from recent GNOMEmarcus2007-03-195-75/+32