but5.setToolTipText(Messages.getString("FoldTab.2"));
//but5.setBorder(BorderFactory.createEmptyBorder());
but5.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (configuration.getUseCache()) {
DLNAMediaDatabase database = PMS.get().getDatabase();
if (database != null) {
if (!database.isScanLibraryRunning()) {
int option = JOptionPane.showConfirmDialog(
(Component) PMS.get().getFrame(),
Messages.getString("FoldTab.3") + Messages.getString("FoldTab.4"),
Messages.getString("Dialog.Question"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION) {
database.scanLibrary();
but5.setIcon(LooksFrame.readImageIcon("viewmagfit-32.png"));
}
} else {
int option = JOptionPane.showConfirmDialog(
(Component) PMS.get().getFrame(),
Messages.getString("FoldTab.10"),
Messages.getString("Dialog.Question"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION) {
database.stopScanLibrary();
PMS.get().getFrame().setStatusLine(null);
but5.setIcon(LooksFrame.readImageIcon("search-32.png"));
}
}
}