/[svn]/jsampler/trunk/src/org/jsampler/view/std/JSInstrumentChooser.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/std/JSInstrumentChooser.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1479 by iliev, Sat Sep 22 17:27:06 2007 UTC revision 1480 by iliev, Wed Nov 14 21:39:45 2007 UTC
# Line 471  public class JSInstrumentChooser extends Line 471  public class JSInstrumentChooser extends
471                  String s = preferences().getStringProperty("lastInstrumentLocation");                  String s = preferences().getStringProperty("lastInstrumentLocation");
472                  JFileChooser fc = new JFileChooser(s);                  JFileChooser fc = new JFileChooser(s);
473                  int result = fc.showOpenDialog(this);                  int result = fc.showOpenDialog(this);
474                  if(result == JFileChooser.APPROVE_OPTION) {                  if(result != JFileChooser.APPROVE_OPTION) return;
475                          cbFilename.setSelectedItem(toEscapedString(fc.getSelectedFile().getPath()));                  
476                          btnOk.requestFocusInWindow();                  String path = fc.getSelectedFile().getAbsolutePath();
477                                            if(java.io.File.separatorChar == '\\') {
478                          String path = fc.getCurrentDirectory().getAbsolutePath();                          path.replace('\\', '/');
                         preferences().setStringProperty("lastInstrumentLocation", path);  
479                  }                  }
480                    cbFilename.setSelectedItem(toEscapedString(path));
481                    btnOk.requestFocusInWindow();
482                    
483                    path = fc.getCurrentDirectory().getAbsolutePath();
484                    preferences().setStringProperty("lastInstrumentLocation", path);
485          }          }
486                    
487          private void          private void

Legend:
Removed from v.1479  
changed lines
  Added in v.1480

  ViewVC Help
Powered by ViewVC