GNOME Bugzilla – Bug 781161
Fight polari's rampant underscoritis
Last modified: 2017-06-28 17:40:35 UTC
See patches. I went with a different approach first, but changed to this patch set after discussion with Bastian. However it's still close enough to the tested set that I consider it safe to land for 3.24.1 ...
Created attachment 349635 [details] [review] app: Trim trailing _ instead of restoring original account If a connection fails because the chosen nick is already in use, we automatically retry with an appended underscore. But while we restore the original name when the connection succeeds or we are giving up, the underscores can stick around when polari is closed while still connecting. And as the underscores are then considered part of the original name when polari is next started, they tend to pile up after a while. To counter that, assume that all trailing underscores aren't part of the genuine nick and trim them instead of trying to restore the original account name.
Created attachment 349636 [details] [review] app: Reset nick on startup Telepathy will remember the last used nickname and restore it when an account gets connected. While not necessarily wrong, this conflicts with us treating the nickname set from the popover as a temporary change in contrast to the nickname configured in the properties, so for us it makes more sense to reset the nickname at startup to make sure it matches the configured one we are using to connect.
Created attachment 349637 [details] [review] entryArea: Rename a variable
Created attachment 349638 [details] [review] entryArea: Consider nickname changes when disconnected Depending on whether the room is currently connected, we either use the self-contact's :alias property or the account's :nickname one for the nick button text. Either of those properties can change, but we currently only update the text in the former case. Start tracking changes to the :nickname property is well to make sure we properly update the button while disconnected.
Attachment 349635 [details] pushed as af97e06 - app: Trim trailing _ instead of restoring original account Attachment 349636 [details] pushed as 1183b79 - app: Reset nick on startup Attachment 349637 [details] pushed as 61eebc3 - entryArea: Rename a variable Attachment 349638 [details] pushed as 911b955 - entryArea: Consider nickname changes when disconnected
*** Bug 779094 has been marked as a duplicate of this bug. ***
*** Bug 780427 has been marked as a duplicate of this bug. ***