mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 03:23:46 +08:00
comment out get_text_char_pos and tune srvChangeCaption to use strdup
This commit is contained in:
@@ -1199,6 +1199,7 @@ static int srvChangeCaption (int cli, int idx_znode, const char *caption)
|
||||
nodes = GET_ZORDERNODE(zi);
|
||||
|
||||
if (caption && idx_znode > 0) {
|
||||
#if 0 /* Since 4.2.0, use strdup to duplicate the caption */
|
||||
PLOGFONT menufont ;
|
||||
int fit_chars, pos_chars[MAX_CAPTION_LEN];
|
||||
int caplen;
|
||||
@@ -1215,6 +1216,12 @@ static int srvChangeCaption (int cli, int idx_znode, const char *caption)
|
||||
strcpy ((nodes[idx_znode].caption + pos_chars[fit_chars-1]),
|
||||
"...");
|
||||
}
|
||||
#else
|
||||
if (nodes[idx_znode].caption)
|
||||
free (nodes[idx_znode].caption)
|
||||
|
||||
nodes[idx_znode].caption = strdup (caption);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (OnZNodeOperation)
|
||||
|
||||
@@ -1701,6 +1701,7 @@ static HWND dskSetActiveZOrderNode (int cli, int idx_znode)
|
||||
return old_hwnd;
|
||||
}
|
||||
|
||||
#if 0 /* Since 4.2.0, use strdup to duplicate the caption */
|
||||
static void get_text_char_pos (PLOGFONT log_font, const char *text,
|
||||
int len, int fit_bytes, int *fit_chars, int *pos_chars)
|
||||
{
|
||||
@@ -1738,6 +1739,7 @@ static void get_text_char_pos (PLOGFONT log_font, const char *text,
|
||||
*fit_chars = char_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*get the count of idle mask rect*/
|
||||
int __mg_get_idle_slot (unsigned char* bitmap, int len_bmp)
|
||||
|
||||
Reference in New Issue
Block a user