if (getCurrentGallery().hasComm() && getCurrentGallery().getComm(this).isLoggedIn()) {
if (getCurrentGallery().hasComm() && getCurrentGallery().getComm(jStatusBar).isLoggedIn()) {
	public void actionPerformed( ActionEvent e ) {		String command = e.getActionCommand();		Log.log(Log.INFO, MODULE, "Command selected " + command);		//Log.log(Log.TRACE, MODULE, "        event " + e );		if ( command.equals( "File.Quit" ) ) {			thisWindowClosing( null );		} else if ( command.equals( "File.Save" ) ) {			saveState();		} else if ( command.equals( "File.Open" ) ) {			openState();		} else if ( command.equals( "Options.Prefs" ) ) {			showPreferencesDialog();		} else if ( command.equals( "Help.About" ) ) {			showAboutBox();		} else if ( command.equals( "Fetch" ) ) {			if (getCurrentGallery().hasComm() && getCurrentGallery().getComm(this).isLoggedIn()) {				// we're currently logged in: log out				getCurrentGallery().logOut();				//if (getCurrentAlbum() != null) {				//	getCurrentAlbum().clearPictures();				//}				//setCurrentAlbum(null);				//jAlbumCombo.setModel(new Gallery(this));				//resetUIState();			} else {		    	// login may have failed and caused getComm to be null.				GalleryComm comm = getCurrentGallery().getComm(this);				// may have tried to connect and failed				if (comm != null && !GalleryComm.wasAuthFailure()) {					fetchAlbums();				}			}		} else if ( command.equals( "NewAlbum" ) ) {			newAlbum();		} else if ( command.equals( "Browse" ) ) {			browseAddPictures();		} else if ( command.equals( "Upload" ) ) {			uploadPictures();		} else if ( command.equals( "NewGallery" ) ) {			showPreferencesDialog(URLPanel.class.getName());		//} else if ( command.equals( "Url" ) ) {			//Object selectedGallery = jGalleryCombo.getSelectedItem();			//if (selectedGallery != null) {				//Log.log(Log.TRACE, MODULE, "selected: " + selectedGallery.toString()				//	+ " (" + jGalleryCombo.getSelectedIndex() + ")");				// new url chosen in the popup				// updateGalleryParams();//			} else {//				Log.log(Log.TRACE, MODULE, "Deselected gallery");//			}		//} else if ( command.equals( "Album" ) ) {			//Object selectedAlbum = jAlbumCombo.getSelectedItem();			//	Log.log(Log.TRACE, MODULE, "selected: " + selectedAlbum.toString()			//		+ " (" + jAlbumCombo.getSelectedIndex() + ")");			//updatePicturesList( /*(Album) ( (JComboBox) e.getSource() ).getSelectedItem()*/);		} else {			Log.log(Log.ERROR, MODULE, "Unhandled command " + command );		}	}