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 701515 - Having a long contact name makes the user unable to edit contact info
Having a long contact name makes the user unable to edit contact info
Status: RESOLVED FIXED
Product: gnome-contacts
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-06-03 12:31 UTC by Chris Cummins
Modified: 2013-06-04 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ellipsize long names in contact editing menu (1.38 KB, patch)
2013-06-03 12:38 UTC, Chris Cummins
none Details | Review

Description Chris Cummins 2013-06-03 12:31:37 UTC
If a contact has a long name (30+ characters), the 'Editing <name>' label moves the 'Done' button off-screen on the contact edit window, making it impossible to save modified contact data.

For example:

1. Open Contacts
2. Create a contact with the name 'thisisareallyreallylongnamethatwillbreakthecontacteditsettingsmenu'
4. Save the name
5. Try to edit the user
6. Observe the scrolling of the 'Editing <name>' label and that the 'Done' button (top right) is not present because of the long name.
Comment 1 Chris Cummins 2013-06-03 12:38:21 UTC
Created attachment 245918 [details] [review]
Ellipsize long names in contact editing menu

This patch demos a workaround for the problem by simple truncating names longer than the length threshold and appending an ellipsis. This seems like a bit of a hack, and a better solution would be to set PANGO_ELLIPSIZE_END with gtk_label_set_ellipsize() on the GtkLabel, however I had problems trying to then ensure that the label expanded horizontally and requested the correct amount of space, rather than just displaying the '...' characters. Any suggestions would be appreciated.
Comment 2 Erick Perez Castellanos 2013-06-03 19:12:28 UTC
(In reply to comment #1)
> Created an attachment (id=245918) [details] [review]
> Ellipsize long names in contact editing menu
> 
> This patch demos a workaround for the problem by simple truncating names longer
> than the length threshold and appending an ellipsis. This seems like a bit of a
> hack, and a better solution would be to set PANGO_ELLIPSIZE_END with
> gtk_label_set_ellipsize() on the GtkLabel, however I had problems trying to
> then ensure that the label expanded horizontally and requested the correct
> amount of space, rather than just displaying the '...' characters. Any
> suggestions would be appreciated.

The thing was the ToolItem around the label wasn't set to expand.

Fixed in here: https://git.gnome.org/browse/gnome-contacts/commit/?h=gnome-3-8&id=817f6c6f904876335f67b0b1acd802e7ec53ad1e
Comment 3 Chris Cummins 2013-06-04 10:07:25 UTC
Ah ok thanks for the catch and quick fix :-)