Skip to content

Commit

Permalink
Fixed another Java 1.3 bug where the Album combo box was not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Oct 2, 2002
1 parent 066e737 commit 4794822
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2002-10-03 Pierre-Luc Paour <gallery@paour.com> (1.0-b8)

* Fixed another Java 1.3 bug where the Album combo box was not working

2002-10-01 Pierre-Luc Paour <gallery@paour.com> (1.0-b7)

* Added image resize before upload (this requires ImageMagick and can be enabled by
Expand Down
12 changes: 9 additions & 3 deletions com/gallery/GalleryRemote/MainFrame.java
Expand Up @@ -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
Expand Down Expand Up @@ -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 );

Expand Down Expand Up @@ -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 );
}
Expand All @@ -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 );
}
}
Expand Down
4 changes: 2 additions & 2 deletions defaults.properties
Expand Up @@ -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

0 comments on commit 4794822

Please sign in to comment.