fetchAlbums();
if (currentGallery.getComm().isLoggedIn()) { currentGallery.getComm().logOut(); mAlbum.clearPictures(); mAlbum = null;  resetUIState(); } else { fetchAlbums(); }
	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( "Help.About" ) ) {			showAboutBox();		} else if ( command.equals( "Fetch" ) ) {			fetchAlbums();		} else if ( command.equals( "NewAlbum" ) ) {			newAlbum();		} else if ( command.equals( "Browse" ) ) {			browseAddPictures();		} else if ( command.equals( "Upload" ) ) {			uploadPictures();		} else if ( command.equals( "NewGallery" ) ) {			Gallery g = new Gallery(null, null, null, this);			galleries.addElement( g );			gallery.setSelectedItem( g );			updateGalleryParams();		} else if ( command.equals( "Url" ) ||			command.equals( "comboBoxEdited" ) ) {			//Log.log(Log.TRACE, MODULE, "modifiers: " + e.getModifiers());			//Log.log(Log.TRACE, MODULE, "paramString: " + e.paramString());			Log.log(Log.TRACE, MODULE, "selected: " + gallery.getSelectedItem().toString() 				+ " (" + gallery.getSelectedIndex() + ")");						if (gallery.getSelectedItem() instanceof String) {				// text of a url edited				try {					currentGallery.setUrlString((String) gallery.getSelectedItem());				} catch ( MalformedURLException mue ) {										JOptionPane.showMessageDialog(this, "Malformed URL", "Error", JOptionPane.ERROR_MESSAGE);				}			} else {				// new url chosen in the popup				updateGalleryParams();			}		} else if ( command.equals( "Album" ) ) {			updatePicturesList( (Album) ( (JComboBox) e.getSource() ).getSelectedItem());		} else {			Log.log(Log.ERROR, MODULE, "Unhandled command " + command );		}	}