aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-categories-config.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-07-03 07:16:47 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-07-03 07:16:47 +0800
commit4f31e9f28300834c3f8d2bfec7c35cac2b6995b0 (patch)
tree6f2e181190c9cb6c959b35ef0b68adee2f7f3ab2 /e-util/e-categories-config.c
parent6a4d86b16e49f9c516150373f192cf73b452c4ff (diff)
downloadgsoc2013-evolution-4f31e9f28300834c3f8d2bfec7c35cac2b6995b0.tar.gz
gsoc2013-evolution-4f31e9f28300834c3f8d2bfec7c35cac2b6995b0.tar.zst
gsoc2013-evolution-4f31e9f28300834c3f8d2bfec7c35cac2b6995b0.zip
Ă‘changed to return a gboolean (TRUE if the icon is found, FALSE if not).
2002-07-02 Rodrigo Moya <rodrigo@ximian.com> * 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
Diffstat (limited to 'e-util/e-categories-config.c')
-rw-r--r--e-util/e-categories-config.c10
1 files changed, 6 insertions, 4 deletions
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;
}
/**