&& currentGallery.getComm(MainFrame.this).hasCapability(GalleryCommCapabilities.CAPA_NEW_ALBUM));
&& currentGallery.getComm(jStatusBar).hasCapability(GalleryCommCapabilities.CAPA_NEW_ALBUM));
			public void run() {				// if the list is empty or comm, disable upload				jUploadButton.setEnabled( getCurrentAlbum() != null				&& getCurrentAlbum().sizePictures() > 0				&& !inProgress				&& jAlbumCombo.getSelectedIndex() >= 0 );				Gallery currentGallery = getCurrentGallery();				// during comm, don't change Gallery or do any other comm				jLoginButton.setEnabled( !inProgress && currentGallery != null);				jGalleryCombo.setEnabled( !inProgress );				jNewGalleryButton.setEnabled( !inProgress );				if (currentGallery != null					&& currentGallery.getUsername() != null					&& currentGallery.hasComm()					&& currentGallery.getComm(MainFrame.this).isLoggedIn()) {					jLoginButton.setText(grRes.getString("Log_out"));				} else {					jLoginButton.setText("Log in");				}				// if the selected album is uploading, disable everything				boolean enabled = ! inProgress && getCurrentAlbum() != null && jAlbumCombo.getModel().getSize() >= 1;				jBrowseButton.setEnabled( enabled );				jPictureInspector.setEnabled( enabled );				jPicturesList.setEnabled( enabled );				jAlbumCombo.setEnabled( enabled );				jNewAlbumButton.setEnabled( !inProgress && currentGallery != null && currentGallery.hasComm()					&& currentGallery.getComm(MainFrame.this).hasCapability(GalleryCommCapabilities.CAPA_NEW_ALBUM));				// change image displayed				int sel = jPicturesList.getSelectedIndex();				/*if (mAlbum != null && mAlbum.getSize() < 1) {					// if album was just emptied, it takes a while for the pictureList					// to notice...					// this is fixed by using invokeLater					sel = -1;				}*/				if ( GalleryRemote.getInstance().properties.getShowPreview() && previewFrame != null ) {					if ( sel != -1 ) {						previewFrame.displayFile( getCurrentAlbum().getPicture( sel ) );					} else {						previewFrame.displayFile( null );					}					if ( !previewFrame.isVisible() ) {						previewFrame.setVisible( true );					}				}				// status				if ( getCurrentAlbum() == null) {					jPictureInspector.setPictures( null );					setStatus( "Select a Gallery URL and click Log in..." );				} else if ( getCurrentAlbum().sizePictures() > 0 ) {					jPictureInspector.setPictures( jPicturesList.getSelectedValues() );					int selN = jPicturesList.getSelectedIndices().length;					if ( sel == -1 ) {						setStatus( getCurrentAlbum().sizePictures() + " pictures / "						+ NumberFormat.getInstance().format(						( (int) getCurrentAlbum().getPictureFileSize() / 1024 ) )						+ " K" );					} else {						setStatus( "Selected " + selN + ((selN == 1)?" picture / ":" pictures / ")						+ NumberFormat.getInstance().format(						( (int) Album.getObjectFileSize( jPicturesList.getSelectedValues() ) / 1024 ) )						+ " K" );					}				} else {					jPictureInspector.setPictures( null );					setStatus( "No selection" );				}		}});