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 781161 - Fight polari's rampant underscoritis
Fight polari's rampant underscoritis
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
: 779094 780427 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-04-10 22:01 UTC by Florian Müllner
Modified: 2017-06-28 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
app: Trim trailing _ instead of restoring original account (2.32 KB, patch)
2017-04-10 22:01 UTC, Florian Müllner
committed Details | Review
app: Reset nick on startup (1.53 KB, patch)
2017-04-10 22:01 UTC, Florian Müllner
committed Details | Review
entryArea: Rename a variable (1.59 KB, patch)
2017-04-10 22:01 UTC, Florian Müllner
committed Details | Review
entryArea: Consider nickname changes when disconnected (1.87 KB, patch)
2017-04-10 22:01 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-04-10 22:01:10 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 ...
Comment 1 Florian Müllner 2017-04-10 22:01:14 UTC
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.
Comment 2 Florian Müllner 2017-04-10 22:01:18 UTC
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.
Comment 3 Florian Müllner 2017-04-10 22:01:25 UTC
Created attachment 349637 [details] [review]
entryArea: Rename a variable
Comment 4 Florian Müllner 2017-04-10 22:01:30 UTC
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.
Comment 5 Florian Müllner 2017-04-10 22:42:18 UTC
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
Comment 6 Florian Müllner 2017-04-24 22:48:43 UTC
*** Bug 779094 has been marked as a duplicate of this bug. ***
Comment 7 Florian Müllner 2017-06-28 17:40:35 UTC
*** Bug 780427 has been marked as a duplicate of this bug. ***