Print_current_directory(): use ELLIPSIS_CHARACTER instead of ...
This commit is contained in:
parent
9a03a54fef
commit
de8379aab8
@ -79,7 +79,8 @@
|
||||
// Character to show a left arrow, used when editing long strings. It's present in ::Gfx->System_font
|
||||
#define LEFT_TRIANGLE_CHARACTER 17
|
||||
/// Character to display in menus for an ellipsis.
|
||||
#define ELLIPSIS_CHARACTER '…'
|
||||
//#define ELLIPSIS_CHARACTER '…'
|
||||
#define ELLIPSIS_CHARACTER '\x85'
|
||||
#define NB_LAYERS 1 ///< Initial number of layers for a new image
|
||||
#define MAX_NB_FRAMES 999 ///< Maximum number of frames that can be used in a grafx2 animation.
|
||||
#define MAX_NB_LAYERS 16 ///< Maximum number of layers that can be used in grafx2. Note that 32 is upper limit because of a few bit fields.
|
||||
|
||||
@ -1198,15 +1198,16 @@ void Print_current_directory(void)
|
||||
word temp_name[MAX_DISPLAYABLE_PATH+1]; // truncated name
|
||||
|
||||
memcpy(temp_name, Selector->Directory_unicode, 3*2); // first 3 chars "C:\"
|
||||
Unicode_char_strlcpy(temp_name+3, "...", MAX_DISPLAYABLE_PATH+1-3);
|
||||
temp_name[3] = (byte)ELLIPSIS_CHARACTER;
|
||||
temp_name[4] = 0;
|
||||
|
||||
// next we look for a place to fit everything ;)
|
||||
for (index=3;index<length;index++)
|
||||
if ( (Selector->Directory_unicode[index]==PATH_SEPARATOR[0]) &&
|
||||
(length-index<=MAX_DISPLAYABLE_PATH-6) )
|
||||
(length-index<=MAX_DISPLAYABLE_PATH-4) )
|
||||
{
|
||||
// we found the place !
|
||||
Unicode_strlcpy(temp_name+6,Selector->Directory_unicode+index, MAX_DISPLAYABLE_PATH+1-6);
|
||||
Unicode_strlcpy(temp_name+4,Selector->Directory_unicode+index, MAX_DISPLAYABLE_PATH+1-4);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1225,16 +1226,16 @@ void Print_current_directory(void)
|
||||
for (index=0;index<3;index++) // copy the first 3 chars "C:\"
|
||||
temp_name[index]=converted_name[index];
|
||||
|
||||
// Add ...
|
||||
strcpy(temp_name+3,"...");
|
||||
temp_name[3] = ELLIPSIS_CHARACTER;
|
||||
temp_name[4] = '\0';
|
||||
|
||||
// next we look for a place to fit everything ;)
|
||||
for (index++;index<length;index++)
|
||||
if ( (converted_name[index]==PATH_SEPARATOR[0]) &&
|
||||
(length-index<=MAX_DISPLAYABLE_PATH-6) )
|
||||
(length-index<=MAX_DISPLAYABLE_PATH-4) )
|
||||
{
|
||||
// we found the place !
|
||||
strcpy(temp_name+6,converted_name+index);
|
||||
strcpy(temp_name+4,converted_name+index);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user