From 5e9185dda526b0e405a2726bc14bb7d520a05b63 Mon Sep 17 00:00:00 2001 From: Eugene Doudine Date: Sun, 23 Mar 2014 07:37:35 +0200 Subject: [PATCH] Fixed bug #27 dtfile space handling bug --- cde/programs/dtfile/File.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cde/programs/dtfile/File.c b/cde/programs/dtfile/File.c index 8cefb266..93eca6d8 100644 --- a/cde/programs/dtfile/File.c +++ b/cde/programs/dtfile/File.c @@ -6339,12 +6339,17 @@ EstimateIconSize( int label_len; int label_width; - if (file_view_data == NULL) + if (file_view_data == NULL) { label_len = 1; - else if (file_view_data->label == NULL) - label_len = strlen(file_view_data->file_data->file_name); - else - label_len = strlen(file_view_data->label); + } else { +#ifdef MULTIBYTE + label_len = DtCharCount(file_view_data->label == NULL ? + file_view_data->file_data->file_name : file_view_data->label); +#else + label_len = strlen(file_view_data->label == NULL ? + file_view_data->file_data->file_name : file_view_data->label); +#endif + } if (layout_data->pixmap_position == XmPIXMAP_TOP) { -- 2.25.1