eel-string: Fix API comment

eel_string_ellispize_*() functions and eel-gdk-extension.h
are no more. This comment was totally outdated.

Replace it with actual API docs.
This commit is contained in:
António Fernandes 2018-02-06 17:45:36 +00:00
parent f42979f0b0
commit f2f0947627

View file

@ -89,14 +89,21 @@ eel_str_capitalize (const char *string)
return capitalized; return capitalized;
} }
/* Note: eel_string_ellipsize_* that use a length in pixels /**
* rather than characters can be found in eel_gdk_extensions.h * eel_str_middle_truncate:
* @string: the original string
* @truncate_length: the number of characters of the truncated string (min. 3).
* *
* FIXME bugzilla.eazel.com 5089: * Replaces a number of characters in the middle of a @string with an ellipsis
* we should coordinate the names of eel_string_ellipsize_* * character, to obtain a number of characters equal to @truncate_length, if the
* and eel_str_*_truncate so that they match better and reflect * original @string is longer than that.
* their different behavior. *
*/ * Useful to ellipsise a variable substring (such as a file name) with variable
* lengh. Do not use this for full labels, use PangoLayout instead.
*
* Returns: (transfer full): a newly allocated truncated string, or a copy of
* @string if it was not longer than @truncate_length.
**/
char * char *
eel_str_middle_truncate (const char *string, eel_str_middle_truncate (const char *string,
guint truncate_length) guint truncate_length)