Changeset 142
- Timestamp:
- 02/15/07 12:23:07 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/org/thestaticvoid/iriverter/ConverterOptions.java
r140 r142 285 285 } 286 286 287 public static boolean getKeepUpdated() { 288 String keepUpdated = readOption("keepUpdated"); 289 if (keepUpdated.equals("")) 290 return true; 291 292 return keepUpdated.equals("true"); 293 } 294 295 public static void setKeepUpdated(boolean keepUpdated) { 296 writeOption("keepUpdated", "" + keepUpdated); 297 } 298 287 299 public static String getMPlayerPath() { 288 300 String mplayerPath = readOption("mplayerPath"); 289 301 if (mplayerPath.equals("") || !new File(mplayerPath).isDirectory()) 290 return "."; 302 if (System.getProperty("os.name").indexOf("Windows") >= 0) 303 return "."; 304 else 305 return "/usr/bin"; 291 306 292 307 return mplayerPath; trunk/src/org/thestaticvoid/iriverter/MPlayerPathDialog.java
r133 r142 30 30 public class MPlayerPathDialog extends Dialog implements SelectionListener { 31 31 private Shell shell; 32 private Button download, extraCodecs, local, localDirSelect, cancel, ok;32 private Button download, extraCodecs, keepUpdated, local, localDirSelect, cancel, ok; 33 33 private Text localDir; 34 34 private boolean canceled; … … 72 72 gridData.horizontalIndent = 24; 73 73 extraCodecs.setLayoutData(gridData); 74 75 keepUpdated = new Button(downloadComposite, SWT.CHECK); 76 keepUpdated.setText("Keep updated"); 77 keepUpdated.setSelection(ConverterOptions.getKeepUpdated()); 78 gridData = new GridData(); 79 gridData.horizontalIndent = 24; 80 keepUpdated.setLayoutData(gridData); 74 81 75 82 Composite localComposite = new Composite(shell, SWT.NONE); … … 124 131 download.setEnabled(false); 125 132 extraCodecs.setEnabled(false); 133 keepUpdated.setEnabled(false); 126 134 } 127 135 … … 153 161 if (event.getSource() == download) { 154 162 extraCodecs.setEnabled(true); 163 keepUpdated.setEnabled(true); 155 164 local.setSelection(false); 156 165 localDir.setEnabled(false); … … 161 170 download.setSelection(false); 162 171 extraCodecs.setEnabled(false); 172 keepUpdated.setEnabled(false); 163 173 localDir.setEnabled(true); 164 174 localDirSelect.setEnabled(true);
