disable set default on directories
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 31 May 2008 04:28:18 +0000 (06:28 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 31 May 2008 04:28:18 +0000 (06:28 +0200)
src/net/pterodactylus/jsite/gui/FileManager.java

index c90614a..77df538 100644 (file)
@@ -432,6 +432,7 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr
                }
                fileTree.setSelectionPath(clickedPath);
                ProjectFileWrapper projectFileWrapper = (ProjectFileWrapper) clickedPath.getLastPathComponent();
+               setDefaultFileAction.setEnabled(projectFileWrapper.getProjectFile().isFile() && !isHidden(projectFileWrapper));
                insertCheckBoxMenuItem.setSelected(!isHidden(projectFileWrapper));
                treeContextMenu.show(fileTree, eventLocation.x, eventLocation.y);
        }