aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-08-03 18:54:59 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-08-03 18:54:59 +0800
commit93b07314131b6db4e18b30636de8b30c7f3b69b7 (patch)
treee9d8071551c93d9a4febc4f2a85785c9a4debb43 /widgets
parent74d7a2416b8ed9a61ba0725eebfdd6f37aa5d613 (diff)
downloadgsoc2013-evolution-93b07314131b6db4e18b30636de8b30c7f3b69b7.tar.gz
gsoc2013-evolution-93b07314131b6db4e18b30636de8b30c7f3b69b7.tar.zst
gsoc2013-evolution-93b07314131b6db4e18b30636de8b30c7f3b69b7.zip
2007-08-03 mcrha Fix for bug #335566
svn path=/trunk/; revision=33941
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-attachment-bar.c8
2 files changed, 15 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index f0baf734be..6c6dd8b609 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-03 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #335566
+
+ * e-attachment-bar.c: (e_attachment_bar_create_attachment_cache),
+ (update): When scaling image, ensures nonzero width or height.
+
2007-08-03 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #451599
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 3e964cd1da..711dbf2888 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -225,12 +225,16 @@ e_attachment_bar_create_attachment_cache (EAttachment *attachment)
ratio = width / 48;
width = 48;
height = height / ratio;
+ if (height == 0)
+ height = 1;
}
} else {
if (height > 48) {
ratio = height / 48;
height = 48;
width = width / ratio;
+ if (width == 0)
+ width = 1;
}
}
@@ -315,12 +319,16 @@ update (EAttachmentBar *bar)
ratio = width / 48;
width = 48;
height = height / ratio;
+ if (height == 0)
+ height = 1;
}
} else {
if (height > 48) {
ratio = height / 48;
height = 48;
width = width / ratio;
+ if (width == 0)
+ width = 1;
}
}