2
0

Fix default type for new sites & site UI updating.

This commit is contained in:
Maarten Billemont
2018-07-29 15:10:45 -04:00
parent 928b617ed0
commit fe63a2756a
11 changed files with 62 additions and 33 deletions

View File

@@ -10,6 +10,6 @@ import com.lyndir.masterpassword.model.impl.*;
public class MPNewSite extends MPBasicSite<MPUser<?>, MPQuestion> {
public MPNewSite(final MPUser<?> user, final String siteName) {
super( user, siteName, user.getAlgorithm() );
super( user, siteName );
}
}

View File

@@ -472,16 +472,11 @@ public class UserContentPanel extends JPanel implements MasterPassword.Listener,
sitesModel.registerList( sitesList );
add( Box.createGlue() );
addComponentListener( new ComponentAdapter() {
@Override
public void componentShown(final ComponentEvent e) {
user.addListener( AuthenticatedUserPanel.this );
}
@Override
public void componentHidden(final ComponentEvent e) {
user.removeListener( AuthenticatedUserPanel.this );
}
addHierarchyListener( e -> {
if (null != SwingUtilities.windowForComponent( this ))
user.addListener( this );
else
user.removeListener( this );
} );
}