From 39e56385b1abe6e053dd04004cc4fecbc0cf2d86 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 23 Oct 2003 15:51:57 +0000 Subject: handle the case where label == NULL, and set it to _("Unknown"). 2003-10-23 Chris Toshok * e-component-registry.c (query_components): handle the case where label == NULL, and set it to _("Unknown"). svn path=/trunk/; revision=23040 --- shell/e-component-registry.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shell/e-component-registry.c') diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index e5e48aadc4..66d23a2f35 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -30,6 +30,7 @@ #include "e-util/e-lang-utils.h" +#include #include #include @@ -124,6 +125,10 @@ query_components (EComponentRegistry *registry) id = info_list->_buffer[i].iid; label = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_label", language_list); + if (label == NULL) { + g_print ("no label for %s\n", id); + label = g_strdup (_("Unknown")); + } icon_name = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_icon", NULL); if (icon_name == NULL) { -- cgit v1.2.3