From 5171f0d892b04dd504534cf2819c9578bcffcd1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 31 May 2008 06:28:18 +0200 Subject: [PATCH] disable set default on directories --- src/net/pterodactylus/jsite/gui/FileManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index c90614a..77df538 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -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); } -- 2.7.4