After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 116637 - Better way of shortening strings in menu items
Better way of shortening strings in menu items
Status: RESOLVED DUPLICATE of bug 147765
Product: epiphany
Classification: Core
Component: Interface
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Marco Pesenti Gritti
Marco Pesenti Gritti
: 123989 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-07-03 15:25 UTC by Christian Persch
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Christian Persch 2003-07-03 15:25:34 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.
Comment 1 Christian Persch 2003-11-02 13:44:22 UTC
*** Bug 123989 has been marked as a duplicate of this bug. ***
Comment 2 Christian Persch 2004-07-25 11:56:21 UTC

*** This bug has been marked as a duplicate of 147765 ***