mPlayList.setText(getResourceString("toolbar.menu_item.play_list"));   mPlayList.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.play_list")));
mPlayList.setText(Resources.getString("toolbar.menu_item.play_list"));   mPlayList.addArmListener(new ToolTipArmListener(Resources.getString("toolbar.menu_item.tooltip.play_list")));
  public void createMenu() {    Menu menubar = new Menu(shell, SWT.BAR);    shell.setMenuBar(menubar);    MenuItem item1 = new MenuItem(menubar, SWT.CASCADE);    item1.setText(getResourceString("toolbar.menu_title.action"));    Menu menu1 = new Menu(item1);    //Added for a nicer UI by Allen Tipper 14.9.03    menu1.addMenuListener(new MenuAdapter() {      public void menuHidden(MenuEvent e) {        update();      }    });    //end add    item1.setMenu(menu1);    MenuItem item1_1 = new MenuItem(menu1, SWT.PUSH);    item1_1.setText(getResourceString("toolbar.menu_item.download"));    item1_1.addSelectionListener(new SelectionAdapter() {      public void widgetSelected(SelectionEvent e) {        downloadThread.go();      }    });    //Added for a nicer UI by Allen Tipper 16.9.03    item1_1.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.download")));    //end add    MenuItem item_undo = new MenuItem(menu1, SWT.PUSH);    item_undo.setText(getResourceString("toolbar.menu_item.undo"));    item_undo.addSelectionListener(new SelectionAdapter() {      public void widgetSelected(SelectionEvent e) {        undoLastRating();      }    });    item_undo.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.undo")));    MenuItem item1_4 = new MenuItem(menu1, SWT.PUSH);    item1_4.setText(getResourceString("toolbar.menu_item.quit"));    item1_4.addSelectionListener(new SelectionAdapter() {      public void widgetSelected(SelectionEvent e) {        quit();      }    });    //Added for a nicer UI by Allen Tipper 14.9.03    item1_4.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.quit")));    //end add    MenuItem item2 = new MenuItem(menubar, SWT.CASCADE);    item2.setText(getResourceString("toolbar.menu_title.settings"));    Menu mSettings = new Menu(item2);    //Added for a nicer UI by Allen Tipper 14.9.03    mSettings.addMenuListener(new MenuAdapter() {      public void menuHidden(MenuEvent e) {        update();      }    });    //end add    item2.setMenu(mSettings);    MenuItem mDownload = new MenuItem(mSettings, SWT.CASCADE);    mDownload.setText(getResourceString("toolbar.menu_item.auto_download"));    //Added for a nicer UI by Allen Tipper 14.9.03    mDownload.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.auto_download")));    //end add    Menu menu2 = new Menu(mDownload);    mDownload.setMenu(menu2);    int[] counts = new int[] { 0, 5, 11, 17, 23, 29, 37 };    int autoDownload = trackDatabase.getAutoDownload();    for (int i = 0; i < counts.length; i++) {      MenuItem mTimes = new MenuItem(menu2, SWT.CHECK, i);      final Integer acount = new Integer(counts[i]);      final int dummy = 0; // workaround for gcj-3.0.4 bug      mTimes.setText(i == 0 ? getResourceString("toolbar.sub_menu_item.auto_download.disabled") : "< " + acount + " " + getResourceString("toolbar.sub_menu_item.auto_download.unrated_tracks"));      mTimes.setSelection(acount.intValue() == autoDownload);      mTimes.addSelectionListener(new SelectionAdapter() {        public void widgetSelected(SelectionEvent e) {          //stupid trick to make self the only selected item          MenuItem self = (MenuItem) e.getSource();          uncheckSiblingMenuItems(self);          self.setSelection(true);          trackDatabase.setAutoDownload(acount.intValue());          downloadThread.checkAutoDownload();        }      });      //Added for a nicer UI by Allen Tipper 14.9.03      mTimes.addArmListener(        new ToolTipArmListener(          getResourceString("toolbar.sub_menu_item.auto_download.tooltip.unrated_tracks")          + " " + acount));      //end add    }    MenuItem mPlayList = new MenuItem(mSettings, SWT.CASCADE);    mPlayList.setText(getResourceString("toolbar.menu_item.play_list"));    //Added for a nicer UI by Allen Tipper 14.9.03    mPlayList.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.play_list")));    //end add    Menu menuPlayList = new Menu(mPlayList);    mPlayList.setMenu(menuPlayList);    counts = new int[] { 13, 19, 31, 49 };    int playListLength = trackDatabase.getPlayListLength();    for (int i = 0; i < counts.length; i++) {      MenuItem mTimes = new MenuItem(menuPlayList, SWT.CHECK, i);      final int dummy = 0; // workaround for gcj-3.0.4 bug      final Integer pcount = new Integer(counts[i]);      mTimes.setText(pcount + " " + getResourceString("toolbar.sub_menu_item.play_list.tracks"));      mTimes.setSelection(pcount.intValue() == playListLength);      mTimes.addSelectionListener(new SelectionAdapter() {        public void widgetSelected(SelectionEvent e) {          MenuItem self = (MenuItem) e.getSource();          uncheckSiblingMenuItems(self);          self.setSelection(true);          trackDatabase.setPlayListLength(pcount.intValue());        }      });      //Added for a nicer UI by Allen Tipper 14.9.03      mTimes.addArmListener(        new ToolTipArmListener(getResourceString("toolbar.sub_menu_item.play_list.tooltip.tracks") + " " + pcount));      //end add    }    /**     * Added by Eric Dalquist - 11.09.2003     *     * Allows the user to select the number of unrated tracks to add to each playlist generation     */    MenuItem mNewUnrated = new MenuItem(mSettings, SWT.CASCADE);    mNewUnrated.setText(getResourceString("toolbar.menu_item.unrated"));    Menu menuNewUnrated = new Menu(mNewUnrated);    mNewUnrated.setMenu(menuNewUnrated);    int unratedPlayListRatio = trackDatabase.getUnratedPlayListRatio();    counts = new int[] { 0, 13, 29, 47, 63, 79, 97 };    for (int i = 0; i < counts.length; i++) {      final Integer ratio = new Integer(counts[i]);      MenuItem mRatio = new MenuItem(menuNewUnrated, SWT.CHECK, i);      mRatio.setText(ratio + "%");      mRatio.setSelection(ratio.intValue() == unratedPlayListRatio);      mRatio.addSelectionListener(new SelectionAdapter() {        public void widgetSelected(SelectionEvent e) {          MenuItem self = (MenuItem) e.getSource();          uncheckSiblingMenuItems(self);          self.setSelection(true);          trackDatabase.setUnratedPlayListRatio(ratio.intValue());        }      });      //Added for a nicer UI by Allen Tipper 14.9.03      mRatio.addArmListener(        new ToolTipArmListener(          getResourceString("toolbar.menu_item.tooltip.unrated") +          " " + ratio + "%."));      //end add    }    /****/    MenuItem mPlayers = new MenuItem(mSettings, SWT.CASCADE);    mPlayers.setText(getResourceString("toolbar.menu_item.player"));    menu2 = new Menu(mPlayers);    mPlayers.setMenu(menu2);    //Added for a nicer UI by Allen Tipper 14.9.03    mPlayers.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.player")));    //end add    Player players[] = playerList.getPlayers();    for (int i = 0; i < players.length; i++) {      final String player = players[i].getName();      MenuItem mPlayer = new MenuItem(menu2, SWT.CHECK, i);      mPlayer.setText(player);      if (trackDatabase.getPlayer().equals(player))        mPlayer.setSelection(true);      mPlayer.addSelectionListener(new SelectionAdapter() {        public void widgetSelected(SelectionEvent e) {          //stupid trick to make self the only selected item          MenuItem self = (MenuItem) e.getSource();          uncheckSiblingMenuItems(self);          self.setSelection(true);          trackDatabase.setPlayer(player);          downloadThread.checkAutoDownload();        }      });      mPlayer.addArmListener(        new ToolTipArmListener(getResourceString("toolbar.sub_menu_item.tooltip.player") + " " + player));    }    MenuItem item2_1 = new MenuItem(mSettings, SWT.PUSH);    item2_1.setText(getResourceString("toolbar.menu_item.advanced"));    item2_1.addSelectionListener(new SelectionAdapter() {      public void widgetSelected(SelectionEvent e) {        showSettingDialog(SettingDialog.PLUGIN_PAGE);      }    });    //Added for a nicer UI by Allen Tipper 14.9.03    item2_1.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.advanced")));    //end add    MenuItem item3 = new MenuItem(menubar, SWT.CASCADE);    item3.setText(getResourceString("toolbar.menu_title.info"));    Menu menu3 = new Menu(item3);    menu3.addMenuListener(new MenuAdapter() {      public void menuHidden(MenuEvent e) {        update();      }    });    item3.setMenu(menu3);    MenuItem item3_1 = new MenuItem(menu3, SWT.PUSH);    item3_1.setText(getResourceString("toolbar.menu_item.credits"));    item3_1.addSelectionListener(new SelectionAdapter() {      public void widgetSelected(SelectionEvent e) {        actionAbout();      }    });    item3_1.addArmListener(new ToolTipArmListener(getResourceString("toolbar.menu_item.tooltip.credits")));  }