GNOME Bugzilla – Bug 116637
Better way of shortening strings in menu items
Last modified: 2004-12-22 21:47:04 UTC
We need to limit the length of strings displayed in menu items in several places, including the favourited menu, the bookmarks menu and its submenus, the bookmarks bar topic items, and the tabs menu. Currently we use ephy_string_shorten from lib/ephy-string.h, but this function has several shortfalls: - it limits the number of characters, not the displayed length - it does not take into account that the characters stripped off may actually be combining characters applying to a character _not_ stripped off Those shortfalls lead to great differences in displayed length for the displayed strings when shortened to the same length (esp. when there are doulbe-width characters present), and to the display of _wrong_ characters in the 2nd case. We could instead use the ephy-ellipsizing-label (a GtkLabel derived class) [taken from eel], but it is - computationally expensive, and - there's no GtkImageMenuItem derived class available which uses it instead of a GtkLabel. So what we need is: - a GtkImageMenuItem derived class which elipsises its label, and which is - computationally non-expensive This is post-1.0 feature work, and probably depends on bug 59071.
*** Bug 123989 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 147765 ***