Re-design account manager as a GtkListBox

Review Request #2079 — Created Jan. 17, 2023 and submitted

QuLogic
pidgin/pidgin
default
pidgin

Moves to a nicely spaced GtkListBox. The avatar is implemented using AdwAvatar solely for the autogenerated colour for accounts without an icon to give them some uniqueness, but it could be moved to PidginAvatar.

As a followup, I'd probably move the Account Editors from a separate dialog to stack within the manager, similar to how the Plugin dialog works. Neither the previous manager nor this one prevents you from opening two editors for an account, but this would remove that issue as well.

Toggled enabled/disabled to check that account status worked and was displayed. Added a few bogus accounts to confirm that errors are shown. Activated a row to show the editor. Hit the delete button and cancelled/approved and confirmed that account was kept/removed.

Summary
Re-design account manager as a GtkListBox

Description From Last Updated

I'm curious if this is necessary if we connect the items-changed signal before binding the model.

grimgrim

I thought we had to use the gi-docgen linking instead of these now.

grimgrim

need to unref old on else, so i'd just remove the one from line 430 and use g_clear_object on old.

grimgrim
grim
  1. 
      
  2. pidgin/pidginaccountmanager.c (Diff revision 1)
     
     

    I'm curious if this is necessary if we connect the items-changed signal before binding the model.

    1. No, this is a signal on the PurpleAccountManager not the GtkListBox.

    2. Got it!

  3. pidgin/pidginaccountrow.h (Diff revision 1)
     
     

    I thought we had to use the gi-docgen linking instead of these now.

    1. That's just for code style that I copied from somewhere or other. I'm not sure we need to link these, as the type is added by gi-docgen?

    2. What do you mean the type is added by gi-docgen?

  4. pidgin/pidginaccountrow.c (Diff revision 1)
     
     

    Doesn't PurpleAccountManager do this? Looks like now, but that's where this code should be. I created PIDGIN-17716 for tracking that.

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

    need to unref old on else, so i'd just remove the one from line 430 and use g_clear_object on old.

  6. 
      
QuLogic
QuLogic
grim
  1. Ship It!
  2. Awesome work, thank you so much!!

  3. 
      
grim
Review request changed

Status: Closed (submitted)

Loading...