Changeset 142

Show
Ignore:
Timestamp:
02/15/07 12:23:07 (2 years ago)
Author:
jlee
Message:

Keep mplayer updated button

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/org/thestaticvoid/iriverter/ConverterOptions.java

    r140 r142  
    285285        } 
    286286         
     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         
    287299        public static String getMPlayerPath() { 
    288300                String mplayerPath = readOption("mplayerPath"); 
    289301                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"; 
    291306                 
    292307                return mplayerPath; 
  • trunk/src/org/thestaticvoid/iriverter/MPlayerPathDialog.java

    r133 r142  
    3030public class MPlayerPathDialog extends Dialog implements SelectionListener { 
    3131        private Shell shell; 
    32         private Button download, extraCodecs, local, localDirSelect, cancel, ok; 
     32        private Button download, extraCodecs, keepUpdated, local, localDirSelect, cancel, ok; 
    3333        private Text localDir; 
    3434        private boolean canceled; 
     
    7272                gridData.horizontalIndent = 24; 
    7373                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); 
    7481                 
    7582                Composite localComposite = new Composite(shell, SWT.NONE); 
     
    124131                        download.setEnabled(false); 
    125132                        extraCodecs.setEnabled(false); 
     133                        keepUpdated.setEnabled(false); 
    126134                } 
    127135                 
     
    153161                if (event.getSource() == download) { 
    154162                        extraCodecs.setEnabled(true); 
     163                        keepUpdated.setEnabled(true); 
    155164                        local.setSelection(false); 
    156165                        localDir.setEnabled(false); 
     
    161170                        download.setSelection(false); 
    162171                        extraCodecs.setEnabled(false); 
     172                        keepUpdated.setEnabled(false); 
    163173                        localDir.setEnabled(true); 
    164174                        localDirSelect.setEnabled(true);