From 086aff15fcd35b2dfed9d64b24e5b7dacd8fb684 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 28 May 2008 09:04:19 +0200 Subject: [PATCH] wip: use new notion of default stuff --- src/net/pterodactylus/jsite/gui/FileManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index 68dfb2c..e4c8570 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -163,7 +163,7 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr mimeTypeComboBox.setEnabled(useCustomMimeTypeCheckBox.isSelected()); if (!useCustomMimeTypeCheckBox.isSelected()) { for (Entry entry: getSelectedEntries()) { - entry.setContentType(null); + entry.restoreDefaultContentType(); } } } @@ -292,8 +292,8 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr insertAction.setEnabled(true); insertCheckBox.setSelected(fileEntry.isInsert()); useCustomMimeTypeAction.setEnabled(fileEntry.isInsert()); - useCustomMimeTypeCheckBox.setSelected(contentType != null); - mimeTypeComboBox.setEnabled(contentType != null); + useCustomMimeTypeCheckBox.setSelected(!fileEntry.isDefaultContentType()); + mimeTypeComboBox.setEnabled(fileEntry.isDefaultContentType()); mimeTypeComboBox.setSelectedItem(contentType); } } @@ -312,7 +312,7 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr for (Entry entry: getSelectedEntries()) { entry.setContentType(contentType); } - useCustomMimeTypeCheckBox.setSelected(contentType != null); + useCustomMimeTypeCheckBox.setSelected(!getSelectedEntries().get(0).isDefaultContentType()); } } -- 2.7.4