Split account display from chooser into its own widget

Review Request #2360 — Created March 19, 2023 and submitted

Information

pidgin/pidgin
default

Reviewers

This will allow re-using it elsewhere when we need to display the account.

Compiled and opened Add a Buddy dialog, Room List, etc. that used the chooser.

Summary ID
Split account display from chooser into its own widget
0182e14f9db7bdb299b7cb20237f3c8f6ed77190
Description From Last Updated

Needs new file header, the first few lines aren't right.

grimgrim

we don't typically have a newline here for whatever reason

grimgrim

I wonder if we should use name_for_display here instead of username and alias, but we're skipping display-name as well right …

grimgrim

I thought passing NULL to set_text causes a crash?

grimgrim

doc comment

grimgrim
grim
  1. 
      
  2. pidgin/pidginaccountdisplay.h (Diff revision 1)
     
     
    Show all issues

    Needs new file header, the first few lines aren't right.

  3. pidgin/pidginaccountdisplay.h (Diff revision 1)
     
     
    Show all issues

    we don't typically have a newline here for whatever reason

  4. pidgin/pidginaccountdisplay.c (Diff revision 1)
     
     
    Show all issues

    I wonder if we should use name_for_display here instead of username and alias, but we're skipping display-name as well right now and adding that would make this REALLY long..

    1. We can probably tweak what gets displayed here, which I expected to do some of once everything is using it, possibly with a "compact" property or similar.

    2. oh that's an interesting idea.

  5. pidgin/pidginaccountdisplay.c (Diff revision 1)
     
     

    if/when we implement the missing prpl we should use it's icon here.

  6. pidgin/pidginaccountdisplay.c (Diff revision 1)
     
     
    Show all issues

    I thought passing NULL to set_text causes a crash?

    1. I think that's only for GtkEditable; the previous code only had the check because of the sorter, not the labels.

      GtkLabel is NULL-safe: https://gitlab.gnome.org/GNOME/gtk/-/blob/4.0.0/gtk/gtklabel.c#L1713

  7. pidgin/pidginaccountdisplay.c (Diff revision 1)
     
     
    Show all issues

    doc comment

  8. 
      
QuLogic
grim
  1. Ship It!
  2. Great work, thanks!!

  3. 
      
grim
Review request changed
Status:
Completed