From 8c3a645f4423b6888ef93a7f9cee86a9aaad4160 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Paour Date: Thu, 12 Feb 2004 23:33:16 +0000 Subject: [PATCH] 2004-02-12 Pierre-Luc Paour (1.3.1-b3) * Slideshow button is disabled when ther are no pictures to show. * This is also the case in the slideshow applet, and an alert is displayed. --- ChangeLog | 8 +++++++- com/gallery/GalleryRemote/AlbumInspector.java | 2 ++ com/gallery/GalleryRemote/GRAppletSlideshow.java | 6 ++++-- .../GalleryRemote/resources/GRResources.properties | 1 + defaults.properties | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73febb2..fed37db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ +2004-02-12 Pierre-Luc Paour (1.3.1-b3) + + * Slideshow button is disabled when ther are no pictures to show. + * This is also the case in the slideshow applet, and an alert is + displayed. + 2004-02-12 Pierre-Luc Paour (1.3.1-b2) * Fixed slideshow on the Mac (the top of the image was obscured by the menu bar). I can't figure out why the Mac VM will not go into full-screen mode... * Fixed a potential VM killer bug with going into slideshow - mode. + mode. This was a Safari-crashing bug on Mac. 2004-02-12 Pierre-Luc Paour (1.3.1-b1) diff --git a/com/gallery/GalleryRemote/AlbumInspector.java b/com/gallery/GalleryRemote/AlbumInspector.java index 2d1e97c..3906159 100644 --- a/com/gallery/GalleryRemote/AlbumInspector.java +++ b/com/gallery/GalleryRemote/AlbumInspector.java @@ -357,6 +357,8 @@ public void setAlbum(Album album) { jFetch.setEnabled(album.getGallery().getComm(mf.jStatusBar).hasCapability(mf.jStatusBar, GalleryCommCapabilities.CAPA_FETCH_ALBUM_IMAGES)); jMove.setEnabled(album.getGallery().getComm(mf.jStatusBar).hasCapability(mf.jStatusBar, GalleryCommCapabilities.CAPA_MOVE_ALBUM)); + + jSlideshow.setEnabled(album.getSize() > 0); } // todo: protocol support diff --git a/com/gallery/GalleryRemote/GRAppletSlideshow.java b/com/gallery/GalleryRemote/GRAppletSlideshow.java index 6232bd6..520932d 100644 --- a/com/gallery/GalleryRemote/GRAppletSlideshow.java +++ b/com/gallery/GalleryRemote/GRAppletSlideshow.java @@ -90,7 +90,7 @@ protected void jbInit() { } public void setInProgress(boolean inProgress) { - jStart.setEnabled(!inProgress); + jStart.setEnabled(!inProgress && album.getSize() > 0); this.inProgress = inProgress; } @@ -124,8 +124,10 @@ public void contentsChanged(ListDataEvent e) { new Thread() { public void run() { slideshowFrame = new SlideshowFrame(); - if (album.getPicturesList().size() > 0) { + if (album.getSize() > 0) { ImageUtils.download((Picture) album.getPicturesList().get(0), getGraphicsConfiguration().getBounds().getSize(), GalleryRemote._().getCore().getMainStatusUpdate(), null); + } else { + JOptionPane.showMessageDialog(GRAppletSlideshow.this, GRI18n.getString(MODULE, "emptyAlbum")); } } }.start(); diff --git a/com/gallery/GalleryRemote/resources/GRResources.properties b/com/gallery/GalleryRemote/resources/GRResources.properties index d4716c6..a6d0be8 100644 --- a/com/gallery/GalleryRemote/resources/GRResources.properties +++ b/com/gallery/GalleryRemote/resources/GRResources.properties @@ -489,3 +489,4 @@ AppletMini.pictures = List of pictures to upload (drag and drop or click Add Pic AppletSlideshow.Start = Start slideshow AppletSlideshow.Disabled = If some of the options above are greyed-out, the \ administrator of this gallery has forced the corresponding settings. +AppletSlideshow.emptyAlbum = There are no pictures to show in this album. Use the navigation menu at the top to go back to the album view. \ No newline at end of file diff --git a/defaults.properties b/defaults.properties index 1aebbfe..9964bfe 100644 --- a/defaults.properties +++ b/defaults.properties @@ -178,6 +178,6 @@ updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.p # # --- Do not edit below this line --- # -version=1.3.1-b2 +version=1.3.1-b3 releaseDate=2004/02/12 aboutText=Gallery Remote\n \n \nA part of the Gallery Open-Source Project\nhttp://gallery.sourceforge.net\n \n \nMaintained by:\n \nPierre-Luc Paour\n \n \nInitial version by Chris Smith\n \n \nContributors:\n \nTim Miller\nDolan Halbrook\nMarkus Cozowicz\nScott Gartner\nAmedeo Paglione\nChris Schwerdt\n \n \nArtwork by Ross A. Reyman\n \n \nBundled software:\n \nImageMagick\nJSX\nJava look and feel Graphics Repository icons\njpegtran, Guido Vollbeding's version\nMetadataExtractor