// 100 MB tile cache
JaiInitializer.initJAI();
PhotovaultSettings settings = PhotovaultSettings.getSettings();
Collection databases = settings.getDatabases();
if ( databases.size() == 0 ) {
DbSettingsDlg dlg = new DbSettingsDlg( null, true );
if ( dlg.showDialog() != dlg.APPROVE_OPTION ) {
System.exit( 0 );
}
}
LoginDlg login = new LoginDlg( this );
boolean loginOK = false;
while ( !loginOK ) {
int retval = login.showDialog();
switch( retval ) {
case LoginDlg.RETURN_REASON_CANCEL:
System.exit( 0 );
break;
case LoginDlg.RETURN_REASON_NEWDB:
DbSettingsDlg dlg = new DbSettingsDlg( null, true );
if ( dlg.showDialog() == dlg.APPROVE_OPTION ) {
login = new LoginDlg( this );
}
break;
case LoginDlg.RETURN_REASON_APPROVE:
try {