Skip to content

Commit

Permalink
2003-11-18 Pierre-Luc Paour <gallery@paour.com> (1.3-b5)
Browse files Browse the repository at this point in the history
	* Changed GRI18n to make it a static class and simplified all the classes using
	  GRI18n.
	* Finalized Album tree and Album inspector (although changing album settings
	  is not implemented because protocol support is not yet ready).
	* Implemented drag and drop of pictures to the album tree.
	* Implemented preview of pictures already on server. This will also be used for
	  the slideshow mode.
  • Loading branch information
Pierre-Luc Paour committed Nov 19, 2003
1 parent 85a4a01 commit f9b20b2
Show file tree
Hide file tree
Showing 32 changed files with 608 additions and 399 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -1,3 +1,13 @@
2003-11-18 Pierre-Luc Paour <gallery@paour.com> (1.3-b5)

* Changed GRI18n to make it a static class and simplified all the classes using
GRI18n.
* Finalized Album tree and Album inspector (although changing album settings
is not implemented because protocol support is not yet ready).
* Implemented drag and drop of pictures to the album tree.
* Implemented preview of pictures already on server. This will also be used for
the slideshow mode.

2003-11-14 Pierre-Luc Paour <gallery@paour.com> (1.3-b4)

* Changed default URL for PHPNuke (removed the /nuke path, thanks ozgreg).
Expand Down
6 changes: 3 additions & 3 deletions com/gallery/GalleryRemote/AboutBox.java
Expand Up @@ -51,7 +51,7 @@ public class AboutBox extends JDialog {
public static int TOP = 5;
public static int BOTTOM = 105;

public static GRI18n grRes = GRI18n.getInstance();


/**
* Constructor for the AboutBox object
Expand All @@ -76,7 +76,7 @@ public AboutBox( Frame owner ) {
private void init() {
setModal( true );
getContentPane().add( new AboutPanel(), BorderLayout.CENTER );
setTitle( grRes.getString(MODULE, "title") );
setTitle( GRI18n.getString(MODULE, "title") );

pack();

Expand Down Expand Up @@ -224,7 +224,7 @@ class AnimationThread extends Thread {


AnimationThread() {
super( grRes.getString(MODULE, "aboutAnim") );
super( GRI18n.getString(MODULE, "aboutAnim") );
setPriority( Thread.MIN_PRIORITY );
}

Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/AddFileDialog.java
Expand Up @@ -45,7 +45,7 @@ static File[] addFiles(Component parent)
fc.setCurrentDirectory(currentDirectory);
}

int retval = fc.showDialog(parent, GRI18n.getInstance().getString("AddFileDialog", "Add"));
int retval = fc.showDialog(parent, GRI18n.getString("AddFileDialog", "Add"));
if (retval != JFileChooser.CANCEL_OPTION)
{
GalleryRemote.getInstance().properties.setCurrentDirectory(fc.getCurrentDirectory());
Expand Down
39 changes: 19 additions & 20 deletions com/gallery/GalleryRemote/AlbumInspector.java
Expand Up @@ -49,7 +49,6 @@
public class AlbumInspector extends JPanel
implements ActionListener, ItemListener, DocumentListener {
public static final String MODULE = "AlbmInspec";
public static GRI18n grRes = GRI18n.getInstance();

JLabel jLabelName = new JLabel();
JLabel jLabelTitle = new JLabel();
Expand Down Expand Up @@ -93,10 +92,10 @@ public AlbumInspector() {

private void jbInit() {
setLayout( new GridBagLayout() );
jLabelName.setText(grRes.getString(MODULE, "Name") );
jLabelTitle.setText(grRes.getString(MODULE, "Title") );
jLabelPictures.setText(grRes.getString(MODULE, "Pictures") );
jLabelSummary.setText(grRes.getString(MODULE, "Summary") );
jLabelName.setText(GRI18n.getString(MODULE, "Name") );
jLabelTitle.setText(GRI18n.getString(MODULE, "Title") );
jLabelPictures.setText(GRI18n.getString(MODULE, "Pictures") );
jLabelSummary.setText(GRI18n.getString(MODULE, "Summary") );

jName.setFont(new Font("SansSerif", 0, 11));
jName.setLineWrap(true);
Expand All @@ -114,27 +113,27 @@ private void jbInit() {
jPanel1.setLayout(new GridBagLayout());
jPanelProps.setLayout(new GridBagLayout());

jFetch.setText(grRes.getString(MODULE, "Fetch"));
jNew.setText(grRes.getString(MODULE, "New"));
jApply.setText(grRes.getString(MODULE, "Apply"));
jFetch.setText(GRI18n.getString(MODULE, "Fetch"));
jNew.setText(GRI18n.getString(MODULE, "New"));
jApply.setText(GRI18n.getString(MODULE, "Apply"));

jResizeToWidth.setMinimumSize(new Dimension(25, 21));
jResizeToWidth.setPreferredSize(new Dimension(25, 21));
jResizeToWidth.setToolTipText(grRes.getString(MODULE, "res2W"));
jResizeToWidth.setToolTipText(GRI18n.getString(MODULE, "res2W"));
jLabel7.setText("x");
jResizeToHeight.setMinimumSize(new Dimension(25, 21));
jResizeToHeight.setPreferredSize(new Dimension(25, 21));
jResizeToHeight.setToolTipText(grRes.getString(MODULE, "res2H"));
jResizeBeforeUpload.setToolTipText(grRes.getString(MODULE, "resBfrUpldTip"));
jResizeBeforeUpload.setText(grRes.getString(MODULE, "resBfrUpld"));
jResizeToDefault.setToolTipText(grRes.getString(MODULE, "res2Def"));
jResizeToDefault.setText(grRes.getString(MODULE, "res2Def"));
jResizeToForce.setToolTipText(grRes.getString(MODULE, "res2FrcTip"));
jResizeToForce.setText(grRes.getString(MODULE, "res2Frc"));

jBeginning.setText(grRes.getString(MODULE, "Beginning"));
jPanel1.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),grRes.getString(MODULE, "Override")));
jPanelProps.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),grRes.getString(MODULE, "Props")));
jResizeToHeight.setToolTipText(GRI18n.getString(MODULE, "res2H"));
jResizeBeforeUpload.setToolTipText(GRI18n.getString(MODULE, "resBfrUpldTip"));
jResizeBeforeUpload.setText(GRI18n.getString(MODULE, "resBfrUpld"));
jResizeToDefault.setToolTipText(GRI18n.getString(MODULE, "res2Def"));
jResizeToDefault.setText(GRI18n.getString(MODULE, "res2Def"));
jResizeToForce.setToolTipText(GRI18n.getString(MODULE, "res2FrcTip"));
jResizeToForce.setText(GRI18n.getString(MODULE, "res2Frc"));

jBeginning.setText(GRI18n.getString(MODULE, "Beginning"));
jPanel1.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),GRI18n.getString(MODULE, "Override")));
jPanelProps.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),GRI18n.getString(MODULE, "Props")));

jPanelProps.add( jLabelName, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(2, 0, 0, 5), 2, 0) );
Expand Down
24 changes: 12 additions & 12 deletions com/gallery/GalleryRemote/AuthorizePopup.java
Expand Up @@ -36,7 +36,7 @@ public class AuthorizePopup implements HTTPClient.AuthorizationPrompter
private static BasicAuthBox inp = null;
public static final String MODULE = "AuthorizePopup";

public static GRI18n grRes = GRI18n.getInstance();



/**
Expand All @@ -62,15 +62,15 @@ public NVPair getUsernamePassword( HTTPClient.AuthorizationInfo challenge,
String line3;

if ( challenge.getScheme().equalsIgnoreCase( "SOCKS5" ) ) {
line1 = grRes.getString(MODULE, "enterUsrPwd");
line1 = GRI18n.getString(MODULE, "enterUsrPwd");
line2 = challenge.getHost();
line3 = grRes.getString(MODULE, "authMthd");
line3 = GRI18n.getString(MODULE, "authMthd");
} else {
line1 = grRes.getString(MODULE, "enterUsrPwdRealm") +
line1 = GRI18n.getString(MODULE, "enterUsrPwdRealm") +
challenge.getRealm() + "'";
line2 = grRes.getString(MODULE, "onHost") + challenge.getHost() + ":" +
line2 = GRI18n.getString(MODULE, "onHost") + challenge.getHost() + ":" +
challenge.getPort();
line3 = grRes.getString(MODULE, "authScheme") + challenge.getScheme();
line3 = GRI18n.getString(MODULE, "authScheme") + challenge.getScheme();
}

synchronized ( getClass() ) {
Expand All @@ -95,7 +95,7 @@ public NVPair getUsernamePassword( HTTPClient.AuthorizationInfo challenge,
*/
private static class BasicAuthBox extends javax.swing.JDialog
{
private final static String title = GRI18n.getInstance().getString(MODULE, "authReq");
private final static String title = GRI18n.getString(MODULE, "authReq");
private Dimension screen;
private JLabel line1, line2, line3;
private JTextField user, pass;
Expand Down Expand Up @@ -127,8 +127,8 @@ private static class BasicAuthBox extends javax.swing.JDialog
getContentPane().add( "North", p );

p = new JPanel( new GridLayout( 2, 1 ) );
p.add( new JLabel( grRes.getString(MODULE, "username") ) );
p.add( new JLabel( grRes.getString(MODULE, "passwd") ) );
p.add( new JLabel( GRI18n.getString(MODULE, "username") ) );
p.add( new JLabel( GRI18n.getString(MODULE, "passwd") ) );
getContentPane().add( "West", p );
p = new JPanel( new GridLayout( 2, 1 ) );
p.add( user = new JTextField( 30 ) );
Expand All @@ -146,15 +146,15 @@ private static class BasicAuthBox extends javax.swing.JDialog
constr.gridwidth = 1;
constr.weightx = 1.0;
JButton b;
p.add( b = new JButton( grRes.getString(MODULE, "ok") ) );
p.add( b = new JButton( GRI18n.getString(MODULE, "ok") ) );
b.addActionListener( new Ok() );
constr.weightx = 1.0;
gb.setConstraints( b, constr );
p.add( b = new JButton( grRes.getString(MODULE, "clear") ) );
p.add( b = new JButton( GRI18n.getString(MODULE, "clear") ) );
b.addActionListener( new Clear() );
constr.weightx = 2.0;
gb.setConstraints( b, constr );
p.add( b = new JButton( grRes.getString(MODULE, "cancel") ) );
p.add( b = new JButton( GRI18n.getString(MODULE, "cancel") ) );
b.addActionListener( new Cancel() );
constr.weightx = 1.0;
gb.setConstraints( b, constr );
Expand Down
5 changes: 2 additions & 3 deletions com/gallery/GalleryRemote/DroppableList.java
Expand Up @@ -61,7 +61,6 @@ public class DroppableList
extends JList implements DropTargetListener, DragSourceListener, DragGestureListener {

protected final static String MODULE = "Droplist";
protected static GRI18n grRes = GRI18n.getInstance();
MainFrame mf = null;

DragSource dragSource;
Expand Down Expand Up @@ -197,8 +196,8 @@ public synchronized void drop( DropTargetDropEvent dropTargetDropEvent ) {
Log.logStack( Log.LEVEL_ERROR, MODULE );
JOptionPane.showMessageDialog(
null,
grRes.getString(MODULE, "imgError"),
grRes.getString(MODULE, "dragError"),
GRI18n.getString(MODULE, "imgError"),
GRI18n.getString(MODULE, "dragError"),
JOptionPane.ERROR_MESSAGE );
}

Expand Down
5 changes: 2 additions & 3 deletions com/gallery/GalleryRemote/DroppableTree.java
Expand Up @@ -61,7 +61,6 @@ public class DroppableTree
extends JTree implements DropTargetListener {

protected final static String MODULE = "Droptree";
protected static GRI18n grRes = GRI18n.getInstance();
MainFrame mf = null;

DropTarget dropTarget;
Expand Down Expand Up @@ -223,8 +222,8 @@ public synchronized void drop( DropTargetDropEvent dropTargetDropEvent ) {
Log.logStack( Log.LEVEL_ERROR, MODULE );
JOptionPane.showMessageDialog(
null,
grRes.getString(MODULE, "imgError"),
grRes.getString(MODULE, "dragError"),
GRI18n.getString(MODULE, "imgError"),
GRI18n.getString(MODULE, "dragError"),
JOptionPane.ERROR_MESSAGE );
}

Expand Down
4 changes: 2 additions & 2 deletions com/gallery/GalleryRemote/GalleryComm.java
Expand Up @@ -47,7 +47,7 @@
*/
public abstract class GalleryComm implements PreferenceNames {
private static final String MODULE = "GalComm";
private static GRI18n grRes = GRI18n.getInstance();

int[] capabilities = null;
private static int lastRespCode = 0;

Expand Down Expand Up @@ -232,7 +232,7 @@ private static boolean tryComm(StatusUpdate su, HTTPConnection mConnection, Stri
if (ioe instanceof javax.net.ssl.SSLPeerUnverifiedException) {
Log.logException(Log.LEVEL_ERROR, MODULE, ioe);

JOptionPane.showMessageDialog((Component) su, grRes.getString(MODULE, "noAuth"), grRes.getString(MODULE, "error"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog((Component) su, GRI18n.getString(MODULE, "noAuth"), GRI18n.getString(MODULE, "error"), JOptionPane.ERROR_MESSAGE);
} else {
Log.logException(Log.LEVEL_ERROR, MODULE, ioe);
}
Expand Down

0 comments on commit f9b20b2

Please sign in to comment.