aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-categories-config.c10
-rw-r--r--e-util/e-categories-config.h6
3 files changed, 14 insertions, 7 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index eba2575f0e..1e818b4767 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+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).
+
2002-06-07 Not Zed <NotZed@Ximian.com>
* e-dialog-utils.c (e_gnome_warning_dialog_parented):
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;
}
/**
diff --git a/e-util/e-categories-config.h b/e-util/e-categories-config.h
index 0b798e466e..99dc02be23 100644
--- a/e-util/e-categories-config.h
+++ b/e-util/e-categories-config.h
@@ -21,9 +21,9 @@ BEGIN_GNOME_DECLS
const char *e_categories_config_get_color_for (const char *category);
void e_categories_config_set_color_for (const char *category, const char *color);
-void e_categories_config_get_icon_for (const char *category,
- GdkPixmap **icon,
- GdkBitmap **mask);
+gboolean e_categories_config_get_icon_for (const char *category,
+ GdkPixmap **icon,
+ GdkBitmap **mask);
const char *e_categories_config_get_icon_file_for (const char *category);
void e_categories_config_set_icon_for (const char *category,
const char *pixmap_file);