From: Eugene Doudine Date: Sun, 23 Mar 2014 05:37:35 +0000 (+0200) Subject: Fixed bug #27 dtfile space handling bug X-Git-Tag: 2.2.2~35 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e9185dda526b0e405a2726bc14bb7d520a05b63;p=oweals%2Fcde.git Fixed bug #27 dtfile space handling bug --- 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) {