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

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

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

revision 1870 by iliev, Wed Dec 24 17:29:47 2008 UTC revision 1871 by iliev, Sun Mar 22 18:11:39 2009 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2009 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 36  import javax.swing.BorderFactory; Line 36  import javax.swing.BorderFactory;
36  import javax.swing.Box;  import javax.swing.Box;
37  import javax.swing.BoxLayout;  import javax.swing.BoxLayout;
38  import javax.swing.JButton;  import javax.swing.JButton;
 import javax.swing.JFileChooser;  
39  import javax.swing.JLabel;  import javax.swing.JLabel;
40  import javax.swing.JPanel;  import javax.swing.JPanel;
41  import javax.swing.JSpinner;  import javax.swing.JSpinner;
# Line 253  public class JSGeneralProps { Line 252  public class JSGeneralProps {
252                                    
253                  private void                  private void
254                  onChange() {                  onChange() {
255                          JFileChooser fc = new JFileChooser();                          File f = StdUtils.showOpenDirectoryChooser(CC.getMainFrame(), null);
256                          fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);                          if(f == null) return;
                         int result = fc.showOpenDialog(this);  
                         if(result != JFileChooser.APPROVE_OPTION) return;  
257                                                    
258                          String s = CC.getJSamplerHome();                          String s = CC.getJSamplerHome();
259                          String suf = File.separator + ".jsampler";                          String suf = File.separator + ".jsampler";
260                          if(s != null) suf = File.separator + new File(s).getName();                          if(s != null) suf = File.separator + new File(s).getName();
261                                                    
262                          tfJSamplerHome.setText(fc.getSelectedFile().getPath() + suf);                          tfJSamplerHome.setText(f.getPath() + suf);
263                  }                  }
264                                    
265                  /**                  /**

Legend:
Removed from v.1870  
changed lines
  Added in v.1871

  ViewVC Help
Powered by ViewVC