Embed PidginAccountEditor into PidginAccountManager

Review Request #2333 — Created March 10, 2023 and submitted

Information

pidgin/pidgin
default

Reviewers

The account manager now uses a stack to switch between a single editor instance
and the list of accounts. The save button from the editor got moved next to the
new back button, but we should probably prompt or throw up an info box when the
user starts making changes or prompt before moving back.

Also, the app.edit-account action now will lose any changes to an account that
is currently being edited, which we should disallow from happening in the future
as well.

Opened the account manager and selected accounts and moved backed and saved accounts and made sure everything there worked.
Opened the account editor from a connection error notification and verified that opened properly as well.

Summary ID
Embed PidginAccountEditor into PidginAccountManager
The account manager now uses a stack to switch between a single editor instance and the list of accounts. The save button from the editor got moved next to the new back button, but we should probably prompt or throw up an info box when the user starts making changes or prompt before moving back. Also, the app.edit-account action now will lose any changes to an account that is currently being edited, which we should disallow from happening in the future as well.
1f62cecf2450cf0f792d15d628d9a99d5c7a341b

Description From Last Updated

We need to disconnect this signal from the old account now, don't we?

QuLogicQuLogic

Extra space after if.

QuLogicQuLogic

Somewhat redundant comment; maybe it should say "Disconnect the editor fields from the account" or something like that.

QuLogicQuLogic

We probably need some additional state here for where the window came from. That is, if you go to Accounts->account->Edit …

QuLogicQuLogic

This is only ever called for an existing account now that purple_account_manager_real_edit_account is what's internally called in account manager. Should …

QuLogicQuLogic
QuLogic
  1. 
      
  2. pidgin/pidginaccounteditor.c (Diff revision 1)
     
     
     
     

    We need to disconnect this signal from the old account now, don't we?

  3. pidgin/pidginaccounteditor.c (Diff revision 1)
     
     

    Extra space after if.

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

    Somewhat redundant comment; maybe it should say "Disconnect the editor fields from the account" or something like that.

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

    We probably need some additional state here for where the window came from. That is, if you go to Accounts->account->Edit Account, you probably don't want to go back to the account manager after saving.

    1. Thats a great point!

  6. 
      
grim
QuLogic
  1. 
      
  2. pidgin/pidginaccountmanager.h (Diff revision 2)
     
     

    This is only ever called for an existing account now that purple_account_manager_real_edit_account is what's internally called in account manager.

    Should account no longer be (nullable), or do we expect anywhere else to request adding a new account?

  3. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed

Status: Closed (submitted)

Loading...