From 4f31e9f28300834c3f8d2bfec7c35cac2b6995b0 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 2 Jul 2002 23:16:47 +0000 Subject: =?UTF-8?q?=C3=91changed=20to=20return=20a=20gboolean=20(TRUE=20if?= =?UTF-8?q?=20the=20icon=20is=20found,=20FALSE=20if=20not).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2002-07-02 Rodrigo Moya * e-categories-config.c (e_categories_config_get_icon_for):Ă‘changed to return a gboolean (TRUE if the icon is found, FALSE if not). svn path=/trunk/; revision=17356 --- e-util/e-categories-config.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'e-util/e-categories-config.c') diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c index 72db8e572c..59daea5aef 100644 --- a/e-util/e-categories-config.c +++ b/e-util/e-categories-config.c @@ -82,21 +82,21 @@ e_categories_config_set_color_for (const char *category, const char *color) * Returns the icon (and associated mask) configured for the * given category. */ -void +gboolean e_categories_config_get_icon_for (const char *category, GdkPixmap **pixmap, GdkBitmap **mask) { char *icon_file; GdkPixbuf *pixbuf; GdkBitmap *tmp_mask; - g_return_if_fail (pixmap != NULL); + g_return_val_if_fail (pixmap != NULL, FALSE); icon_file = (char *) e_categories_config_get_icon_file_for (category); if (!icon_file) { *pixmap = NULL; if (mask != NULL) *mask = NULL; - return; + return FALSE; } /* load the icon in our list */ @@ -107,7 +107,7 @@ e_categories_config_get_icon_for (const char *category, GdkPixmap **pixmap, GdkB *pixmap = NULL; if (mask != NULL) *mask = NULL; - return; + return FALSE; } g_hash_table_insert (icons_table, g_strdup (icon_file), pixbuf); @@ -117,6 +117,8 @@ e_categories_config_get_icon_for (const char *category, GdkPixmap **pixmap, GdkB gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap, &tmp_mask, 1); if (mask != NULL) *mask = tmp_mask; + + return TRUE; } /** -- cgit v1.2.3