Changeset 69

Show
Ignore:
Timestamp:
05/20/07 01:45:30 (2 years ago)
Author:
chris
Message:

completes trac ticket #11

People that don't use iTunes to sync their iPods have to manually
delete the Play Counts file on their iPods. It would be nice to give
users the option to automatically delete this file after submitting
tracks to Last.fm/Audioscrobbler.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/org/lastpod/UI.java

    r66 r69  
    1919package org.lastpod; 
    2020 
     21import org.lastpod.action.DeletePlayCounts; 
    2122import org.lastpod.action.ExitApplication; 
    2223import org.lastpod.action.OpenPreferencesEditor; 
     
    8889 
    8990    /** 
     91     * The action that deletes the iPod's play counts file. 
     92     */ 
     93    private final Action actionDeletePlayCounts; 
     94 
     95    /** 
    9096     * The action that exits the application. 
    9197     */ 
     
    107113        ImageIcon iconSubmitTracks = 
    108114            SwingUtils.createImageIcon(UI.class, "images/applications-system.png"); 
     115        ImageIcon iconDeletePlayCounts = 
     116            SwingUtils.createImageIcon(UI.class, "images/stock_data-delete-table.png"); 
    109117        ImageIcon iconExit = SwingUtils.createImageIcon(UI.class, "images/application-exit.png"); 
    110118 
     
    115123        actionSubmitTracks = new SubmitTracks(statusAnimationLabel, "Submit Tracks", 
    116124                iconSubmitTracks, "Submits the selected tracks to Last.fm", KeyEvent.VK_S); 
     125        actionDeletePlayCounts = new DeletePlayCounts(frame, "Delete Play Counts", 
     126                iconDeletePlayCounts, "Removes the play counts file from the iPod.", KeyEvent.VK_D); 
    117127        actionExit = new ExitApplication(frame, "Exit", iconExit, 
    118128                "Exits the application.  May launch iTunes", KeyEvent.VK_X); 
     
    166176 
    167177        editMenu.add(new JMenuItem(actionUnselectAll)); 
     178        editMenu.addSeparator(); 
     179        editMenu.add(new JMenuItem(actionDeletePlayCounts)); 
    168180 
    169181        menuBar.add(optionsMenu); 
     
    188200 
    189201        button = new JButton(actionSubmitTracks); 
     202        layout.setConstraints(button, c); 
     203        toolBar.add(button); 
     204 
     205        toolBar.addSeparator(); 
     206 
     207        button = new JButton(actionDeletePlayCounts); 
    190208        layout.setConstraints(button, c); 
    191209        toolBar.add(button);