aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-utils.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-31 13:23:46 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-31 13:23:46 +0800
commit9ea10deea3b27d7bde1b82792cae76b99b5610f6 (patch)
tree0ca0584e525ab8ff7e1e24ec61437406dcbcf5d4 /widgets/table/e-table-header-utils.c
parent095302aef20099e51739209a4e4229379da85047 (diff)
downloadgsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar
gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.gz
gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.bz2
gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.lz
gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.xz
gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.zst
gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.zip
Move away from g_asserts from g_return*.
svn path=/trunk/; revision=34142
Diffstat (limited to 'widgets/table/e-table-header-utils.c')
-rw-r--r--widgets/table/e-table-header-utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 1bbb60eb07..807713d170 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -86,7 +86,7 @@ e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget)
pango_layout_get_pixel_size (layout, NULL, &height);
if (ecol->is_pixbuf) {
- g_assert (ecol->pixbuf != NULL);
+ g_return_val_if_fail (ecol->pixbuf != NULL, -1);
height = MAX (height, gdk_pixbuf_get_height (ecol->pixbuf));
}
@@ -122,7 +122,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
pwidth = gdk_pixbuf_get_width (pixbuf);
pheight = gdk_pixbuf_get_height (pixbuf);
- g_assert (width <= pwidth && height <= pheight);
+ g_return_val_if_fail (width <= pwidth && height <= pheight, NULL);
color = ((bg->red & 0xff00) << 8) | (bg->green & 0xff00) | ((bg->blue & 0xff00) >> 8);
@@ -404,8 +404,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
}
default:
- g_assert_not_reached ();
- return;
+ g_return_if_reached();
}
if (inner_width < 1)
@@ -420,7 +419,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
int xpos;
GdkPixmap *pixmap;
- g_assert (ecol->pixbuf != NULL);
+ g_return_if_fail (ecol->pixbuf != NULL);
pwidth = gdk_pixbuf_get_width (ecol->pixbuf);
pheight = gdk_pixbuf_get_height (ecol->pixbuf);