Skip to content

Commit

Permalink
2004-04-28 Pierre-Luc Paour <gallery@paour.com> (1.4-b6)
Browse files Browse the repository at this point in the history
	* Added GeekLog support.
	* Fixed updating the album tree after creating an album.
	* Slideshow: better feedback when manually moving to another picture.
	* Slideshow: fixed picture-switching delay being incorrect after manually
	  moving to another picture.
	* New preference to override background color for slideshow and preview.
	* Slideshow: new method for painting information on top of image, text no longer
	  moves.
	* Slideshow: new controller display, similar to iPhoto, with help.
  • Loading branch information
Pierre-Luc Paour committed Apr 30, 2004
1 parent 1cdd4aa commit d4a7a17
Show file tree
Hide file tree
Showing 20 changed files with 853 additions and 190 deletions.
14 changes: 13 additions & 1 deletion ChangeLog
@@ -1,3 +1,15 @@
2004-04-28 Pierre-Luc Paour <gallery@paour.com> (1.4-b6)

* Added GeekLog support.
* Fixed updating the album tree after creating an album.
* Slideshow: better feedback when manually moving to another picture.
* Slideshow: fixed picture-switching delay being incorrect after manually
moving to another picture.
* New preference to override background color for slideshow and preview.
* Slideshow: new method for painting information on top of image, text no longer
moves.
* Slideshow: new controller display, similar to iPhoto, with help.

2004-04-21 Pierre-Luc Paour <gallery@paour.com> (1.4-b5)

* Added support for Gallery aliases, to use as a handle instead of the
Expand Down Expand Up @@ -71,7 +83,7 @@
* Fixed a bug in the applet uploader, where added pictures were
not shown.
* From this version on, the applets are signed with a certificate
authneticated by Thawte.
authenticated by Thawte.

This is considered a final candidate for GR 1.3.2.

Expand Down
3 changes: 3 additions & 0 deletions build.xml
Expand Up @@ -120,6 +120,9 @@
<fileset dir="." includes="ReadMe.html"/>
<zipfileset dir="./lib" includes="metadata-extractor-2.1.jar" prefix="lib"/>
<zipfileset dir="./img" includes="*" prefix="img"/>
<!-- until GR 1.4 is released -->
<zipfileset dir="./imagemagick/win32" includes="im.properties" prefix="imagemagick"/>
<zipfileset dir="./jpegtran/win32" includes="jpegtran.properties" prefix="jpegtran"/>
</zip>
</target>

