X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FConfigurationDialog.java;h=8523c23f7d3e061237ac659f4861448bad8208b4;hb=33a459c11335d0798655aa84f9cdde2386df68bb;hp=00c0776232cc6460a90a621ea375337bc8249dc8;hpb=83250636518e229320ac696ff580b710ea8207b7;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java b/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java index 00c0776..8523c23 100644 --- a/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java +++ b/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java @@ -20,6 +20,7 @@ import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JDialog; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JSpinner; import javax.swing.JTabbedPane; @@ -268,6 +269,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { LookAndFeelWrapper lookAndFeelWrapper = (LookAndFeelWrapper) customLAFComboBox.getItemAt(lookAndFeelIndex); if (lookAndFeelWrapper.getClassName().equals(lookAndFeel)) { customLAFComboBox.setSelectedIndex(lookAndFeelIndex); + customLAFComboBox.setEnabled(true); useCustomLAFCheckBox.setSelected(true); break; } @@ -456,6 +458,18 @@ public class ConfigurationDialog extends JDialog implements I18nable { * Called when the “okay” button is clicked. */ private void actionOkay() { + if (useCustomControlFontCheckBox.isSelected()) { + if (controlFontList.getSelectedItem() == null) { + JOptionPane.showMessageDialog(this, I18n.get("configurationDialog.error.noControlFontSelected.message"), I18n.get("configurationDialog.error.noControlFontSelected.title"), JOptionPane.ERROR_MESSAGE); + return; + } + } + if (useCustomUserFontCheckBox.isSelected()) { + if (userFontList.getSelectedItem() == null) { + JOptionPane.showMessageDialog(this, I18n.get("configurationDialog.error.noUserFontSelected.message"), I18n.get("configurationDialog.error.noUserFontSelected.title"), JOptionPane.ERROR_MESSAGE); + return; + } + } cancelled = false; setVisible(false); } @@ -478,10 +492,12 @@ public class ConfigurationDialog extends JDialog implements I18nable { public void updateI18n() { okayAction.updateI18n(); cancelAction.updateI18n(); + advancedModeAction.updateI18n(); restartRequiredLabel.updateI18n(); antialiasAction.updateI18n(); useCustomControlFontAction.updateI18n(); useCustomUserFontAction.updateI18n(); + useCustomLAFAction.updateI18n(); SwingUtils.repackCentered(this); }