diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-07-03 07:16:47 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-07-03 07:16:47 +0800 |
commit | 4f31e9f28300834c3f8d2bfec7c35cac2b6995b0 (patch) | |
tree | 6f2e181190c9cb6c959b35ef0b68adee2f7f3ab2 /e-util | |
parent | 6a4d86b16e49f9c516150373f192cf73b452c4ff (diff) | |
download | gsoc2013-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')
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-categories-config.c | 10 | ||||
-rw-r--r-- | e-util/e-categories-config.h | 6 |
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); |