Expand Down
4 changes: 2 additions & 2 deletions com/gallery/GalleryRemote/AuthorizePopup.java
Expand Up @@ -139,7 +139,7 @@ private static class BasicAuthBox extends JDialog implements ActionListener {
constr.weightx = 1.0;

JButton b;
p.add(b = new JButton(GRI18n.getString(MODULE, "ok")));
p.add(b = new JButton(GRI18n.getString("Common", "OK")));
b.addActionListener(this);
b.setActionCommand("ok");
getRootPane().setDefaultButton(b);
Expand All @@ -152,7 +152,7 @@ private static class BasicAuthBox extends JDialog implements ActionListener {
constr.weightx = 2.0;
gb.setConstraints(b, constr);

p.add(b = new JButton(GRI18n.getString(MODULE, "cancel")));
p.add(b = new JButton(GRI18n.getString("Common", "Cancel")));
b.addActionListener(this);
b.setActionCommand("cancel");
constr.weightx = 1.0;
Expand Down
11 changes: 10 additions & 1 deletion com/gallery/GalleryRemote/MainFrame.java
Expand Up @@ -69,7 +69,7 @@ public class MainFrame extends JFrame
public static final String MODULE = "MainFrame";
public static final String FILE_TYPE = ".grg";

PreviewFrame previewFrame = null;
public PreviewFrame previewFrame = null;

private static final String DIALOGTITLE = "Gallery Remote -- ";

Expand Down Expand Up @@ -753,6 +753,9 @@ public void newAlbum() {
newAlbum.setName(newAlbumName);
}

// todo: this is too drastic...
getCurrentGallery().reload();

Log.log(Log.LEVEL_TRACE, MODULE, "Album '" + newAlbum + "' created.");
// there is probably a better way... this is needed to give the UI time to catch up
// and load the combo up with the reloaded album list
Expand Down Expand Up @@ -1844,6 +1847,12 @@ public void movePicturesDown() {
public void flushMemory() {
thumbnailCache.flushMemory();
previewFrame.flushMemory();

for (int i = 0; i < galleries.getSize(); i++) {
Gallery g = (Gallery) galleries.getElementAt(i);

preloadThumbnails(g.getAllPictures().iterator());
}
}

public void preloadThumbnails(Iterator pictures) {
Expand Down
4 changes: 2 additions & 2 deletions com/gallery/GalleryRemote/MoveAlbumDialog.java
Expand Up @@ -101,9 +101,9 @@ private void jbInit() {
jAlbum = new JComboBox(albums);
jAlbum.setFont(UIManager.getFont("Label.font"));

jCancel.setText(GRI18n.getString(MODULE, "cancel"));
jCancel.setText(GRI18n.getString("Common", "cancel"));
jCancel.setActionCommand("Cancel");
jOk.setText(GRI18n.getString(MODULE, "OK"));
jOk.setText(GRI18n.getString("Common", "OK"));
jOk.setActionCommand("OK");
jAlbumName.setText(GRI18n.getString(MODULE, "moveAlbm", new String[] {album.getName()}));

Expand Down
4 changes: 2 additions & 2 deletions com/gallery/GalleryRemote/NewAlbumDialog.java
Expand Up @@ -106,7 +106,7 @@ private void jbInit() {
jAlbum.setSelectedItem(defaultAlbum);
}

jCancel.setText(GRI18n.getString(MODULE, "cancel"));
jCancel.setText(GRI18n.getString("Common", "cancel"));
jCancel.setActionCommand("Cancel");
jDescription.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.white, Color.lightGray, Color.darkGray, Color.gray));
jDescription.setLineWrap(true);
Expand All @@ -115,7 +115,7 @@ private void jbInit() {
jGalleryName.setText(GRI18n.getString(MODULE, "createAlbm", new String[] { gallery.toString() }));
jName.setFont(UIManager.getFont("Label.font"));
jName.setToolTipText(GRI18n.getString(MODULE, "albmNameTip"));
jOk.setText(GRI18n.getString(MODULE, "OK"));
jOk.setText(GRI18n.getString("Common", "OK"));
jOk.setActionCommand("OK");
jTitle.setFont(UIManager.getFont("Label.font"));

Expand Down
31 changes: 23 additions & 8 deletions com/gallery/GalleryRemote/PreviewFrame.java
Expand Up @@ -24,6 +24,7 @@
import com.gallery.GalleryRemote.model.Picture;
import com.gallery.GalleryRemote.util.GRI18n;
import com.gallery.GalleryRemote.util.ImageUtils;
import com.gallery.GalleryRemote.prefs.PreferenceNames;

import javax.swing.*;
import java.awt.*;
Expand All @@ -36,7 +37,7 @@

import HTTPClient.TransferListener;

public class PreviewFrame extends javax.swing.JFrame {
public class PreviewFrame extends JFrame implements PreferenceNames {
public static final String MODULE = "PreviewFrame";

SmartHashtable imageIcons = new SmartHashtable();
Expand All @@ -50,7 +51,6 @@ public class PreviewFrame extends javax.swing.JFrame {

public void initComponents() {
setTitle(GRI18n.getString(MODULE, "title"));

setIconImage(GalleryRemote._().getMainFrame().getIconImage());

setBounds(GalleryRemote._().properties.getPreviewBounds());
Expand Down Expand Up @@ -83,7 +83,7 @@ public void displayPicture(Picture picture, boolean async) {
loadPicture = null;
//currentPicture = null;

imageLoaded(null, null);
pictureReady(null, null);
} else {
//String filename = picture.getSource().getPath();

Expand All @@ -96,7 +96,7 @@ public void displayPicture(Picture picture, boolean async) {
Log.log(Log.LEVEL_TRACE, MODULE, "Cache hit: " + picture);
//currentImage = r;
//currentPicture = picture;
imageLoaded(r, picture);
pictureReady(r, picture);
} else {
Log.log(Log.LEVEL_TRACE, MODULE, "Cache miss: " + picture);
if (async) {
Expand All @@ -106,7 +106,7 @@ public void displayPicture(Picture picture, boolean async) {
//currentPicture = picture;
ImageIcon sizedIcon = getSizedIconForce(picture);
if (sizedIcon != null) {
imageLoaded(sizedIcon, picture);
pictureReady(sizedIcon, picture);
}
}
}
Expand All @@ -120,8 +120,12 @@ public ImageIcon getSizedIconForce(Picture picture) {
if (r == null) {
synchronized(picture) {
if (picture.isOnline()) {
pictureStartDownload(picture);

File f = ImageUtils.download(picture, getRootPane().getSize(), GalleryRemote._().getCore().getMainStatusUpdate(), listener);

pictureStartProcessing(picture);

if (f != null) {
r = ImageUtils.load(
f.getPath(),
Expand All @@ -131,6 +135,8 @@ public ImageIcon getSizedIconForce(Picture picture) {
return null;
}
} else {
pictureStartProcessing(picture);

r = ImageUtils.load(
picture.getSource().getPath(),
getRootPane().getSize(),
Expand All @@ -150,7 +156,12 @@ public void paintComponent(Graphics g) {
//Log.log(Log.LEVEL_TRACE, MODULE, "Painting ImageContentPane...");
//Log.logStack(Log.LEVEL_TRACE, MODULE);

g.setColor(getBackground());
Color c = GalleryRemote._().properties.getColorProperty(SLIDESHOW_COLOR);
if (c != null) {
g.setColor(c);
} else {
g.setColor(getBackground());
}
g.fillRect(0, 0, getSize().width, getSize().height);
//g.clearRect(0, 0, getSize().width, getSize().height);

Expand Down Expand Up @@ -189,7 +200,7 @@ public void run() {
stillRunning = false;

if (notify) {
imageLoaded(tmpImage, tmpPicture);
pictureReady(tmpImage, tmpPicture);
notify = false;
}

Expand Down Expand Up @@ -304,9 +315,13 @@ public void shrink() {
}
}

public void imageLoaded(ImageIcon image, Picture picture) {
public void pictureReady(ImageIcon image, Picture picture) {
currentImage = image;
currentPicture = picture;
repaint();
}

public void pictureStartDownload(Picture picture) {}

public void pictureStartProcessing(Picture picture) {}
}

0 comments on commit d4a7a17

Please sign in to comment.