From a18af91be595552c76016523bcaa6e5bf7fb508b Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 14 Mar 2002 00:34:35 +0000 Subject: If the charset item doesn't have a class (aka "Unknown"), don't write a 2002-03-13 Jeffrey Stedfast * e-charset-picker.c (add_charset): If the charset item doesn't have a class (aka "Unknown"), don't write a class name, instead just give the charset name as the menu item label. Fixes bug #14753. svn path=/trunk/; revision=16154 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-charset-picker.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 62ccbf968d..8e3d1447ca 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2002-03-13 Jeffrey Stedfast + + * e-charset-picker.c (add_charset): If the charset item doesn't + have a class (aka "Unknown"), don't write a class name, instead + just give the charset name as the menu item label. Fixes bug + #14753. + 2002-03-13 Christopher James Lahey * e-multi-config-dialog.c: Added alpha blending here. diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c index aa2d174d89..5c8751149e 100644 --- a/widgets/misc/e-charset-picker.c +++ b/widgets/misc/e-charset-picker.c @@ -123,18 +123,20 @@ add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name) { GtkWidget *item; char *label; - + if (charset->subclass) { label = g_strdup_printf ("%s, %s (%s)", _(classnames[charset->class]), _(charset->subclass), charset->name); - } else { + } else if (charset->class) { label = g_strdup_printf ("%s (%s)", _(classnames[charset->class]), charset->name); + } else { + label = g_strdup (charset->name); } - + item = gtk_menu_item_new_with_label (label); gtk_object_set_data_full (GTK_OBJECT (item), "charset", charset->name, free_name ? g_free : NULL); -- cgit v1.2.3