Use Purple.Account.username in cases where Purple.ContactInfo.name_for_display is NULL

Review Request #3431 — Created Aug. 22, 2024 and submitted

Information

pidgin/pidgin
default

Reviewers

This solves the following situations where an account name was displayed as "(null)": * in the confirmation dialog, when removing an account from the account manager * in the account combo box in the join channel dialog

Removed an account from the account manager and verified that the account name was not "(null)" in the confirmation dialog.
Opened the Join Channel dialog with a connected IRC account and verfied that the account name was not "(null)".

Summary ID
Use Purple.Account.username in cases where Purple.ContactInfo.name_for_display is NULL
c4b4d197ba45a9deeca78024a0b9d63984fa4beb
grim
  1. This should probably just be calling Purple.Account.get_username instead of using the name for display. Purple.Account:contact-info is intended (maybe not documented) to be controlled by the protocol and since the protocol can change in the account editor it shouldn't be used. Also in the near-ish futures accounts are going to have names that are purple specific and not tied to the protocol in any tanigble way. This is the only way we can reasonably remove the username from stuff like the demo protocol plugin and other protocols that require oauth where the username is discovered and the field just becomes useless but confusing to the users are it doesn't do anything.

    1. My bad, I didn't check the property description.

    2. Heh no worries. It's not like I have this stuff anywhere else aside from inside my head... :D

  2. 
      
ivanhoe
grim
  1. Great work, thanks!!!

  2. 
      
grim
Review request changed
Status:
Completed