Skip to content

Commit

Permalink
2004-02-12 Pierre-Luc Paour <gallery@paour.com> (1.3.1-b2)
Browse files Browse the repository at this point in the history
	* 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.
  • Loading branch information
Pierre-Luc Paour committed Feb 12, 2004
1 parent 45aa2b3 commit 9add451
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 16 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2004-02-12 Pierre-Luc Paour <gallery@paour.com> (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.

2004-02-12 Pierre-Luc Paour <gallery@paour.com> (1.3.1-b1)

* Fixed text color in list and tree when selected.
Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/GRAppletSlideshow.java
Expand Up @@ -102,7 +102,7 @@ public void actionPerformed(ActionEvent e) {
slideshowFrame = new SlideshowFrame();
}

slideshowFrame.setVisible(true);
slideshowFrame.showSlideshow();
slideshowFrame.start(getCurrentAlbum().getPicturesList());

// null slideshowFrame so that next time the user clicks the button
Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/GalleryRemote.java
Expand Up @@ -175,7 +175,7 @@ public static void setStaticProperties() {
System.setProperty("apple.awt.brushMetalLook", "true");

// todo: this should not remain this way
System.setProperty("apple.awt.fakefullscreen", "true");
//System.setProperty("apple.awt.fakefullscreen", "true");
}

public void createProperties() {
Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/MainFrame.java
Expand Up @@ -772,7 +772,7 @@ public void run() {

public void slideshow() {
SlideshowFrame sf = new SlideshowFrame();
sf.setVisible(true);
sf.showSlideshow();
sf.start(getCurrentAlbum().getPicturesList());
}

Expand Down
32 changes: 20 additions & 12 deletions com/gallery/GalleryRemote/SlideshowFrame.java
Expand Up @@ -44,25 +44,33 @@ public SlideshowFrame() {
ignoreIMFailure = true;
}

public void show() {
public void showSlideshow() {
try {
// Java 1.4 only
/*GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if (GalleryRemote.IS_MAC_OS_X) {
// on the Mac, using a maximized window doesn't take care of the menu bar

if (! gd.isFullScreenSupported()) {
throw new NoSuchMethodError();
}
// Java 1.4 only
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();

Log.log(Log.LEVEL_TRACE, MODULE, "Switching to full-screen mode");
gd.setFullScreenWindow(this);*/
if (! gd.isFullScreenSupported()) {
throw new NoSuchMethodError();
}

DialogUtil.maxSize(this);
//setBounds(600, 100, 500, 500);
super.show();
Log.log(Log.LEVEL_TRACE, MODULE, "Switching to full-screen mode");
DialogUtil.maxSize(this);
setVisible(true);

// unfortunately, this doesn't work on Mac 1.4.2...
// gd.setFullScreenWindow(this);
} else {
DialogUtil.maxSize(this);
//setBounds(600, 100, 500, 500);
setVisible(true);
}
} catch (Throwable e) {
Log.log(Log.LEVEL_TRACE, MODULE, "No full-screen mode: using maximized window");
DialogUtil.maxSize(this);
super.show();
setVisible(true);
}

// todo: this is a hack to prevent painting problems (the status bar paints
Expand Down
8 changes: 8 additions & 0 deletions com/gallery/GalleryRemote/util/DialogUtil.java
@@ -1,5 +1,7 @@
package com.gallery.GalleryRemote.util;

import com.gallery.GalleryRemote.GalleryRemote;

import java.awt.*;

/**
Expand Down Expand Up @@ -40,6 +42,12 @@ public static void center(Window window) {

public static void maxSize(Window window) {
Rectangle sr = window.getGraphicsConfiguration().getBounds();
if (GalleryRemote.IS_MAC_OS_X) {
// leave room for the menu bar
sr.y += 22;
sr.height -= 22;
}

window.setBounds(sr);
}

Expand Down
2 changes: 1 addition & 1 deletion defaults.properties
Expand Up @@ -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-b1
version=1.3.1-b2
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

0 comments on commit 9add451

Please sign in to comment.