From 479482292b2f0fd02e996191faf0ed69b7fe8f02 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Paour Date: Wed, 2 Oct 2002 22:59:16 +0000 Subject: [PATCH] Fixed another Java 1.3 bug where the Album combo box was not working. --- ChangeLog | 4 ++++ com/gallery/GalleryRemote/MainFrame.java | 12 +++++++++--- defaults.properties | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ac8c5c..09747cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-10-03 Pierre-Luc Paour (1.0-b8) + + * Fixed another Java 1.3 bug where the Album combo box was not working + 2002-10-01 Pierre-Luc Paour (1.0-b7) * Added image resize before upload (this requires ImageMagick and can be enabled by diff --git a/com/gallery/GalleryRemote/MainFrame.java b/com/gallery/GalleryRemote/MainFrame.java index dad7104..20563cf 100644 --- a/com/gallery/GalleryRemote/MainFrame.java +++ b/com/gallery/GalleryRemote/MainFrame.java @@ -687,6 +687,7 @@ private void jbInit() jScrollPane1.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); newGallery.setText("Add Gallery URL"); newGallery.setActionCommand("NewGallery"); + album.setActionCommand("Album"); this.getContentPane().add( jPanel1, new GridBagConstraints( 0, 0, 1, 1, 1.0, 0.0 , GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets( 2, 2, 2, 2 ), 0, 0 ) ); jPanel1.add( jLabel1, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0 @@ -749,7 +750,10 @@ private void jbInitEvents() { jCheckBoxMenuThumbnails.addItemListener( this ); jCheckBoxMenuPreview.addItemListener( this ); jCheckBoxMenuPath.addItemListener( this ); - album.addItemListener( this ); + // in Swing 1.3, using an ItemListenet for a JComboBox doesn't work, + // using ActionListener instead + //album.addItemListener( this ); + album.addActionListener( this ); picturesList.addListSelectionListener( this ); @@ -817,6 +821,8 @@ public void actionPerformed( ActionEvent e ) { // 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 ); } @@ -839,9 +845,9 @@ public void itemStateChanged( ItemEvent e ) { } else if ( item == jCheckBoxMenuPath ) { GalleryRemote.getInstance().properties.setShowPath( ( e.getStateChange() == ItemEvent.SELECTED ) ? true : false ); picturesList.repaint(); - } else if ( item == album ) { + } /*else if ( item == album ) { updatePicturesList( (Album) ( (JComboBox) item ).getSelectedItem()); - } else { + }*/ else { Log.log(Log.ERROR, MODULE, "Unhandled item state change " + item ); } } diff --git a/defaults.properties b/defaults.properties index 3328935..5e3c693 100644 --- a/defaults.properties +++ b/defaults.properties @@ -82,6 +82,6 @@ updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.p # # --- Do not edit below this line --- # -version=1.0b7 -releaseDate=2002/10/01 +version=1.0b8 +releaseDate=2002/10/03 aboutText=Gallery Remote\n \n \nA part of the Gallery Open-Source Project\nhttp://gallery.sourceforge.net\n \n \nMaintained by Pierre-Luc Paour\n \nInitial version by Chris Smith\n \n \nContributors:\n \nDolan Halbrook\nTim Miller