Index: /trunk/src/main/org/lastpod/PreferencesEditor.java =================================================================== --- /trunk/src/main/org/lastpod/PreferencesEditor.java (revision 82) +++ /trunk/src/main/org/lastpod/PreferencesEditor.java (revision 95) @@ -168,7 +168,7 @@ p.add(new JLabel()); - TitledBorder b4 = BorderFactory.createTitledBorder("iTunes:"); + TitledBorder b4 = BorderFactory.createTitledBorder("iPod Manager (iTunes, gtkpod, etc):"); p4.setBorder(b4); - p4.setToolTipText("Enable if you want to use audioPod with iTunes"); + p4.setToolTipText("Enable if you want to use lastpod with an iPod Manager."); JPanel p41 = new JPanel(); @@ -222,5 +222,5 @@ p4.add(new JLabel()); - JLabel exelabel = new JLabel("Location of iTunes.exe:"); + JLabel exelabel = new JLabel("Location of iPod Manager (such as iTunes.exe):"); p4.add(exelabel); this.iTunesfield = new JTextField(); @@ -545,5 +545,5 @@ if (returnVal == JFileChooser.APPROVE_OPTION) { File f = fc.getSelectedFile(); - iTunesfield.setText(f.getParent()); + iTunesfield.setText(f.getPath()); } } Index: /trunk/src/main/org/lastpod/ExeFileFilter.java =================================================================== --- /trunk/src/main/org/lastpod/ExeFileFilter.java (revision 53) +++ /trunk/src/main/org/lastpod/ExeFileFilter.java (revision 95) @@ -29,4 +29,6 @@ */ public class ExeFileFilter extends FileFilter { + public final static boolean OS_IS_WINDOWS = System.getProperty("os.name").startsWith("Windows"); + /** * Filters a given file and returns true if it should be @@ -40,9 +42,14 @@ } - if (f.getName().endsWith(".exe")) { + /* Only filter .exe extensions for Windows. */ + if (OS_IS_WINDOWS) { + if (f.getName().endsWith(".exe")) { + return true; + } + + return false; + } else { return true; } - - return false; } @@ -52,5 +59,5 @@ */ public String getDescription() { - return "*.exe"; + return OS_IS_WINDOWS ? "*.exe" : "*"; } } Index: /trunk/src/main/org/lastpod/action/ExitApplication.java =================================================================== --- /trunk/src/main/org/lastpod/action/ExitApplication.java (revision 66) +++ /trunk/src/main/org/lastpod/action/ExitApplication.java (revision 95) @@ -96,7 +96,7 @@ String message = - "No tracks have been submitted to Last.fm.\n" - + " Would you still like to launch iTunes?"; - String title = "Launch iTunes"; + "No tracks have been submitted to Last.fm. Would you\n" + + " still like to launch iPod Manager (such as iTunes)?"; + String title = "Launch iPod Manager"; int opt = JOptionPane.YES_NO_OPTION; choice = JOptionPane.showConfirmDialog(mainAppFrame, message, title, opt); @@ -120,13 +120,19 @@ String iTunesPath = fPrefs.get("iT Path", "default"); - if (!iTunesPath.endsWith("iTunes.exe")) { - iTunesPath += "\\iTunes.exe"; - } + Runtime rt = null; try { - Runtime rt = Runtime.getRuntime(); + rt = Runtime.getRuntime(); rt.exec(iTunesPath); } catch (IOException e) { - System.out.println(iTunesPath + " not found! Cannot launch iTunes."); + if (!iTunesPath.endsWith("iTunes.exe")) { + iTunesPath += "\\iTunes.exe"; + } + + try { + rt.exec(iTunesPath); + } catch (IOException e2) { + System.out.println(iTunesPath + " not found! Cannot launch iPod manager."); + } } }